Agents (Server-Side)¶
Agents are server-side programs that generate A2UI messages in response to user requests.
The actual component rendering is done by the renderer, after messages are transported to the client. The agent is only responsible for generating the A2UI messages.
How Agents Work¶
- Receive user message
- Process with LLM (Gemini, GPT, Claude, etc.)
- Generate A2UI JSON messages as structured output
- Send to client via transport
User interactions from the client can be treated as new user input.
Sample Agents¶
The A2UI repository includes sample agents you can learn from:
- Restaurant Finder
- Table reservations with forms
- Written with the ADK
- Contact Lookup
- Search with result lists
- Written with the ADK
- Rizzcharts
- A2UI Custom components demo
- Written with the ADK
Different types of agents you will use A2A with¶
1. User Facing Agent (standalone)¶
A user facing agent is one that is directly interacted with by the user.
2. User Facing Agent as a host for a Remote Agent¶
This is a pattern where the user facing agent is a host for one or more remote agents. The user facing agent will call the remote agent and the remote agent will generate the A2UI messages. This is a common pattern in A2A with the client agent calling the server agent.
- The user facing agent may "passthrough" the A2UI message without altering them
- The user facing agent may alter the A2UI message before sending it to the client
3. Remote Agent¶
A remote agent is not directly a part of the user facing UI. Instead it is registered in as a remote agent and can be called by the user facing agent. This is a common pattern in A2A with the client agent calling the server agent.