Skip to content

A2A Interop ​

MCP lets a model call InterviewForge as a tool. A2A (Agent2Agent) lets another agent discover it and hand it a task. The difference is not protocol trivia but reuse: an ATS that speaks A2A needs a card it can discover and a task it can poll, not a bespoke HTTP API.

Discovery ​

text
GET /.well-known/agent-card.json        host card: name, version, capabilities, skills
GET /.well-known/agents                 index of delegatable agents
GET /.well-known/agents/planner.json    one agent's card

Cards are public — they say what this host can do, not who may call it; the RPC still requires a profile token.

json
{
  "name": "InterviewForge",
  "protocolVersion": "0.2.5",
  "capabilities": { "streaming": false, "pushNotifications": false },
  "skills": [{ "id": "run-interview", "name": "Run an interview", "tags": ["interview", "hiring"] }]
}

streaming and pushNotifications are declared false on purpose: do not promise what is not implemented. A card that lies is worse than a plain one — clients write code against it.

Task lifecycle ​

One A2A task is one interview:

  • input-required means it is the candidate's turn; later messages on the same contextId are answers.
  • completed carries a compact report JSON (score, verdict, per-question, improvements) as artifacts[0], not the whole transcript.
  • tasks/cancel aborts the session's in-flight runs and marks the task canceled; a finished task returns -32002.

Tasks live in a2a_tasks (migration 18), so tasks/get survives reconnects and restarts — which is what polling semantics need.

Delegation is A2A too ​

The Director's delegate tool is not a private shortcut: it builds a standard message/send with metadata.agent and gets a real task back.

  • RPC logic lives in server/a2a-handler.ts and knows nothing about transports.
  • The HTTP route (server/routes/a2a.ts) and the in-process client (server/a2a-client.ts) both call it.
  • An agent outside the allowlist gets -32602 rather than being quietly run — naming an agent in a protocol is not authorisation.

Error shapes ​

codemeaning
-32600jsonrpc is not "2.0"
-32601unknown method
-32602bad params (no text part, agent not allowlisted, delegation without sessionId)
-32001task not found
-32002task already finished, cannot cancel

Boundaries ​

  • No streaming: poll the task; message/stream returns -32601.
  • One contextId is one interview; use different contexts for concurrency.
  • The A2A entry point is subject to the same profile auth and concurrency cap as the UI.

Local-first · inference egresses on demand · fully traceable