Guide · RabbitMQ

Agent-to-Agent Messaging over AMQP and RabbitMQ

The Agent2Agent (A2A) protocol defines how independent agents describe themselves, hand each other tasks and stream results back. Its standard bindings run over HTTP and gRPC, and it does not define an AMQP binding. This guide covers what A2A specifies, why a broker helps between agents, and a pattern for carrying A2A messages on RabbitMQ over AMQP 0-9-1 or AMQP 1.0. It is a pattern, not an official binding. Protocol details are from A2A specification 1.0.0 and broker behavior from the RabbitMQ 4.3 documentation, both checked on 10 October 2026.

Tyler Eastridge

By Tyler Eastridge, Head of Operations

LinkedIn · Updated

8 min read9 sections
On this page
A2A over AMQP in one paragraph

A2A over AMQP in one paragraph

A2A gives agents a shared data model (Agent Cards, Tasks, Messages, Parts and Artifacts) and eleven operations, carried by three standard bindings: JSON-RPC 2.0, gRPC and HTTP+JSON/REST. The specification allows custom bindings, provided they support every operation, keep the data model, map every error and are declared in the Agent Card under a URI. On RabbitMQ the workable pattern is a topic exchange routed by skill, a quorum queue per agent, a durable reply queue per client with correlation IDs, A2A identifiers in message properties and headers, and a stream bound beside it all as the audit log. Secure it with a RabbitMQ user per agent, a virtual host per trust boundary, permissions scoped to each agent's own queues and skills, TLS, and signed message bodies.

What A2A is

A2A is an open protocol for communication between agents that cannot see inside each other, because they come from different teams, frameworks or vendors. It was originally developed by Google and donated to the Linux Foundation, and the current release of the specification is 1.0.0. The project describes it as complementary to MCP: MCP equips one agent with the tools and data it needs, and A2A lets that agent work with other agents.

The parts of A2A that travel on the wire

An Agent Card is a JSON document describing an agent's identity, skills, service endpoints and authentication requirements. The standard place to publish it is /.well-known/agent-card.json; clients can also find cards through a registry or by direct configuration. Cards may be signed with JSON Web Signature over an RFC 8785 canonical form.

Work is a Task, with an ID, a context ID that groups related interactions, a status, artifacts and history. Its states include submitted, working, completed, failed, canceled and rejected, plus two that matter for agents: input-required and auth-required, which is how a task pauses for a person or a credential. A Message carries a message ID, a role and one or more Parts (text, file or structured data), and results come back as Artifacts built from Parts. The specification defines eleven operations: sending a message, sending one with streamed updates, getting, listing, canceling and subscribing to tasks, four operations for push notification configuration, and fetching the extended Agent Card.

What the spec defines for transport, and what it leaves open

A2A 1.0.0 specifies three protocol bindings: JSON-RPC 2.0 over HTTP(S), gRPC, and HTTP+JSON/REST. On the HTTP bindings, streaming uses Server-Sent Events, and push notifications are HTTP POST requests to a webhook the client supplies. Production deployments must use encrypted transport.

The specification has no AMQP or message broker binding. It does have a section on custom bindings: implementers may create them, but a custom binding must support all the core operations, keep data structures functionally equivalent to the A2A data model, map every A2A error type, implement the authentication schemes the Agent Card declares, and be declared in the Agent Card's supportedInterfaces with a URI that identifies it. If it streams, it should document event ordering, reconnection and how a stream ends. Everything below is a pattern for building that on RabbitMQ. Until it is written up as a binding that meets those rules, run it as an internal transport behind agents that also expose a standard binding to outside callers.

Why put a broker between agents

Agent-to-agent calls look like service calls but behave like jobs: they run for minutes, pause for input and fail in ways worth retrying. A broker fits that shape. Requests are asynchronous, so a caller does not hold a connection open through a long task. They are durable on quorum queues, so a task survives the receiving agent restarting. Discovery becomes routing: a client publishes to a skill, and whichever agent has bound that skill receives it, without the client knowing its address. Results return to a reply queue the client already reads, so no client has to expose a webhook for push notifications. And every request and reply can be copied to a stream, giving an audit trail of which agent asked what, and what came back.

A topology for A2A on AMQP 0-9-1

One workable mapping, kept close to the JSON-RPC binding so the payloads stay standard A2A:

A2A conceptRabbitMQ construct
Addressing by skillTopic exchange a2a.requests, routing key <skill>.<agent>, for example billing.refund-agent
An agent's inboxOne quorum queue per agent, bound with the keys for its skills, consumed with manual acknowledgements and a per-consumer prefetch
Request bodyThe JSON-RPC 2.0 request object the JSON-RPC binding defines, such as a SendMessage call, with content_type set to application/json
messageIdThe AMQP message_id, which doubles as the idempotency key
Request and response pairingreply_to naming the client's reply queue, and a unique correlation_id per request
Reply pathThe agent publishes to a topic exchange a2a.replies with the reply_to value as routing key; each client's durable reply queue is bound under its own name
taskId, contextId and service parametersMessage headers such as a2a-task-id, a2a-context-id and a2a-version, so routing and tracing need not parse the body
Streaming updatesEach task status and artifact update event published in order on the reply path with the request's correlation ID; the client treats a terminal or interrupted task state as the end of the stream
Agent CardsServed at the well-known HTTP URL, with the AMQP interface listed in supportedInterfaces; a copy can also be published to a stream for agents that discover over the broker

