AgentAnycast/agentanycast-ts
TypeScript SDK for AgentAnycast — A2A protocol over P2P
Platform-specific configuration:
{
"mcpServers": {
"agentanycast-ts": {
"command": "npx",
"args": [
"-y",
"agentanycast-ts"
]
}
}
}Add the config above to .claude/settings.json under the mcpServers key.
TypeScript/JavaScript SDK for AgentAnycast -- decentralized A2A agent-to-agent communication over P2P.
[](https://nodejs.org) [](LICENSE)
> AgentAnycast is fully decentralized. On a local network, it works with zero configuration. For cross-network communication, just deploy your own relay with a single command.
npm install agentanycastThe daemon binary is automatically downloaded on install. Skip with AGENTANYCAST_SKIP_DOWNLOAD=1 if building from source.
┌─────────────┐ mDNS / Relay ┌─────────────┐
│ Agent A │◄──────────────────────────────►│ Agent B │
│ (Node.js) │ E2E encrypted (Noise) │ (Python) │
└──────┬──────┘ └──────┬──────┘
│ gRPC │ gRPC
┌──────┴──────┐ ┌──────┴──────┐
│ Daemon A │◄──────── libp2p ──────────────►│ Daemon B │
│ (Go) │ Noise_XX + Yamux + QUIC │ (Go) │
└─────────────┘ └─────────────┘TypeScript and Python agents interoperate seamlessly -- they share the same daemon and protocol.
import { Node, type AgentCard } from "agentanycast";
const card: AgentCard = {
name: "EchoAgent",
description: "Echoes back any message",
skills: [{ id: "echo", description: "Echo the input" }],
};
const node = new Node({ card });
await node.start();
console.log(`Peer ID: ${node.peerId}`);
node.onTask(async (task) => {
const text = task.messages.at(-1)?.parts[0]?.text ?? "";
await task.compLoading reviews...