You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`pkg/grpcserver/`| gRPC server — 16 RPC methods exposed to the SDK |
63
65
64
66
The daemon is started and stopped by the SDK. It runs as a local process, listening only on a Unix domain socket (or localhost TCP).
65
67
66
68
### Relay Server (`agentanycast-relay`)
67
69
68
-
The relay provides two services:
70
+
The relay provides three services:
69
71
70
72
1.**Circuit Relay v2** — bridges agents across different networks with strict resource limits. The relay **cannot read traffic** — all communication is end-to-end encrypted before reaching the relay.
71
73
72
74
2.**Skill Registry** — in-memory registry where agents register their skills and discover each other by capability. TTL-based expiration with heartbeat renewal.
73
75
76
+
3.**Federation** — gossip-based synchronization across multiple relays for global agent discovery. Uses Last-Writer-Wins conflict resolution.
77
+
74
78
### Proto Definitions (`agentanycast-proto`)
75
79
76
80
The single source of truth for all interfaces. Contains:
77
81
78
82
-**`node_service.proto`** — 16 RPC methods between SDK and daemon
79
83
-**`registry_service.proto`** — 4 RPC methods for skill registry on relay
84
+
-**`federation.proto`** — 2 RPC methods for multi-relay registry synchronization
@@ -198,7 +203,13 @@ Every node has an **Ed25519 key pair**, generated on first start and persisted i
198
203
199
204
#### W3C DID Interop
200
205
201
-
Peer IDs can be converted to W3C Decentralized Identifiers (`did:key:z6Mk...`) for interoperability with DID-based systems. The SDK provides `peer_id_to_did_key()` and `did_key_to_peer_id()` for bidirectional conversion.
206
+
Peer IDs can be converted to multiple DID methods for interoperability:
207
+
208
+
-**`did:key`** — derived directly from the Ed25519 public key (`did:key:z6Mk...`)
209
+
-**`did:web`** — web-based DID resolution (`did:web:example.com:agents:myagent`)
210
+
-**`did:dns`** — DNS-based DID resolution
211
+
212
+
The SDK provides bidirectional conversion functions (`peer_id_to_did_key`, `did_web_to_url`, etc.). Agent Cards can also carry Verifiable Credentials for trust attestation.
202
213
203
214
### Encryption
204
215
@@ -232,7 +243,7 @@ Agents behind NATs or firewalls use a three-tier strategy:
232
243
233
244
### Tier 1: Direct Connection
234
245
235
-
If both agents are on the same network (or have public IPs), they connect directly via TCPor QUIC.
246
+
If both agents are on the same network (or have public IPs), they connect directly via TCP, QUIC, or WebTransport.
236
247
237
248
### Tier 2: Hole Punching (DCUtR)
238
249
@@ -337,19 +348,58 @@ If a message can't be delivered (peer is offline or unreachable), the daemon:
337
348
338
349
This provides **at-least-once delivery** for A2A envelopes without requiring the application to implement retry logic. Messages expire after a configurable TTL (default 24 hours).
339
350
351
+
## MCP Server
352
+
353
+
The daemon can run as an [MCP (Model Context Protocol)](https://modelcontextprotocol.io/) server, exposing P2P capabilities as tools for AI assistants like Claude Desktop, Cursor, VS Code, ChatGPT, and Gemini CLI.
354
+
355
+
Two transport modes:
356
+
-**stdio** — local integration (`agentanycastd -mcp`)
Multiple relay servers can synchronize their skill registries using gossip-based federation:
374
+
375
+
1. Each relay periodically pulls updates from configured peer relays
376
+
2. New registrations are pushed to peers
377
+
3. Conflicts are resolved using Last-Writer-Wins with version counters
378
+
4. Local registrations always take priority over federated ones
379
+
380
+
This enables global agent discovery across relay clusters without a single point of failure.
381
+
340
382
## Interoperability
341
383
342
-
### MCP (Model Context Protocol)
384
+
### MCP Tool Mapping
343
385
344
386
The SDK can map MCP tools to A2A skills and vice versa, enabling agents built on MCP to participate in the AgentAnycast network.
345
387
388
+
### A2A v1.0 Protocol Compatibility
389
+
390
+
The Python SDK includes a compatibility layer (`compat/a2a_v1.py`) for bidirectional conversion between internal models and the official A2A v1.0 JSON format.
391
+
392
+
### OASF (Open Agentic Schema Framework)
393
+
394
+
Agent Cards can be converted to/from OASF records for publishing to the AGNTCY Agent Directory Service.
395
+
346
396
### AGNTCY Directory
347
397
348
398
The SDK can query the AGNTCY agent directory for cross-ecosystem discovery, finding agents registered in external directories.
349
399
350
400
### Framework Adapters
351
401
352
-
Built-in adapters for CrewAIand LangGraph wrap existing framework instances as P2P-capable agents, requiring minimal code changes.
402
+
Built-in adapters for CrewAI, LangGraph, Google ADK, and OpenAI Agents SDK wrap existing framework instances as P2P-capable agents, requiring minimal code changes.
0 commit comments