Two distinct protocols worth adapters, both natural fits for the #374 headless-engine architecture (serve is already the 'local protocol → persistent engine' seam):
A2A — Agent2Agent (a2aproject/A2A)
Google-originated, donated to the Linux Foundation; TSC includes Google, Microsoft, AWS, Cisco, Salesforce, SAP, IBM. It standardizes AGENT↔AGENT collaboration — complementary to MCP, which standardizes agent↔tool. An A2A client agent delegates a task to an A2A server agent; that server may internally use MCP tools (graff already does).
Core shapes map almost 1:1 onto what graff serve (schema 0.10) already has:
- Agent Card (
/.well-known/agent-card.json): identity, skills, endpoint, auth, streaming capability — graff would advertise its personas/niches as skills.
- Task: stateful unit with a lifecycle — maps to a serve session/turn.
- Message/Part: user/agent turns with text/bytes/structured parts — maps to the event stream.
- Artifact: concrete outputs — maps to worktree diffs, reports, files.
- Transport: JSON-RPC 2.0 over HTTP(S) + SSE streaming — serve already does resumable seq-id streams; A2A adds resubscription semantics we largely have.
Minimal server: agent-card endpoint + SendMessage/SendStreamingMessage JSON-RPC handlers + a TaskStore (serve's durable sessions). This would let any A2A-speaking orchestrator delegate work to a graff instance as a peer agent — including OTHER graffs: cross-machine subagent fan-out with the same consent/cost policies the local spawner enforces.
ACP — Agent Client Protocol (separate thing, often confused)
ACP is Zed Industries' editor↔agent protocol: an IDE drives a local agent over stdio (JSON-RPC), rendering its turns/diffs natively. grok-build ships an 'agent mode' speaking ACP for IDE integration. For graff this is a second thin adapter over the same engine — the --json protocol is already stdio-JSON shaped, so an ACP adapter is mostly message-shape translation, and it would put graff inside Zed and other ACP hosts for free.
Suggested order: ACP first (small, immediate reach into editors), A2A second (bigger, unlocks agent-to-agent federation). Both underline #374: neither should touch the core — pure adapters over serve/--json.
🤖 Generated with Claude Code
https://claude.ai/code/session_01QbsV84fdmf39Bh2RF8LdPs
Two distinct protocols worth adapters, both natural fits for the #374 headless-engine architecture (serve is already the 'local protocol → persistent engine' seam):
A2A — Agent2Agent (a2aproject/A2A)
Google-originated, donated to the Linux Foundation; TSC includes Google, Microsoft, AWS, Cisco, Salesforce, SAP, IBM. It standardizes AGENT↔AGENT collaboration — complementary to MCP, which standardizes agent↔tool. An A2A client agent delegates a task to an A2A server agent; that server may internally use MCP tools (graff already does).
Core shapes map almost 1:1 onto what
graff serve(schema 0.10) already has:/.well-known/agent-card.json): identity, skills, endpoint, auth, streaming capability — graff would advertise its personas/niches as skills.Minimal server: agent-card endpoint + SendMessage/SendStreamingMessage JSON-RPC handlers + a TaskStore (serve's durable sessions). This would let any A2A-speaking orchestrator delegate work to a graff instance as a peer agent — including OTHER graffs: cross-machine subagent fan-out with the same consent/cost policies the local spawner enforces.
ACP — Agent Client Protocol (separate thing, often confused)
ACP is Zed Industries' editor↔agent protocol: an IDE drives a local agent over stdio (JSON-RPC), rendering its turns/diffs natively. grok-build ships an 'agent mode' speaking ACP for IDE integration. For graff this is a second thin adapter over the same engine — the --json protocol is already stdio-JSON shaped, so an ACP adapter is mostly message-shape translation, and it would put graff inside Zed and other ACP hosts for free.
Suggested order: ACP first (small, immediate reach into editors), A2A second (bigger, unlocks agent-to-agent federation). Both underline #374: neither should touch the core — pure adapters over serve/--json.
🤖 Generated with Claude Code
https://claude.ai/code/session_01QbsV84fdmf39Bh2RF8LdPs