> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2-agui.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Setup

> Install AG-UI, run an Agno backend, and connect a Dojo frontend.

<Note>
  Install the AG-UI dependencies: `uv pip install 'agno[agui]'`
</Note>

<Steps>
  <Step title="Create the backend">
    Expose an Agno agent or team through `AgentOS` and `AGUI`.

    ```python basic.py theme={null}
    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)
    ```

    <Note>
      Serve on port `9001`. Dojo expects the backend there by default.
    </Note>
  </Step>

  <Step title="Set Environment Variables">
    ```bash theme={null}
    export OPENAI_API_KEY="your-api-key"
    ```

    AG-UI needs no tokens, OAuth, or signing secrets. Set only your model provider's key.
  </Step>

  <Step title="Run the backend">
    ```bash theme={null}
    python basic.py
    ```

    The AgentOS configuration is available at `http://localhost:9001/config`.
  </Step>

  <Step title="Set up the Dojo frontend">
    Dojo is the AG-UI reference frontend.

    1. Clone the repository:
       ```bash theme={null}
       git clone https://github.com/ag-ui-protocol/ag-ui.git
       ```
    2. Install the TypeScript SDK:
       ```bash theme={null}
       cd ag-ui/typescript-sdk && pnpm install
       ```
    3. Build the Agno integration:
       ```bash theme={null}
       cd integrations/agno && pnpm run build
       ```
    4. Start Dojo:
       ```bash theme={null}
       cd ../../apps/dojo && pnpm run dev
       ```
  </Step>

  <Step title="Connect">
    Open [http://localhost:3000](http://localhost:3000) and select the Agno integration. Responses stream from your backend over the AG-UI protocol.
  </Step>
</Steps>

<Tip>
  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`.
</Tip>
