Skip to main content

Code

cookbook/05_agent_os/interfaces/agui/reasoning_agent.py

Usage

1

Set up your virtual environment

2

Set Environment Variables

3

Install Dependencies

4

Run Example

Key Features

  • Native Reasoning: o4-mini streams its reasoning as AG-UI REASONING_* events
  • Visible Thinking: The frontend renders the agent’s reasoning steps in real time
  • Web Search: WebSearchTools pulls in current information
  • Context Aware: Date, time, and location are added to the agent’s context

Setup Frontend

  1. Clone the AG-UI 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. Open http://localhost:3000 and select the Agno integration