Back to A2ui

Transports (Message Passing)

docs/concepts/transports.md

0.92.2 KB
Original Source

Transports (Message Passing)

Transports deliver A2UI messages from agents to clients. A2UI is transport-agnostic—use any method that can send JSON.

The actual component rendering is done by the renderer, and the agents are responsible for generating the A2UI messages. Getting the messages from the agent to the client is the job of the transport.

How It Works

Agent → Transport → Client Renderer

A2UI defines a sequence of JSON messages. The transport layer is responsible for delivering this sequence from the agent to the client. A common transport mechanism is a stream using a format like JSON Lines (JSONL), where each line is a single A2UI message.

Available Transports

TransportStatusUse Case
A2A Protocol✅ StableMulti-agent systems, enterprise meshes
AG UI✅ StableFull-stack React applications
REST API📋 PlannedSimple HTTP endpoints
WebSockets💡 ProposedReal-time bidirectional
SSE (Server-Sent Events)💡 ProposedWeb streaming

A2A Protocol

The Agent2Agent (A2A) protocol provides secure, standardized agent communication. An A2A extension provides easy integration with A2UI.

Benefits:

  • Security and authentication built-in
  • Bindings for many message formats, auth, and transport protocols
  • Clean separation of concerns

If you are using A2A, this should be nearly automatic.

TODO: Add a detailed guide.

See: A2A Extension Specification

AG UI

AG UI translates from A2UI messages to AG UI messages, and handles transport and state sync automatically.

If you are using AG UI, this should be automatic.

TODO: Add a detailed guide.

Custom Transports

You can use any transport that sends JSON:

HTTP/REST:

javascript
// TODO: Add an example

WebSockets:

javascript
// TODO: Add an example

Server-Sent Events:

javascript
// TODO: Add an example

Next Steps