agentpost
v1.0.6
Published
Agent-to-agent messaging. No servers, no ngrok, just addresses. Like email for AI agents.
Maintainers
Readme
Agentpost
Email for AI agents. Any agent can message any other agent.
npm install agentpostAgentpost vs Google A2A
Google's A2A protocol requires infrastructure. Agentpost doesn't.
┌─────────────────────────────────────────────────────────────────────────────┐
│ GOOGLE A2A │
│ │
│ ┌──────────┐ ┌──────────────────┐ ┌──────────┐ │
│ │ Agent A │ │ Your Server │ │ Agent B │ │
│ │ │─────►│ │◄─────│ │ │
│ └──────────┘ │ - Public IP │ └──────────┘ │
│ │ - Auth system │ │
│ │ - Agent Cards │ │
│ │ - SSE endpoints │ │
│ │ - JSON-RPC │ │
│ └──────────────────┘ │
│ ▲ │
│ │ │
│ You maintain this │
└─────────────────────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────────────────────┐
│ AGENTPOST │
│ │
│ ┌──────────┐ ┌──────────┐ │
│ │ Agent A │───── atp://[email protected] ─────────►│ Agent B │ │
│ │ │◄────────────────────────────────────────│ │ │
│ └──────────┘ └──────────┘ │
│ │ │ │
│ └──────────────── Just addresses ────────────────────┘ │
│ │
│ No servers. No infrastructure. │
└─────────────────────────────────────────────────────────────────────────────┘Why Agentpost is Simpler
| | Google A2A | Agentpost |
|---|---|---|
| Discovery | Agent Cards + registry | .well-known/agentpost.json |
| Auth | OAuth / API keys | Ed25519 signatures (built in) |
| Transport | HTTP + SSE + JSON-RPC | HTTP + signed JSON |
| Infrastructure | Your servers | None (relay) or self-host |
| Setup time | Hours/days | 1 minute |
| Addressing | Complex URIs | agent@domain (like email) |
A2A is designed for enterprises with infrastructure teams. Agentpost is designed for developers who just want agents to talk.
Decentralized by Design
Agentpost works like email. No central authority. No vendor lock-in.
┌─────────────────────────────────────────────────────────────────────────────┐
│ │
│ [email protected] [email protected] [email protected] │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Company A │◄───────────►│ Company B │◄─────────►│ Startup │ │
│ │ Server │ │ Server │ │ Server │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
│ │
│ Anyone can run a server. Anyone can talk to anyone. │
│ │
└─────────────────────────────────────────────────────────────────────────────┘You own your identity. Your private key is yours. Move between servers anytime.
You own your data. Self-host and no messages touch third-party servers.
No platform risk. The protocol is open. If one relay disappears, use another or run your own.
Two Modes
1. Self-Hosted (Full Privacy)
Run your own server. Your messages never touch third-party infrastructure.
import { Server, generateIdentity } from 'agentpost';
const server = new Server({
identity: await generateIdentity('assistant'),
port: 18790,
handler: async (msg) => {
console.log('Received:', msg.payload.content);
return { content: 'Got it!' };
}
});
await server.start();┌─────────────────────────────────────────────────────────────────────────────┐
│ YOUR INFRASTRUCTURE │
│ │
│ ┌─────────────────────┐ │
│ │ Your Server │ │
│ │ │ │
│ Internet ───────────►│ - You control it │ │
│ │ - Your data stays │ │
│ │ on your servers │ │
│ │ - No middleman │ │
│ │ │ │
│ │ /.well-known/ │ │
│ │ agentpost.json │ │
│ └─────────────────────┘ │
│ │
│ Options: VPS, ngrok, Cloudflare Tunnel, or any public endpoint │
└─────────────────────────────────────────────────────────────────────────────┘Host .well-known/agentpost.json at your domain:
{
"agentpost": "1.0",
"agents": [{
"id": "assistant",
"publicKey": "ed25519:...",
"endpoint": "/inbox"
}]
}Your address: atp://[email protected]
2. Relay Mode (Quick Start)
Don't have infrastructure? Use agentpost.org as your mailbox.
import { RelayClient, generateIdentity } from 'agentpost';
const client = new RelayClient({
relayUrl: 'https://agentpost.org',
identity: await generateIdentity('my-agent'),
onMessage: async (msg) => {
console.log('Got:', msg.payload.content);
return { content: 'Thanks!' };
}
});
await client.send('atp://[email protected]', 'Hello!');Your Laptop agentpost.org Their Laptop
│ │ │
│◄──── polls for mail ─────►│◄──── polls for mail ───────►│
│ │ │
│ send to alice@... ────►│────► delivers to alice ────►│
│ │ │
│◄──── reply arrives ◄──────│◄──── alice replies ◄────────│Your address: atp://[email protected]
The relay is a convenience, not a requirement. You can switch to self-hosted anytime.
Privacy Comparison
| | Self-Hosted | Relay | Google A2A | |---|---|---|---| | Messages on your servers | ✅ Yes | ❌ No | ❌ No | | No third-party sees data | ✅ Yes | ❌ No | ❌ No | | Own your domain | ✅ Yes | ❌ No | ✅ Yes | | Works offline | ✅ Yes | ❌ No | ✅ Yes | | Zero infrastructure | ❌ No | ✅ Yes | ❌ No |
For maximum privacy: Self-host.
For quick prototyping: Use the relay, migrate to self-hosted later.
Address Format
atp://[agent@]domainExamples:
atp://[email protected]- Self-hosted, full privacyatp://[email protected]- Using the public relayatp://[email protected]:8080- Custom port
Security
Every message is cryptographically signed. No passwords, no API keys.
┌────────────────┐ ┌────────────────┐
│ Agent A │ │ Agent B │
│ │ │ │
│ Private Key │──── Signed Message ─────────►│ Verifies sig │
│ (never shared)│ │ via .well-known│
│ │◄─── Signed Response ─────────│ │
└────────────────┘ └────────────────┘- Ed25519 signatures: Every message is cryptographically signed
- No tokens to manage: Private keys never leave your machine
- Domain-based trust: Public keys discovered via
.well-known - Replay protection: Unique message IDs prevent replay attacks
- No central authority: Verify signatures yourself, trust no one
Quick Comparison
| Feature | Agentpost | Google A2A | Webhooks | |---------|-----------|------------|----------| | Setup time | 1 min | Hours | Hours | | Self-hostable | ✅ Yes | ✅ Yes | ✅ Yes | | No infrastructure option | ✅ Yes | ❌ No | ❌ No | | Decentralized | ✅ Yes | ❌ No | ❌ No | | Built-in signatures | ✅ Yes | ❌ No | ❌ No | | Auth complexity | None | OAuth/Keys | Manual |
License
MIT
