Skip to main content
Install the AG-UI dependencies: uv pip install 'agno[agui]'
1

Create the backend

Expose an Agno agent or team through AgentOS and AGUI.
basic.py
from agno.agent import Agent
from agno.models.openai import OpenAIResponses
from agno.os import AgentOS
from agno.os.interfaces.agui import AGUI

chat_agent = Agent(model=OpenAIResponses(id="gpt-5.4"))

agent_os = AgentOS(agents=[chat_agent], interfaces=[AGUI(agent=chat_agent)])
app = agent_os.get_app()

if __name__ == "__main__":
    agent_os.serve(app="basic:app", reload=True, port=9001)
Serve on port 9001. Dojo expects the backend there by default.
2

Set Environment Variables

export OPENAI_API_KEY="your-api-key"
AG-UI needs no tokens, OAuth, or signing secrets. Set only your model provider’s key.
3

Run the backend

python basic.py
The AgentOS configuration is available at http://localhost:9001/config.
4

Set up the Dojo frontend

Dojo is the AG-UI reference frontend.
  1. Clone the repository:
    git clone https://github.com/ag-ui-protocol/ag-ui.git
    
  2. Install the TypeScript SDK:
    cd ag-ui/typescript-sdk && pnpm install
    
  3. Build the Agno integration:
    cd integrations/agno && pnpm run build
    
  4. Start Dojo:
    cd ../../apps/dojo && pnpm run dev
    
5

Connect

Open http://localhost:3000 and select the Agno integration. Responses stream from your backend over the AG-UI protocol.
Using your own frontend instead of Dojo? Point any AG-UI-compatible client (including CopilotKit) at the {prefix}/agui endpoint, for example http://localhost:9001/agui.