@dvvezig/bridge-a2a
v0.1.0
Published
Wraps any external A2A agent as a Zig participant. The external agent never knows it's in a room.
Readme
@dvvezig/bridge-a2a
Bridge existing A2A agents into Zig rooms.
This package discovers an A2A Agent Card, maps it into a Zig capability card, starts a room participant, forwards routed Zig messages to the external A2A service, and maps A2A task state back onto Zig gates and surfaces.
npm install @dvvezig/bridge-a2aimport { discoverA2aAgent, startA2aBridge } from "@dvvezig/bridge-a2a";
const { card, client } = await discoverA2aAgent("https://agent.example/.well-known/agent.json");
await runtime.admit("hq", { participantId: "fx-bot", handle: "agent", card, scope: "mentions-only" });
await startA2aBridge({
transport,
room: "hq",
participantId: "fx-bot",
a2a: client,
card,
});Scoping is enforced before the bridge sees the stream, so a restrictive scope such as mentions-only keeps bystander room traffic out of the external A2A service.
