You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Google's A2A (Agent-to-Agent) protocol is an open standard (Apache 2.0, under the Linux Foundation) for inter-agent communication — complementary to MCP. While MCP answers "what tools can I use?", A2A answers "who can help me?" It enables agents built on different frameworks to discover each other, negotiate capabilities, and collaborate on tasks over standard HTTP.
This was inspired by an article on building a cybersecurity agent swarm that used A2A + MCP together: MCP as an agent registry, A2A for actual inter-agent task delegation. The architecture demonstrates the complementary power of both protocols — something Hermes is uniquely positioned to support since we already have a production-grade MCP client (tools/mcp_tool.py).
A2A would give Hermes the ability to participate in multi-agent networks — calling remote agents (any framework, any language) and exposing itself as an A2A-discoverable agent for other systems to call.
Research Findings
How A2A Works
A2A uses a three-layer architecture: Protobuf data model → Abstract operations → Protocol bindings (JSON-RPC 2.0 over HTTP, with optional gRPC and SSE streaming).
Core concepts:
Agent Cards — JSON documents served at /.well-known/agent.json. The "business card" of an agent: name, description, URL, skills, capabilities (streaming, push notifications), authentication schemes. This is how agents discover each other.
Tasks — The unit of work. Lifecycle: SUBMITTED → WORKING → {INPUT_REQUIRED, AUTH_REQUIRED} → {COMPLETED, FAILED, CANCELED, REJECTED}. Tasks support multi-turn interactions (agent asks for clarification), streaming results, and long-running async patterns.
Messages & Parts — Communication is via Messages (role: user/agent) containing Parts (text, raw bytes, URLs, or structured JSON data). Results are delivered as Artifacts (also composed of Parts).
JSON-RPC 2.0 — All communication uses standard JSON-RPC over HTTP POST. Methods include message/send, message/stream (SSE), tasks/get, tasks/cancel.
froma2a.server.agent_executionimportAgentExecutorfroma2a.server.request_handlersimportDefaultRequestHandlerfroma2a.server.appsimportA2AStarletteApplicationfroma2a.server.tasksimportInMemoryTaskStoreclassMyExecutor(AgentExecutor):
asyncdefexecute(self, context, event_queue):
updater=TaskUpdater(event_queue, context.task_id, context.context_id)
updater.start_work()
result="Hello from my agent"updater.update_status(TaskState.completed,
message=updater.new_agent_message(parts=[TextPart(text=result)]))
handler=DefaultRequestHandler(agent_executor=MyExecutor(), task_store=InMemoryTaskStore())
app=A2AStarletteApplication(agent_card=card, http_handler=handler)
uvicorn.run(app.build(), host='0.0.0.0', port=9999)
Client side (calling other agents):
froma2a.clientimportA2AClientasyncwithhttpx.AsyncClient() ashc:
client=awaitA2AClient.get_client_from_agent_card_url(hc, 'http://remote:9999')
response=awaitclient.send_message(request)
# or streaming:asyncforeventinclient.send_message_streaming(request):
print(event)
Key Design Decisions
Framework-agnostic: Any A2A agent can talk to any other, regardless of language or framework. This is the key differentiator from local delegation.
Opaque execution: Unlike MCP tools (schema-defined inputs/outputs), A2A agents are black boxes — you describe what you need in natural language, and they decide how to accomplish it.
Built-in multi-turn: The INPUT_REQUIRED state enables agents to ask clarifying questions mid-task, unlike simple request-response patterns.
IBM ACP merger (Aug 2025): IBM's competing Agent Communication Protocol was merged into A2A, making it the de facto standard.
A2A vs MCP — Complementary, Not Competing
Aspect
MCP
A2A
Purpose
Agent-to-Tool
Agent-to-Agent
Discovery
Tool schemas
Agent Cards
Interaction
Deterministic function calls
Natural language tasks
Statefulness
Stateless per call
Stateful task lifecycle
Framework coupling
Client must understand schema
Framework-agnostic
Current State in Hermes Agent
What we have:
MCP client (tools/mcp_tool.py, 1047 lines) — Full MCP client with stdio + HTTP transports, auto-discovery, auto-reconnect. Production-ready.
Local delegation (tools/delegate_tool.py, 560 lines) — Spawns child AIAgent instances in-process. Up to 3 concurrent, max depth 2. Local only.
Cross-CLI delegation skills (claude-code, codex, hermes-agent) — Run external agent CLIs via terminal.
What's missing:
No A2A protocol support — zero references in codebase
No remote agent communication over network
No agent discovery mechanism for external agents
Local delegation is in-process only — can't span machines or frameworks
No way for external systems to call Hermes as an agent
Framework interoperability: Hermes could collaborate with agents built in LangChain, CrewAI, Google ADK, AutoGen, or any A2A-compliant framework — not just other Hermes instances
Network-spanning delegation: Unlike local delegate_tool, A2A works across machines, clouds, and organizations
Industry standard: A2A is the dominant agent protocol (Linux Foundation, IBM merger, 100+ adopters). Supporting it positions Hermes well
Complementary to MCP: We already have MCP client; adding A2A completes the picture (tools + agents)
Minimal dependency: a2a-sdk is lightweight (httpx, protobuf). Server mode adds starlette/uvicorn but those are optional
Cons / Risks
Pre-1.0 SDK: v0.3.24 as of March 2026. Breaking changes possible before GA (expected mid-2026). Mitigation: pin version, track spec changes
Complexity: Another protocol to maintain alongside MCP. Mitigation: modular architecture, shared patterns with mcp_tool.py
Overview
Google's A2A (Agent-to-Agent) protocol is an open standard (Apache 2.0, under the Linux Foundation) for inter-agent communication — complementary to MCP. While MCP answers "what tools can I use?", A2A answers "who can help me?" It enables agents built on different frameworks to discover each other, negotiate capabilities, and collaborate on tasks over standard HTTP.
This was inspired by an article on building a cybersecurity agent swarm that used A2A + MCP together: MCP as an agent registry, A2A for actual inter-agent task delegation. The architecture demonstrates the complementary power of both protocols — something Hermes is uniquely positioned to support since we already have a production-grade MCP client (
tools/mcp_tool.py).A2A would give Hermes the ability to participate in multi-agent networks — calling remote agents (any framework, any language) and exposing itself as an A2A-discoverable agent for other systems to call.
Research Findings
How A2A Works
A2A uses a three-layer architecture: Protobuf data model → Abstract operations → Protocol bindings (JSON-RPC 2.0 over HTTP, with optional gRPC and SSE streaming).
Core concepts:
Agent Cards — JSON documents served at
/.well-known/agent.json. The "business card" of an agent: name, description, URL, skills, capabilities (streaming, push notifications), authentication schemes. This is how agents discover each other.Tasks — The unit of work. Lifecycle:
SUBMITTED → WORKING → {INPUT_REQUIRED, AUTH_REQUIRED} → {COMPLETED, FAILED, CANCELED, REJECTED}. Tasks support multi-turn interactions (agent asks for clarification), streaming results, and long-running async patterns.Messages & Parts — Communication is via Messages (role: user/agent) containing Parts (text, raw bytes, URLs, or structured JSON data). Results are delivered as Artifacts (also composed of Parts).
JSON-RPC 2.0 — All communication uses standard JSON-RPC over HTTP POST. Methods include
message/send,message/stream(SSE),tasks/get,tasks/cancel.Python SDK (
pip install "a2a-sdk[http-server]", Python 3.10+):Server side (exposing an agent):
Client side (calling other agents):
Key Design Decisions
INPUT_REQUIREDstate enables agents to ask clarifying questions mid-task, unlike simple request-response patterns.A2A vs MCP — Complementary, Not Competing
Current State in Hermes Agent
What we have:
tools/mcp_tool.py, 1047 lines) — Full MCP client with stdio + HTTP transports, auto-discovery, auto-reconnect. Production-ready.tools/delegate_tool.py, 560 lines) — Spawns child AIAgent instances in-process. Up to 3 concurrent, max depth 2. Local only.What's missing:
Related issues:
Implementation Plan
Skill vs. Tool Classification
This should be a tool because:
What We'd Need
tools/a2a_tool.py— A2A client toolsa2a-sdk[http-server](pulls in httpx, starlette, uvicorn, protobuf)a2a_agentsin~/.hermes/config.yamla2a_server.pyfor exposing Hermes as A2A agenttests/tools/test_a2a_tool.pyPhased Rollout
Phase 1: A2A Client — Call Remote Agents
a2a_discovertool: fetch and display an Agent Card from any URLa2a_calltool: send a message to a remote A2A agent, get the resulta2a_agentsin config.yaml) or direct URLa2atoolset, add to_HERMES_CORE_TOOLSmcp_tool.pypatterns (background asyncio loop, thread-safe, credential handling)Phase 2: A2A Server — Expose Hermes as an Agent
AgentExecutorthat wraps HermesAIAgentPhase 3: Multi-Agent Orchestration Patterns
delegate_toolfor hybrid local+remote workflowsPros & Cons
Pros
delegate_tool, A2A works across machines, clouds, and organizationsa2a-sdkis lightweight (httpx, protobuf). Server mode adds starlette/uvicorn but those are optionalCons / Risks
mcp_tool.pyOpen Questions
_HERMES_CORE_TOOLS(always available) or opt-in via config?References