@eidentic/a2a
v0.1.4
Published
Agent-to-Agent (A2A) interoperability for Eidentic — expose an agent as an A2A endpoint or call a remote A2A agent as a tool.
Downloads
644
Maintainers
Readme
@eidentic/a2a
Agent-to-Agent (A2A) protocol interoperability for Eidentic — expose a Eidentic agent as
an A2A endpoint (Hono routes serving .well-known/agent-card.json and JSON-RPC), or
consume a remote A2A agent as a first-class Eidentic tool. Implements the A2A v0.3
specification.
Install
pnpm add @eidentic/a2aUsage
Expose an agent as an A2A server
import { a2aRoutes } from "@eidentic/a2a";
import { Hono } from "hono";
const app = new Hono();
app.route("/", a2aRoutes({
agent: myAgent,
card: {
name: "Support Agent",
description: "Handles customer support queries.",
version: "1.0.0",
},
}));Call a remote A2A agent as a Eidentic tool
import { a2aTool, httpA2ATransport } from "@eidentic/a2a";
const remoteTool = a2aTool(httpA2ATransport("https://agent.example.com"), {
id: "remote_support",
description: "Delegates to the remote support agent.",
});
const agent = new Agent({ id: "orchestrator", model, store, tools: [remoteTool] });Links
Apache-2.0
