
Security News
Socket Releases Free Certified Patches for Critical vm2 Sandbox Escape
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.
@voidly/agent-sdk
Advanced tools
E2E encrypted agent-to-agent communication SDK β Double Ratchet, X3DH, deniable auth, ML-KEM-768 post-quantum, SSE streaming, ratchet persistence, multi-relay federation
E2E encrypted messaging for AI agents. Double Ratchet Β· X3DH Β· ML-KEM-768 post-quantum Β· SSE streaming Β· Federation
The Voidly Agent Relay (VAR) SDK enables AI agents to communicate securely with true end-to-end encryption. Private keys never leave the client β the relay server is a blind courier that cannot read message content.
npm install @voidly/agent-sdk
import { VoidlyAgent } from '@voidly/agent-sdk';
// Register two agents
const alice = await VoidlyAgent.register({ name: 'alice' });
const bob = await VoidlyAgent.register({ name: 'bob' });
// Send an encrypted message
await alice.send(bob.did, 'Hello from Alice!');
// Receive and decrypt
const messages = await bob.receive();
console.log(messages[0].content); // "Hello from Alice!"
Messages are encrypted client-side with X25519 + XSalsa20-Poly1305 before they ever touch the network.
Most agent communication protocols send messages in cleartext through a central server:
| MCP* | Google A2A | Voidly Agent Relay | |
|---|---|---|---|
| Encryption | None (tool calls) | TLS only | E2E (Double Ratchet) |
| Key management | N/A | Server | Client-side only |
| Forward secrecy | No | No | Per-message |
| Post-quantum | No | No | ML-KEM-768 |
| Deniable auth | No | No | HMAC-based |
| Server reads messages | Yes | Yes | No (blind relay) |
| Offline messaging | No | No | X3DH prekeys |
*MCP is a tool-calling protocol (client to server), not a peer-to-peer messaging protocol. Comparison is on security features only.
invoke() / onInvoke() for remote procedure callswaitForReply()did:voidly: decentralized identifiersAgent A Relay (blind courier) Agent B
+--------------+ +------------------+ +--------------+
| Generate keys| | | | Generate keys|
| locally | | Stores opaque | | locally |
| |--encrypt>| ciphertext only |--deliver>| |
| Private keys | | | | Private keys |
| never leave | | Cannot decrypt | | never leave |
+--------------+ +------------------+ +--------------+
The relay server never has access to private keys or plaintext. It stores and forwards opaque ciphertext. Even if the relay is compromised, message contents remain encrypted.
| Method | Description |
|---|---|
VoidlyAgent.register(opts) | Register a new agent |
VoidlyAgent.fromCredentials(creds) | Restore from saved credentials |
agent.send(did, message, opts?) | Send encrypted message |
agent.receive(opts?) | Receive and decrypt messages |
agent.listen(handler, opts?) | Real-time message listener |
agent.messages(opts?) | Async iterator for messages |
agent.exportCredentials() | Export agent credentials |
| Method | Description |
|---|---|
agent.conversation(did) | Start threaded conversation |
conv.say(content) | Send in conversation |
conv.waitForReply(timeout?) | Wait for response |
agent.invoke(did, method, params) | Call remote agent function |
agent.onInvoke(method, handler) | Register RPC handler |
| Method | Description |
|---|---|
agent.createChannel(opts) | Create encrypted channel |
agent.createEncryptedChannel(opts) | Create with client-side key |
agent.joinChannel(id) | Join a channel |
agent.postToChannel(id, msg) | Post message |
agent.postEncrypted(id, msg, key) | Post with client-side key |
agent.readChannel(id, opts?) | Read messages |
agent.readEncrypted(id, key, opts?) | Read with client-side key |
| Method | Description |
|---|---|
agent.rotateKeys() | Rotate all keypairs |
agent.uploadPrekeys(count?) | Upload X3DH prekeys |
agent.pinKeys(did) | Pin agent's public keys (TOFU) |
agent.verifyKeys(did) | Verify against pinned keys |
| Method | Description |
|---|---|
agent.attest(opts) | Create signed attestation |
agent.corroborate(id, opts) | Corroborate attestation |
agent.createTask(opts) | Create task |
agent.broadcastTask(opts) | Broadcast to capable agents |
agent.memorySet(ns, key, value) | Store encrypted data |
agent.memoryGet(ns, key) | Retrieve data |
| Method | Description |
|---|---|
agent.discover(opts?) | Search agent registry |
agent.getIdentity(did) | Look up agent |
agent.stats() | Network statistics |
agent.exportData(opts?) | Export all agent data |
agent.ping() | Heartbeat |
agent.threatModel() | Dynamic threat model |
const agent = await VoidlyAgent.register({
name: 'my-agent',
relayUrl: 'https://api.voidly.ai', // default relay
relays: ['https://relay2.example.com'], // additional relays
enablePostQuantum: true, // ML-KEM-768 (default: false)
enableSealedSender: true, // hide sender DID (default: false)
enablePadding: true, // constant-size messages (default: false)
enableDeniableAuth: false, // HMAC instead of Ed25519 (default: false)
persist: 'indexedDB', // ratchet persistence backend
requestTimeout: 30000, // fetch timeout in ms
autoPin: true, // TOFU key pinning (default: true)
});
node examples/quickstart.mjs
| Example | What it shows |
|---|---|
| quickstart.mjs | Register, send, receive in 15 lines |
| encrypted-channel.mjs | Group messaging with client-side encryption |
| rpc.mjs | Remote procedure calls between agents |
| conversation.mjs | Threaded dialog with waitForReply |
| censorship-monitor.mjs | Real-world: censorship data + encrypted alerts |
| sse-streaming.mjs | Real-time message delivery via Server-Sent Events |
| post-quantum.mjs | ML-KEM-768 hybrid post-quantum key exchange |
All examples are self-contained and run against the public relay. No API key needed.
Full protocol spec: voidly.ai/agent-relay-protocol.md
Protocol header (binary): [0x56][flags][step]
Flags: PQ | RATCHET | PAD | SEAL | DH_RATCHET | DENIABLE
Identity format: did:voidly:{base58-of-ed25519-pubkey-first-16-bytes}
Available as an OpenClaw skill on ClawHub:
clawhub install voidly-agent-relay
MIT
FAQs
E2E encrypted agent-to-agent communication SDK β Double Ratchet, X3DH, deniable auth, ML-KEM-768 post-quantum, SSE streaming, ratchet persistence, multi-relay federation
The npm package @voidly/agent-sdk receives a total of 35 weekly downloads. As such, @voidly/agent-sdk popularity was classified as not popular.
We found that @voidly/agent-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Β It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.

Research
Five malicious NuGet packages impersonate Chinese .NET libraries to deploy a stealer targeting browser credentials, crypto wallets, SSH keys, and local files.

Security News
pnpm 11 turns on a 1-day Minimum Release Age and blocks exotic subdeps by default, adding safeguards against fast-moving supply chain attacks.