Repository navigation
[Binding proposal] A2A over MQTT: broker-neutral discovery and task exchange (new protocolBinding value) #2523
RiemannChow
started this conversation in
Ideas
Replies: 1 comment 1 reply
|
One practical discovery complement is a read-only solution registry: agents can inspect recent solved-problem records before attempting task exchange. Solvettle exposes an official Agent Card plus A2A JSON-RPC and a read-only MCP endpoint; no key is needed to read or search. If useful for interoperability testing, the agent guide explains the one-step agent registration path (a short admission check, then register) for agents that want to publish a real solved case: https://solvettle.com/agents |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Proposed venue: a2aproject/A2A Discussions → Ideas (extensions / protocol-binding proposals)
Requested decision: recognize
A2A-over-MQTT(alias:MQTT) as a new well-knownprotocolBindingvalue, or endorse the versioned URI identifier below as the canonical custom binding identifier.Reference specification: https://github.com/RiemannChow/GroveMQ/blob/main/docs/design/A2A_OVER_MQTT_SPEC.md
Reference implementation: https://github.com/RiemannChow/GroveMQ (P0–P2 merged into
main)1. Summary
A2A 1.0 deliberately separates the canonical data model and abstract operations from their wire mappings, and defines
AgentInterface.protocolBindingas an open string with three core values:JSONRPC,GRPC, andHTTP+JSON. Section 12 explicitly allows custom bindings, and Section 5.8 recommends a URI as the custom binding identifier.We propose A2A over MQTT as a Layer-3 protocol binding: a broker-neutral mapping of the A2A data model, operations, discovery, and task lifecycle onto MQTT 5.0. The contract is implemented and exercised in GroveMQ and is compatible with the
$a2a/v1/discovery/...topic family used by the EMQX 6.2 A2A Registry.We ask the TSC/community to:
A2A-over-MQTT(withMQTTas a compatibility alias) to the well-knownprotocolBindingvalues documented forAgentInterface, or confirm that the URI below is the recommended identifier for this binding.$a2a/...topic family and thea2a-*MQTT User Properties described here as the interoperability baseline.Canonical custom-binding URI (per §5.8):
The document carries a
v1contract marker in its header; any breaking change requires a new versioned document/URI, as §5.8 requires.2. Motivation
online/offline/lwt).Response TopicandCorrelation Dataisolate concurrent SDK calls and work through NAT/firewalls without inbound HTTP endpoints.$share/...) provide load balancing across agent instances.3. Identifier requested
protocolBindingvalueA2A-over-MQTTMQTTJSONRPC(only on MQTT endpoints; JSON-RPC envelope)https://github.com/RiemannChow/GroveMQ/blob/main/docs/design/A2A_OVER_MQTT_SPEC.mdprotocolVersion1.0application/a2a+json(accepted by the reference gateway:application/json)Example Agent Card interface entry:
{ "url": "mqtt://broker.example.com:1883", "protocolBinding": "A2A-over-MQTT", "protocolVersion": "1.0" }Simplified EMQX-style cards (
name,description,version,url,skills) are accepted in a compatibility/loose-validation mode and normalized into a full A2A 1.0 card by the registry layer.4. Topic hierarchy
All A2A topics use the reserved
$a2a/prefix. Per MQTT rules,#and+wildcards MUST NOT match topics starting with$; an explicit$a2a/...filter is required. Implementations MUST enforce this in every matcher (subscription routing, retained delivery, and persistence backends).4.1 Discovery (retained)
^[A-Za-z0-9._-]+$and is non-empty.RETAIN=1, payload = Agent Card JSON.RETAIN=1to the same topic.{org_id}/{unit_id}/{agent_id}; mismatched publishes are rejected (reference implementation uses PUBACK/PUBREC reason code0x87).RETAIN=1and broker-injected status properties.4.2 Tasks and messages
Response Topic;Correlation DatacarriestaskIdormessageId.statusand results toartifacts.$share/{pool_id}/$a2a/v1/{org}/{unit}/{agent}/requests.5. Conformance with the A2A custom-binding guidelines (§12)
5.1 All core operations (§12.1)
Every core operation is encoded as a JSON-RPC 2.0-style envelope in the PUBLISH payload and mapped to the request topic above; responses use the PUBLISH's
Response TopicandCorrelation Data..../requests, methodSendMessage; reply onResponse Topic.../requests, methodSendStreamingMessage; events ontasks/{id}/statusandtasks/{id}/artifacts.../requests, methodGetTask.../requests, methodListTasks.../requests, methodCancelTask.../requests, methodSubscribeToTask; stream delivered ontasks/{id}/status(first event is the current task).../requestswith methodsCreateTaskPushNotificationConfig/GetTaskPushNotificationConfig/ListTaskPushNotificationConfigs/DeleteTaskPushNotificationConfig; native MQTT subscriptions satisfy delivery, so the config operations acknowledge with the stored config or an empty result.../requests, methodGetExtendedAgentCardMethod names follow the PascalCase convention of the JSON-RPC binding (§9.1), so a client that can speak the JSON-RPC envelope can be adapted by changing only the transport.
SDK method aliases (for example
sendMessage,getTask) are normalized to canonical A2A 1.0 method names by the reference implementation.5.2 Data type mappings (§12.2)
Content Type: application/a2a+json; unknown extension fields are preserved.Part.bytesvalues use base64; enumerations use their string names; JSON field names follow the specification'slowerCamelCaseconvention.Messagecarries communication/control only. Task outputs MUST be carried inArtifactobjects, never inMessage.Partremains a one-of (text/raw/url/data).5.3 Service parameters (§12.3)
a2a-prefixed, as required by §3.2.6). Unlike HTTP headers, MQTT User Property keys are case-sensitive.a2a-status,a2a-status-source,a2a-error,A2A-Version,A2A-Extensions.a2a-service-parametersobject inside the envelope; full conformance requires MQTT 5.0.5.4 Error mapping (§12.4)
errorobject with A2A error codes and names (e.g.TaskNotFoundError,TaskNotCancelableError) in the response payload.a2a-errorcarrying the A2A error name.a2a-errorproperty is authoritative; reason codes only indicate broad classes.5.5 Streaming support (§12.5)
statusandartifactstopics at QoS 1; per-task event order follows MQTT ordering guarantees on the publishing session.COMPLETED,FAILED,CANCELED,REJECTED) emitfinal: true; consumers MUST close the stream subscription.INPUT_REQUIREDandAUTH_REQUIREDare interruptible, not terminal.Get Task; status topics are not assumed retained.6. Status and discovery properties
Response Topic+Correlation Dataa2a-status=online|offline|lwta2a-status-source=broker|agent|lwtA2A-Version=1.0A2A-Extensions(comma-separated URIs)Content Type=application/a2a+jsona2a-error7. Interoperability and implementation status
The contract is implemented in GroveMQ and merged into
main:$topics excluded from all wildcard matchers; retained User Properties persisted across memory/bbolt backends; discovery topic ↔ client ID identity binding enforced.The discovery topic family, retained-card semantics, and status properties follow EMQX 6.2's A2A Registry. One known compatibility note: listeners with a configured mountpoint are incompatible with the registry unless the mountpoint is exactly one topic level.
8. Questions for the community / TSC
A2A-over-MQTTbe added as a well-known shortprotocolBindingvalue, or should custom bindings be URI-only per §5.8 (with the URI above used here)?a2a-status/a2a-status-sourcebe standardized as A2A service parameters in the core specification, rather than binding-specific properties?Happy to turn this into a spec PR (new binding section +
AgentInterfacevalue documentation) once there is agreement on the identifier and scope.All reactions