Migration from Apps: For migration from
AGUIApp, see the v2 migration guide for complete steps.Example usage
1
Install backend dependencies
2
Run the backend
Expose an Agno agent through the AG-UI interface using
AgentOS and AGUI.basic.py
3
Run the frontend
Use Dojo (
ag-ui’s frontend) as an advanced, customizable interface for AG-UI agents.- Clone:
git clone https://github.com/ag-ui-protocol/ag-ui.git - Install dependencies from the repository root:
pnpm install - Build Dojo and its dependencies (including the Agno package):
pnpm build --filter=demo-viewer - Start Dojo following the instructions in the repository.
4
Chat with the Agno Agent
With Dojo running, open
http://localhost:3000 and select the Agno agent.Custom Events
Custom events created in tools are automatically delivered to AG-UI in the AG-UI custom event format. Creating custom events:Core Components
AGUI(interface): Wraps an AgnoAgentorTeaminto an AG-UI compatible FastAPI router.AgentOS.serve: Serves the FastAPI app (including the AGUI router) with Uvicorn.
AGUI mounts protocol-compliant routes on the app.
AGUI interface
Main entry point for AG-UI exposure.
Initialization Parameters
Provide
agent or team.
Key Method
Endpoints
Mounted at the interface’s route prefix (root by default):POST /agui: Main entrypoint. AcceptsRunAgentInputfromag-ui-protocol. Streams AG-UI events.GET /status: Health/status endpoint for the interface.
ag-ui-protocol docs for payload details.
Authorization
With authorization enabled,POST /agui requires the run scope for the interface’s bound entity: agents:run for an agent, teams:run for a team. Send the JWT as Authorization: Bearer <token>. GET /status requires a valid token but no scope.
For anonymous callers, forwardedProps.user_id attributes the run to a user. Authenticated callers are pinned to their token’s principal, and a client-supplied user_id is ignored. See Scopes for the full route-to-scope mapping.
Serving AgentOS
UseAgentOS.serve to run the app with Uvicorn.
Parameters
See cookbook examples for updated interface patterns.