docs/reference/agents.md
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.
User Input → Agent Logic → LLM → A2UI JSON → Send to Client
User interactions from the client can be treated as new user input.
The A2UI repository includes sample agents you can learn from:
A user facing agent is one that is directly interacted with by the user.
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.
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.