
Security News
White House Authorizes Private Companies to Conduct Offensive Cyber Operations
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.
agentanycast
Advanced tools
TypeScript/JavaScript SDK for AgentAnycast -- decentralized A2A agent-to-agent communication over P2P.
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 agentanycast
The 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.complete([{ parts: [{ text: `Echo: ${text}` }] }]);
});
await node.serveForever();
const node = new Node({ card, home: "/tmp/agentanycast-client" });
await node.start();
const handle = await node.sendTask(
{ role: "user", parts: [{ text: "Hello!" }] },
{ peerId: "12D3KooW..." },
);
const result = await handle.wait(30_000);
console.log(result.artifacts[0].parts[0].text); // "Echo: Hello!"
await node.stop();
await node.sendTask(message, { peerId: "12D3KooW..." }); // direct
await node.sendTask(message, { skill: "translate" }); // by skill
await node.sendTask(message, { url: "https://agent.example.com" }); // HTTP bridge
const agents = await node.discover("translate");
const frenchAgents = await node.discover("translate", { tags: { lang: "fr" } });
did:key, did:web, and did:dns identity| Method | Description |
|---|---|
new Node(options) | Create a node with an AgentCard and optional config |
start() | Launch daemon, connect gRPC, register card |
stop() | Stop daemon and clean up |
sendTask(message, target) | Send a task (by peerId, skill, or url) |
getCard(peerId) | Fetch a remote agent's card |
discover(skill, options?) | Find agents by skill with optional tag filtering |
onTask(handler) | Register handler for incoming tasks |
serveForever() | Block until stopped, processing incoming tasks |
interface AgentCard {
name: string;
description?: string;
version?: string;
protocolVersion?: string;
skills: Skill[];
// Read-only (populated by daemon):
peerId?: string;
supportedTransports?: string[];
relayAddresses?: string[];
didKey?: string; // W3C did:key
didWeb?: string; // did:web identifier
didDns?: string; // did:dns identifier
verifiableCredentials?: string[]; // JSON-encoded VCs
}
import { peerIdToDIDKey, didKeyToPeerId } from "agentanycast";
import { didWebToUrl, urlToDidWeb } from "agentanycast";
import { mcpToolsToAgentCard, mcpToolToSkill, skillToMcpTool } from "agentanycast";
npm install # Install deps (AGENTANYCAST_SKIP_DOWNLOAD=1 to skip daemon)
npm run build # Compile TypeScript
npm test # Run tests (vitest)
npm run lint # Lint (eslint)
FAQs
TypeScript SDK for AgentAnycast — A2A protocol over P2P
The npm package agentanycast receives a total of 69 weekly downloads. As such, agentanycast popularity was classified as not popular.
We found that agentanycast 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 new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.

Research
/Security News
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.