Search before asking
Feature Request
Background
The A2A (Agent-to-Agent) protocol is an open standard for agent interoperability. EMQX has implemented a production-grade A2A Registry (emqx_a2a_registry) that provides Agent Card management, discovery, and status tracking via MQTT retained messages. EventMesh's current A2A implementation only includes a JSON-RPC to CloudEvent protocol adaptor and MCP message models, missing the core Agent Card lifecycle management defined by the A2A specification.
Current State
EventMesh's existing A2A implementation has the following gaps compared to the A2A specification and EMQX's reference:
| Feature |
EMQX |
EventMesh (Before) |
| Agent Card Schema & Model |
Full JSON Schema + Erlang maps |
None |
| Agent Card Registry (CRUD) |
emqx_a2a_registry with retained messages |
None (stub pass-through service) |
| Agent Discovery (Topic-based) |
$a2a/v1/discovery/{org}/{unit}/{agent} |
None |
| Hierarchical Agent ID |
org_id / unit_id / agent_id |
None |
| Agent Status (online/offline) |
lookup_agent_status via MQTT client state |
None |
| Card Validation |
JSON Schema validation with toggle |
None |
| Security Schemes |
Full (APIKey / OAuth2 / mTLS / OpenID / HTTP) |
None |
| Agent Capabilities & Skills |
Full model per A2A spec |
String constants only |
| REST API for Card Management |
/a2a/cards/* |
None |
Proposed Changes
-
Agent Card Java Model — Add POJOs matching the A2A Agent Card JSON Schema (AgentCard, AgentInterface, AgentProvider, AgentCapabilities, AgentSkill, AgentCardSignature, SecurityScheme with all OAuth flow subtypes, SecurityRequirement)
-
Agent Card JSON Schema — Port agent_card_schema.json from EMQX as a classpath resource for validation
-
Agent Card Validator — JSON Schema-based validation with configurable toggle (when disabled, only validates JSON object structure)
-
Agent Identity — Hierarchical identity model (orgId/unitId/agentId) with discovery topic construction (a2a/v1/discovery/{orgId}/{unitId}/{agentId}), topic parsing, wildcard query matching, and ID format validation (^[A-Za-z0-9._-]+$)
-
A2A Protocol Constants — Extend with Agent Card operations (agent/card/register, agent/card/delete, agent/card/list, agent/card/update), status constants, CloudEvent extension keys, and discovery topic components
-
Enhanced A2A Protocol Adaptor — Add Agent Card operation routing with discovery topic resolution, card validation during registration, and status metadata extensions (a2astatus, a2astatussource)
-
A2A Publish Subscribe Service — Replace stub with full Agent Card Registry (in-memory ConcurrentHashMap, CRUD operations, agent status tracking, event metadata augmentation for discovery topics)
-
A2A Card HTTP Handler — REST API matching EMQX's pattern:
GET /a2a/cards/list — list cards with query filters
GET /a2a/cards/card/{org_id}/{unit_id}/{agent_id} — get specific card
POST /a2a/cards/card/{org_id}/{unit_id}/{agent_id} — register card
DELETE /a2a/cards/card/{org_id}/{unit_id}/{agent_id} — delete card
-
Demo & Dependencies — Add AgentCardDemo example; add json-schema-validator dependency
Impact Analysis
- No impact on existing EventMesh functionality. All new code is additive — new model classes, new utilities, and new handlers. Modified files (
A2AProtocolConstants, EnhancedA2AProtocolAdaptor, A2APublishSubscribeService) maintain backward compatibility: existing message routing paths are unchanged, and the process() method remains a pass-through for non-A2A-discovery events.
- All existing tests pass (
eventmesh-runtime, eventmesh-protocol-a2a, core modules).
References
Are you willing to submit PR?
Code of Conduct
Search before asking
Feature Request
Background
The A2A (Agent-to-Agent) protocol is an open standard for agent interoperability. EMQX has implemented a production-grade A2A Registry (
emqx_a2a_registry) that provides Agent Card management, discovery, and status tracking via MQTT retained messages. EventMesh's current A2A implementation only includes a JSON-RPC to CloudEvent protocol adaptor and MCP message models, missing the core Agent Card lifecycle management defined by the A2A specification.Current State
EventMesh's existing A2A implementation has the following gaps compared to the A2A specification and EMQX's reference:
emqx_a2a_registrywith retained messages$a2a/v1/discovery/{org}/{unit}/{agent}org_id / unit_id / agent_idlookup_agent_statusvia MQTT client state/a2a/cards/*Proposed Changes
Agent Card Java Model — Add POJOs matching the A2A Agent Card JSON Schema (
AgentCard,AgentInterface,AgentProvider,AgentCapabilities,AgentSkill,AgentCardSignature,SecuritySchemewith all OAuth flow subtypes,SecurityRequirement)Agent Card JSON Schema — Port
agent_card_schema.jsonfrom EMQX as a classpath resource for validationAgent Card Validator — JSON Schema-based validation with configurable toggle (when disabled, only validates JSON object structure)
Agent Identity — Hierarchical identity model (
orgId/unitId/agentId) with discovery topic construction (a2a/v1/discovery/{orgId}/{unitId}/{agentId}), topic parsing, wildcard query matching, and ID format validation (^[A-Za-z0-9._-]+$)A2A Protocol Constants — Extend with Agent Card operations (
agent/card/register,agent/card/delete,agent/card/list,agent/card/update), status constants, CloudEvent extension keys, and discovery topic componentsEnhanced A2A Protocol Adaptor — Add Agent Card operation routing with discovery topic resolution, card validation during registration, and status metadata extensions (
a2astatus,a2astatussource)A2A Publish Subscribe Service — Replace stub with full Agent Card Registry (in-memory
ConcurrentHashMap, CRUD operations, agent status tracking, event metadata augmentation for discovery topics)A2A Card HTTP Handler — REST API matching EMQX's pattern:
GET /a2a/cards/list— list cards with query filtersGET /a2a/cards/card/{org_id}/{unit_id}/{agent_id}— get specific cardPOST /a2a/cards/card/{org_id}/{unit_id}/{agent_id}— register cardDELETE /a2a/cards/card/{org_id}/{unit_id}/{agent_id}— delete cardDemo & Dependencies — Add
AgentCardDemoexample; addjson-schema-validatordependencyImpact Analysis
A2AProtocolConstants,EnhancedA2AProtocolAdaptor,A2APublishSubscribeService) maintain backward compatibility: existing message routing paths are unchanged, and theprocess()method remains a pass-through for non-A2A-discovery events.eventmesh-runtime,eventmesh-protocol-a2a, core modules).References
apps/emqx_a2a_registry/Are you willing to submit PR?
Code of Conduct