{"id":49109670,"url":"https://github.com/AgentAnycast/agentanycast","last_synced_at":"2026-05-07T10:01:00.572Z","repository":{"id":345246408,"uuid":"1183973421","full_name":"AgentAnycast/agentanycast","owner":"AgentAnycast","description":"Connect AI agents across any network — zero config, encrypted, skill-based routing","archived":false,"fork":false,"pushed_at":"2026-03-28T09:12:27.000Z","size":9491,"stargazers_count":124,"open_issues_count":5,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-04-04T17:33:31.137Z","etag":null,"topics":["a2a","a2a-protocol","agent-communication","agent-to-agent","ai-agent","crewai","decentralized","did","e2e-encryption","end-to-end-encryption","langgraph","libp2p","llms-txt","mcp","mcp-server","nat-traversal","noise-protocol","p2p","verifiable-credentials","zero-config"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AgentAnycast.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":"CLA.md"}},"created_at":"2026-03-17T05:57:15.000Z","updated_at":"2026-04-04T03:10:17.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/AgentAnycast/agentanycast","commit_stats":null,"previous_names":["agentanycast/agentanycast"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/AgentAnycast/agentanycast","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AgentAnycast%2Fagentanycast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AgentAnycast%2Fagentanycast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AgentAnycast%2Fagentanycast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AgentAnycast%2Fagentanycast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AgentAnycast","download_url":"https://codeload.github.com/AgentAnycast/agentanycast/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AgentAnycast%2Fagentanycast/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32732349,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T02:14:30.463Z","status":"ssl_error","status_checked_at":"2026-05-07T02:14:29.405Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["a2a","a2a-protocol","agent-communication","agent-to-agent","ai-agent","crewai","decentralized","did","e2e-encryption","end-to-end-encryption","langgraph","libp2p","llms-txt","mcp","mcp-server","nat-traversal","noise-protocol","p2p","verifiable-credentials","zero-config"],"created_at":"2026-04-21T04:00:28.903Z","updated_at":"2026-05-07T10:01:00.524Z","avatar_url":"https://github.com/AgentAnycast.png","language":"Shell","funding_links":[],"categories":["⚙️ Implementations \u0026 Libraries"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/assets/logo.png\" alt=\"AgentAnycast\" width=\"50%\"\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eAgentAnycast\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eConnect AI agents across any network. No public IP required.\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/AgentAnycast/agentanycast/actions/workflows/ci-proto.yml\"\u003e\u003cimg src=\"https://github.com/AgentAnycast/agentanycast/actions/workflows/ci-proto.yml/badge.svg\" alt=\"CI\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://pypi.org/project/agentanycast/\"\u003e\u003cimg src=\"https://img.shields.io/pypi/v/agentanycast?label=Python%20SDK\u0026color=3776AB\" alt=\"PyPI\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/agentanycast\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/agentanycast?label=TypeScript%20SDK\u0026color=3178C6\" alt=\"npm\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://pypi.org/project/agentanycast-mcp/\"\u003e\u003cimg src=\"https://img.shields.io/pypi/v/agentanycast-mcp?label=MCP%20Server\u0026color=8B5CF6\" alt=\"MCP Server\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/AgentAnycast/agentanycast-node/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/v/release/AgentAnycast/agentanycast-node?label=Daemon\u0026color=00ADD8\" alt=\"Daemon\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://pypi.org/project/agentanycast/\"\u003e\u003cimg src=\"https://img.shields.io/pypi/dm/agentanycast?label=Downloads\u0026color=orange\" alt=\"Downloads\"\u003e\u003c/a\u003e\n  \u003ca href=\"#license\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-Apache%202.0%20%2F%20FSL-green\" alt=\"License\"\u003e\u003c/a\u003e\n  \u003cbr\u003e\n  \u003ca href=\"https://github.com/AgentAnycast/agentanycast/discussions\"\u003e\u003cimg src=\"https://img.shields.io/github/discussions/AgentAnycast/agentanycast?label=Discussions\u0026color=blue\" alt=\"Discussions\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/AgentAnycast/agentanycast/stargazers\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/AgentAnycast/agentanycast?style=flat\u0026label=Stars\u0026color=yellow\" alt=\"Stars\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nThe [A2A protocol](https://github.com/a2aproject/A2A) assumes every agent has a public URL -- but real agents run on laptops, behind NATs, inside corporate firewalls. AgentAnycast is a **P2P runtime** that gives any agent a reachable identity. End-to-end encrypted, NAT-traversing, zero config on LAN.\n\n### Try it now\n\n```bash\npip install agentanycast \u0026\u0026 agentanycast demo\n# Open another terminal:\nagentanycast send \u003cPEER_ID\u003e \"Hello!\"\n```\n\nThe daemon downloads automatically. The demo prints the exact command to test it.\n\n```\npip install agentanycast        # Python SDK\nnpm install agentanycast        # TypeScript SDK\nuvx agentanycast-mcp            # MCP Server for Claude, Cursor, VS Code, etc.\n```\n\n\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"docs/assets/demo.svg\"\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"docs/assets/demo-light.svg\"\u003e\n    \u003cimg src=\"docs/assets/demo.svg\" alt=\"AgentAnycast Demo\" width=\"100%\"\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n\n## Why AgentAnycast?\n\nThe A2A protocol assumes every agent has a public URL. That excludes agents on laptops, behind NATs, or inside private networks. AgentAnycast fixes this:\n\n| | |\n|:---|:---|\n| **No public IP needed** | `pip install` and your agent is reachable. The Go sidecar daemon is auto-managed. |\n| **Find by skill, not address** | Anycast routing discovers the right agent by capability. No URLs, no DNS. |\n| **E2E encrypted** | Noise_XX protocol. Relay servers see only ciphertext. No plaintext path in the codebase. |\n| **Works behind any firewall** | Automatic NAT traversal (DCUtR hole-punching + relay fallback). |\n| **Cross-language** | Python and TypeScript agents interoperate on the same network. |\n\n## Quick Start\n\n### Python\n\n```bash\npip install agentanycast\n```\n\n```python\nfrom agentanycast import Node, AgentCard, Skill\n\ncard = AgentCard(\n    name=\"EchoAgent\",\n    description=\"Echoes back any message\",\n    skills=[Skill(id=\"echo\", description=\"Echo the input\")],\n)\n\nasync with Node(card=card) as node:\n    @node.on_task\n    async def handle(task):\n        text = task.messages[-1].parts[0].text\n        await task.complete(artifacts=[{\"parts\": [{\"text\": f\"Echo: {text}\"}]}])\n\n    print(f\"Agent running — Peer ID: {node.peer_id}\")\n    await node.serve_forever()\n```\n\n### TypeScript\n\n```bash\nnpm install agentanycast\n```\n\n```typescript\nimport { Node, type AgentCard } from \"agentanycast\";\n\nconst card: AgentCard = {\n  name: \"EchoAgent\",\n  description: \"Echoes back any message\",\n  skills: [{ id: \"echo\", description: \"Echo the input\" }],\n};\n\nconst node = new Node({ card });\nawait node.start();\n\nnode.onTask(async (task) =\u003e {\n  const text = task.messages.at(-1)?.parts[0]?.text ?? \"\";\n  await task.complete([{ parts: [{ text: `Echo: ${text}` }] }]);\n});\n\nconsole.log(`Agent running — Peer ID: ${node.peerId}`);\nawait node.serveForever();\n```\n\n\u003e Python and TypeScript agents interoperate out of the box -- same daemon, same protocol, same network.\n\n### MCP Server (Any AI Tool)\n\nNo code needed. Install the MCP server and use P2P agents from Claude Desktop, Cursor, VS Code, or any MCP-compatible tool:\n\n```bash\nuvx agentanycast-mcp\n```\n\nAdd to your AI tool's config (example: Claude Desktop):\n\n```json\n{\n  \"mcpServers\": {\n    \"agentanycast\": {\n      \"command\": \"uvx\",\n      \"args\": [\"agentanycast-mcp\"]\n    }\n  }\n}\n```\n\nThen ask: *\"Find agents that can translate Japanese\"* or *\"Send a task to the summarize agent\"*.\n\nSee [platform-specific setup](https://github.com/AgentAnycast/agentanycast-mcp) for Cursor, VS Code, Windsurf, JetBrains, Gemini CLI, and more.\n\n## How It Works\n\nAgentAnycast uses a **sidecar architecture**: a thin SDK talks to a local Go daemon over gRPC. The daemon handles all P2P networking, encryption, and protocol logic.\n\n\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"docs/assets/architecture.svg\"\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"docs/assets/architecture-light.svg\"\u003e\n    \u003cimg src=\"docs/assets/architecture.svg\" alt=\"AgentAnycast Architecture\" width=\"100%\"\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n\n- **On a LAN** -- agents find each other via mDNS. Zero configuration.\n- **Across networks** -- deploy a [self-hosted relay](https://github.com/AgentAnycast/agentanycast-relay). Agents connect through it, but the relay **cannot read traffic** (end-to-end encrypted).\n- **Behind NAT** -- the daemon tries hole-punching (DCUtR) first, then falls back to relay.\n- **Identity** -- each agent gets an Ed25519 key pair mapped to W3C DIDs (`did:key`, `did:web`). No certificates, no DNS, no accounts.\n\n## Three Ways to Connect\n\n```python\n# 1. Direct — send to a known agent by Peer ID\nawait node.send_task(peer_id=\"12D3KooW...\", message=msg)\n\n# 2. Anycast — send by skill, the network finds the right agent\nawait node.send_task(skill=\"translate\", message=msg)\n\n# 3. HTTP Bridge — reach standard HTTP-based A2A agents\nawait node.send_task(url=\"https://agent.example.com\", message=msg)\n```\n\n| Mode | Use case |\n|---|---|\n| **Direct** | You know the agent's Peer ID. Point-to-point, lowest latency. |\n| **Anycast** | You need a capability (\"translate\", \"summarize\"). The skill registry routes to an available agent. |\n| **HTTP Bridge** | The target is a standard HTTP A2A agent. The bridge translates between P2P and HTTP bidirectionally. |\n\n## Framework Adapters\n\nTurn existing agent frameworks into P2P agents with one function call:\n\n```python\nfrom agentanycast.adapters.crewai import serve_crew\nfrom agentanycast.adapters.langgraph import serve_graph\nfrom agentanycast.adapters.adk import serve_adk_agent\nfrom agentanycast.adapters.openai_agents import serve_openai_agent\nfrom agentanycast.adapters.claude_agent import serve_claude_agent\nfrom agentanycast.adapters.strands import serve_strands_agent\n\nawait serve_crew(my_crew, card=card, relay=\"...\")          # CrewAI\nawait serve_graph(my_graph, card=card, relay=\"...\")         # LangGraph\nawait serve_adk_agent(my_agent, card=card, relay=\"...\")     # Google ADK\nawait serve_openai_agent(my_agent, card=card, relay=\"...\")  # OpenAI Agents SDK\nawait serve_claude_agent(prompt=\"...\", card=card)           # Claude Agent SDK\nawait serve_strands_agent(my_agent, card=card)              # AWS Strands Agents\n```\n\n## Key Features\n\n| | |\n|---|---|\n| **End-to-end encryption** | Noise_XX protocol. No plaintext transport path. Relay servers see only ciphertext. |\n| **NAT traversal** | AutoNAT detection, DCUtR hole-punching, Circuit Relay v2 fallback. |\n| **Skill-based routing** | Anycast addressing by capability. Relay skill registry with optional multi-relay federation. |\n| **Decentralized identity** | Ed25519 keys, W3C DID (`did:key`, `did:web`, `did:dns`), Verifiable Credentials. |\n| **A2A protocol** | Native implementation of Agent Card, Task, Message, Artifact, and the full task lifecycle. |\n| **HTTP Bridge** | Bidirectional translation between P2P agents and standard HTTP A2A agents. |\n| **MCP interop** | MCP Tool \u003c-\u003e A2A Skill mapping. Daemon runs as an MCP server (stdio + HTTP). |\n| **Cross-language** | Python and TypeScript SDKs sharing the same daemon, protocol, and network. |\n\n## Interoperability\n\n| Ecosystem | Integration |\n|---|---|\n| [**A2A**](https://github.com/a2aproject/A2A) | Native implementation -- Agent Card, Task, Message, Artifact |\n| **HTTP A2A** | Bidirectional HTTP Bridge between P2P and HTTP agents |\n| [**MCP**](https://modelcontextprotocol.io/) | Daemon as MCP server; SDK maps MCP Tools \u003c-\u003e A2A Skills |\n| [**ANP**](https://www.w3.org/community/anp/) | Agent Network Protocol bridge |\n| **W3C DID** | `did:key`, `did:web`, `did:dns` identity + Verifiable Credentials |\n| [**AGNTCY**](https://github.com/agntcy) | Agent directory integration + OASF record conversion |\n\n## Comparison\n\n| | AgentAnycast | Standard A2A | agentgateway |\n|:---|:---:|:---:|:---:|\n| Works behind NAT | Yes (automatic) | No | No |\n| E2E encrypted through relays | Yes (Noise_XX) | No (TLS terminates) | No (proxy decrypts) |\n| Skill-based routing | Yes | No | No |\n| MCP server built-in | Yes | No | Yes |\n| Setup complexity | `pip install` + 3 lines | HTTP server + public IP | Gateway deployment |\n\n## Self-Hosted Relay\n\nOn a LAN, no relay is needed -- agents discover each other via mDNS.\n\nFor cross-network communication, deploy a relay on any machine with a public IP:\n\n```bash\ngit clone https://github.com/AgentAnycast/agentanycast-relay.git \u0026\u0026 cd agentanycast-relay\ndocker compose up -d\n```\n\nThen point agents to it:\n\n```python\nasync with Node(card=card, relay=\"/ip4/\u003cIP\u003e/tcp/4001/p2p/12D3KooW...\") as node:\n    ...\n```\n\nThe relay is a **zero-knowledge forwarder** -- it passes only encrypted bytes. It also hosts a skill registry for anycast discovery, with optional multi-relay federation.\n\n## Repository Ecosystem\n\n| Repository | Language | Description |\n|---|---|---|\n| **[agentanycast](https://github.com/AgentAnycast/agentanycast)** | -- | Documentation, protocol definitions ([`proto/`](proto/)), examples -- **you are here** |\n| **[agentanycast-mcp](https://github.com/AgentAnycast/agentanycast-mcp)** | Python | MCP server for Claude, Cursor, VS Code, and 13+ AI tools |\n| **[agentanycast-python](https://github.com/AgentAnycast/agentanycast-python)** | Python | Python SDK -- `pip install agentanycast` |\n| **[agentanycast-ts](https://github.com/AgentAnycast/agentanycast-ts)** | TypeScript | TypeScript SDK -- `npm install agentanycast` |\n| **[agentanycast-node](https://github.com/AgentAnycast/agentanycast-node)** | Go | Core daemon -- P2P networking, encryption, A2A engine |\n| **[agentanycast-relay](https://github.com/AgentAnycast/agentanycast-relay)** | Go | Relay server + skill registry + multi-relay federation |\n\n## Examples\n\nStart with [01-hello-world](examples/01-hello-world/) or explore [all examples](examples/) -- including CrewAI, LangGraph, Google ADK, OpenAI Agents, Claude Agent SDK, and AWS Strands integrations.\n\n## Documentation\n\n| Guide | Description |\n|---|---|\n| [Getting Started](docs/getting-started.md) | Install, run your first agent, connect two agents |\n| [Architecture](docs/architecture.md) | Sidecar model, security, NAT traversal, federation |\n| [Python SDK Reference](docs/python-sdk.md) | Node, AgentCard, TaskHandle, DID, framework adapters |\n| [TypeScript SDK Reference](docs/typescript-sdk.md) | Complete TypeScript API reference |\n| [Deployment Guide](docs/deployment.md) | Production relay, HTTP bridge, MCP server, metrics |\n| [Protocol Reference](docs/protocol.md) | Wire format, task lifecycle, gRPC services |\n| [Examples](docs/examples.md) | Anycast, adapters, streaming, LLM-powered agents |\n| [FAQ \u0026 Troubleshooting](docs/faq.md) | Common questions and solutions |\n\n## Contributing\n\nContributions welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines. A CLA bot will guide you on your first PR.\n\n## License\n\nSDKs and protocol definitions are [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0). Daemon and relay are [FSL-1.1-Apache-2.0](https://fsl.software/) -- each release auto-converts to Apache-2.0 after two years.\n\n## Community\n\n- [GitHub Discussions](https://github.com/AgentAnycast/agentanycast/discussions) -- questions, ideas, show \u0026 tell\n- [GitHub Issues](https://github.com/AgentAnycast/agentanycast/issues) -- bug reports, feature requests\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAgentAnycast%2Fagentanycast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAgentAnycast%2Fagentanycast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAgentAnycast%2Fagentanycast/lists"}