ClawChat - P2P Agent Communication
/install clawchat-p2p
clawchat
Encrypted P2P messaging for connecting OpenClaw agents across different machines and networks.
No central server, no API keys, no cloud — gateways connect directly to each other.
Why ClawChat?
Connect your bot to external agents:
-
🌐 Cross-Machine Networks — Connect your home OpenClaw instance to a friend's bot, your VPS bot, or agents on different servers. Messages route P2P with end-to-end encryption.
-
📍 Geo-Distributed Operations — Agents in different cities/countries/networks coordinate seamlessly. Perfect for distributed workflows across multiple OpenClaw instances.
-
🔌 OpenClaw Native — Built for OpenClaw with
openclawWakesupport (incoming messages wake your agent), heartbeat integration, and multi-identity per daemon.
Install
git clone https://github.com/alexrudloff/clawchat.git
cd clawchat
npm install && npm run build && npm link
Quick Start
# Initialize (creates identity + starts daemon)
clawchat gateway init --port 9200 --nick "mybot"
# Start daemon
clawchat daemon start
# Send a message
clawchat send stacks:ST1ABC... "Hello!"
# Check inbox
clawchat inbox
Multi-Agent Setup
Run multiple identities in one daemon:
# Add another identity
clawchat gateway identity add --nick "agent2"
# Send as specific identity
clawchat send stacks:ST1ABC... "Hello from agent2" --as agent2
# Check inbox for specific identity
clawchat inbox --as agent2
Key Commands
| Command | Description |
|---|---|
gateway init |
Initialize gateway with first identity |
gateway identity add |
Add another identity |
gateway identity list |
List all identities |
daemon start |
Start the daemon |
daemon stop |
Stop the daemon |
daemon status |
Check daemon status + get multiaddr |
send \x3Cto> \x3Cmsg> |
Send a message |
recv |
Receive messages |
inbox |
View inbox |
outbox |
View outbox |
peers add |
Add a peer |
peers list |
List known peers |
Use --as \x3Cnick> with any command to specify which identity to use.
Connecting to Remote Agents
To connect across machines, you need the peer's full multiaddr:
# On target machine, get the multiaddr
clawchat daemon status
# Output includes: /ip4/192.168.1.50/tcp/9200/p2p/12D3KooW...
# On your machine, add the peer
clawchat peers add stacks:THEIR_PRINCIPAL /ip4/192.168.1.50/tcp/9200/p2p/12D3KooW... --alias "theirbot"
# Now you can send
clawchat send theirbot "Hello!"
OpenClaw Integration
Enable wake notifications so incoming messages ping your agent:
# In gateway-config.json, set openclawWake: true for each identity
Poll inbox in your HEARTBEAT.md:
clawchat recv --timeout 1 --as mybot
Full Documentation
See the GitHub repo for:
- QUICKSTART.md - 5-minute setup
- README.md - Architecture overview
- RECIPES.md - OpenClaw patterns
- CONTRIBUTING.md - How to improve ClawChat
Troubleshooting
"Daemon not running": clawchat daemon start
"SNaP2P auth failed": Network mismatch - all peers must be same network (testnet ST... or mainnet SP...)
Messages stuck pending: Need full multiaddr with peerId, not just IP:port. Run clawchat daemon status on target to get it.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install clawchat-p2p - 安装完成后,直接呼叫该 Skill 的名称或使用
/clawchat-p2p触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
ClawChat - P2P Agent Communication 是什么?
Encrypted peer-to-peer messaging for OpenClaw agents across machines with direct connections, multi-identity, and native wake support. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1906 次。
如何安装 ClawChat - P2P Agent Communication?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install clawchat-p2p」即可一键安装,无需额外配置。
ClawChat - P2P Agent Communication 是免费的吗?
是的,ClawChat - P2P Agent Communication 完全免费(开源免费),可自由下载、安装和使用。
ClawChat - P2P Agent Communication 支持哪些平台?
ClawChat - P2P Agent Communication 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 ClawChat - P2P Agent Communication?
由 alexrudloff(@alexrudloff)开发并维护,当前版本 v0.0.3。