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¶
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¶
| Transport | Status | Use Case |
|---|---|---|
| A2A Protocol | ✅ Stable | Multi-agent systems, enterprise meshes |
| AG UI | ✅ Stable | Full-stack React applications |
| REST API | 📋 Planned | Simple HTTP endpoints |
| WebSockets | 💡 Proposed | Real-time bidirectional |
| SSE (Server-Sent Events) | 💡 Proposed | Web 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 A2UI messages to AG UI events and handles transport and state sync automatically. It is the recommended transport for React / Next.js clients.
See: Use A2UI with Any Agent Framework (Using AG-UI) — guide to setting up CopilotKit with your agent framework of choice and enabling A2UI rendering.
Custom Transports¶
You can use any transport that sends JSON:
HTTP/REST:
WebSockets:
Server-Sent Events:
Next Steps¶
- A2A Protocol Docs: Learn about A2A
- A2A Extension Spec: A2UI + A2A details