jameseball-clawdioSecure P2P communication for AI agents. Noise XX handshake, XChaCha20-Poly1305 encryption, connection consent, human verification. Zero central servers.
Install via ClawdBot CLI:
clawdbot install JamesEBall/jameseball-clawdioMinimal secure peer-to-peer communication for AI agents. Two agents exchange a connection string, perform a Noise XX handshake, then communicate over encrypted channels. No central server required.
The Clawdio project lives at projects/clawdio/. Install dependencies and build:
cd projects/clawdio && npm install && npx tsc
const { Clawdio } = require('./projects/clawdio/dist/index.js');
// Create two nodes
const alice = await Clawdio.create({ port: 9090, autoAccept: true });
const bob = await Clawdio.create({ port: 9091, autoAccept: true });
// Connect (Noise XX handshake)
const aliceId = await bob.exchangeKeys(alice.getConnectionString());
// Send messages
await bob.send(aliceId, { task: "What's the weather?" });
alice.onMessage((msg, from) => console.log(msg.task));
By default, unknown inbound peers require explicit consent:
const node = await Clawdio.create({ port: 9090 }); // autoAccept defaults to false
node.on('connectionRequest', (req) => {
console.log(`Connection from ${req.id}`);
console.log(`Fingerprint: ${req.fingerprint}`);
// Accept or reject
node.acceptPeer(req.id); // or node.rejectPeer(req.id)
});
Outbound connections (you calling exchangeKeys) are auto-accepted. Already-trusted peers auto-reconnect.
For high-trust scenarios, verify peers in person:
node.setOwner('Alice');
const code = node.getVerificationCode(peerId); // "torch lemon onyx prism jade index"
// Both humans compare codes in person, then:
node.verifyPeer(peerId); // trust: 'accepted' β 'human-verified'
node.getPeerTrust(peerId); // 'human-verified'
pending β connection request received, not yet acceptedaccepted β peer accepted, encrypted communication activehuman-verified β verified via in-person code exchangePass identityPath to persist keys and trusted peers across restarts:
const node = await Clawdio.create({
port: 9090,
identityPath: '.clawdio-identity.json'
});
Spawn a sub-agent to handle Clawdio communication:
1. Main agent spawns sub-agent with task
2. Sub-agent creates Clawdio node, connects to remote peer
3. Sub-agent exchanges messages, collects results
4. Sub-agent reports back to main agent
| Method | Description |
|--------|-------------|
| Clawdio.create(opts) | Create and start a node |
| node.exchangeKeys(connStr) | Connect to peer |
| node.send(peerId, msg) | Send encrypted message |
| node.onMessage(handler) | Listen for messages |
| node.acceptPeer(id) | Accept pending connection |
| node.rejectPeer(id) | Reject pending connection |
| node.setOwner(name) | Set human owner name |
| node.getVerificationCode(id) | Get 6-word verification code |
| node.verifyPeer(id) | Mark peer as human-verified |
| node.getPeerTrust(id) | Get trust level |
| node.getFingerprint(id) | Emoji fingerprint |
| node.getPeerStatus(id) | alive/stale/down |
| node.stop() | Shutdown |
AI Usage Analysis
Analysis is being generated⦠refresh in a few seconds.
Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Clau...
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
Search and analyze your own session logs (older/parent conversations) using jq.
Typed knowledge graph for structured agent memory and composable skills. Use when creating/querying entities (Person, Project, Task, Event, Document), linking related objects, enforcing constraints, planning multi-step actions as graph transformations, or when skills need to share state. Trigger on "remember", "what do I know about", "link X to Y", "show dependencies", entity CRUD, or cross-skill data access.
Ultimate AI agent memory system for Cursor, Claude, ChatGPT & Copilot. WAL protocol + vector search + git-notes + cloud backup. Never lose context again. Vibe-coding ready.
Headless browser automation CLI optimized for AI agents with accessibility tree snapshots and ref-based element selection