Use a durable quorum reply queue per client for anything long-running. Direct reply-to (amq.rabbitmq.reply-to) is lighter, but its replies are not stored and are lost if the requester disconnects, which suits quick lookups and not tasks that run for minutes. Keep ordering simple: RabbitMQ preserves order for messages published on one channel through one exchange and one queue to one consumer, so an agent that publishes a task's updates on one channel, into a reply queue with one consumer, delivers them in the order it sent them.

The AMQP 1.0 option

RabbitMQ has supported AMQP 1.0 natively since 4.0. Its address format v2 lets a client send to /exchanges/a2a.requests/billing.refund-agent or straight to /queues/<queue>, which maps directly onto the topology above and suits agents written in languages with a good AMQP 1.0 client. One property matters for agents in particular: RabbitMQ keeps the AMQP 1.0 bare message immutable, so a sender can sign the body, properties and application properties, and the receiver can verify the signature after the message has passed through the broker.

Streams as the audit log

Declare a stream and bind it with # to both a2a.requests and a2a.replies, and every A2A request and update is kept in order beside the queues the agents consume. Set retention to match your audit requirement with max-age or max-length-bytes, and replay a disputed task by attaching at a timestamp. Because a stream is read without removing messages, compliance tooling, evaluation jobs and debugging sessions can all read the same history independently.

Security: identity, isolation and signing

  • One RabbitMQ user per agent. Shared credentials make the audit trail meaningless. Authenticate with passwords, X.509 client certificates through the EXTERNAL mechanism, or the OAuth 2.0 backend, and never use guest, which RabbitMQ only accepts over loopback anyway.
  • A virtual host per trust boundary. Agents from different teams, tenants or vendors belong in separate virtual hosts, and permissions are granted per virtual host.
  • Narrow permissions. Give each user configure, write and read patterns that cover only its own queues and the exchanges it publishes to. Topic permissions add a routing-key check when publishing to a topic exchange and on AMQP 0-9-1 bindings, and patterns can use {username}, so an agent can be limited to the keys for its own skills.
  • Validated sender identity. When a publisher sets the user_id property, RabbitMQ requires it to match the connection's user, so a receiving agent can trust who sent a request. Do not give agents the impersonator tag.
  • TLS on every connection. Use TLS on port 5671 with verify_peer and fail_if_no_peer_cert for mutual TLS. The A2A specification requires encrypted transport in production, and a broker hop should not be the exception.
  • Message signing. TLS protects the hop, not the message. Sign request and response bodies with each agent's key, as JWS for example, and verify before acting; on AMQP 1.0, RabbitMQ leaves the signed sections untouched. Sign Agent Cards with JWS as the A2A specification describes.

How Solace Agent Mesh and Kafka-based approaches compare

Solace Agent Mesh is an open-source (Apache 2.0) framework for multi-agent systems, built on Google's Agent Development Kit and running on the Solace event broker. It carries A2A as JSON-RPC 2.0 over broker topics, with request topics shaped like <namespace>/a2a/v1/agent/request/<agentName>. Agents publish their cards on discovery topics at startup, replies are routed through a replyTo user property, and each task carries a signed JWT holding the user's identity and scopes. Solace documents that topic layout as Agent Mesh's own wire format.

Kafka-based approaches treat agent messages as events on topics. Confluent's Streaming Agents run on Confluent Cloud for Apache Flink and can call MCP tools and external A2A agents as tools. Where a Kafka platform is already the system of record for events, putting agent traffic on it keeps that history in one place.

On RabbitMQ, the RabbitMQ documentation does not define an A2A binding, so the pattern above is assembled from standard features: topic exchanges, quorum queues, reply-to and streams. The choice between the three usually follows what the estate already runs and whether the traffic is mostly task hand-off, where per-message acknowledgement, delivery limits and priorities help, or mostly event streaming, where retention and replay come first.

Frequently asked questions

Does A2A support RabbitMQ or AMQP?

Not as a standard binding. A2A 1.0.0 defines JSON-RPC 2.0, gRPC and HTTP+JSON/REST bindings and allows custom bindings that meet its rules. Carrying A2A over RabbitMQ is a pattern you implement: standard A2A JSON-RPC payloads in AMQP messages, with reply-to and correlation IDs for responses.

Can A2A run over Kafka?

Not through a standard binding either. Kafka-based platforms connect to A2A agents through their own integrations; Confluent's Streaming Agents, for example, can call external A2A agents as tools.

What is an agent mesh?

A layer where agents find and call each other through shared messaging infrastructure, usually a broker, instead of point-to-point calls. Solace uses the name for its open-source Agent Mesh framework, which carries A2A over the Solace event broker.

What is the difference between A2A and MCP?

MCP connects an agent to tools and data; A2A connects agents to other agents. The A2A project describes the two as complementary.

Should A2A responses use RabbitMQ direct reply-to?

Only for short calls where losing a reply is acceptable. Direct reply-to does not store replies and drops them if the requester disconnects, so long-running A2A tasks need a durable reply queue.

How do I secure agent-to-agent messaging on RabbitMQ?

Use a RabbitMQ user per agent, a virtual host per trust boundary, permissions and topic permissions limited to each agent's own queues and skills, a validated user_id, TLS with client certificates, and signed message bodies.

RabbitMQ services

Where this gets done

The work behind this page, run by the same engineers who wrote it.

More resources

Other RabbitMQ guides, comparisons and research

From the blog

Recent RabbitMQ articles

Next step

Need this done on your cluster?

AceMQ's senior RabbitMQ engineers support 130+ enterprise clients in 26+ countries under a 15-minute emergency SLA, with direct escalation to the RabbitMQ core team.