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

# Backend Feedback: Dojo Demo

> Frontend-provided tool: get_user_choice (via useHumanInTheLoop).

```python backend_feedback.py theme={null}
"""
Backend Feedback — Dojo Demo
============================

Frontend-provided tool: get_user_choice (via useHumanInTheLoop)

The frontend defines this tool for presenting multiple choices to the user.
When called, it renders a card with radio buttons for selection.
"""

from agno.agent.agent import Agent
from agno.db.sqlite import SqliteDb
from agno.models.openai import OpenAIResponses

backend_feedback_agent = Agent(
    name="backend_feedback",
    model=OpenAIResponses(id="gpt-5.5"),
    db=SqliteDb(db_file="/tmp/agui_backend_feedback.db"),
    instructions="""You are an assistant that helps users make decisions.

When you need the user to choose from options:
- Call get_user_choice with: question, options (array of strings)
- Wait for user to select an option

Example get_user_choice call:
{
  "question": "What type of cuisine would you prefer for dinner?",
  "options": ["Italian", "Japanese", "Mexican", "Indian", "Thai"]
}

After receiving the selection:
- Acknowledge their choice
- Provide relevant recommendations or next steps based on their selection
- Ask follow-up questions if needed using get_user_choice again""",
    markdown=True,
)
```

## Run the Example

<Steps>
  <Snippet file="create-venv-step.mdx" />

  <Step title="Install dependencies">
    ```bash theme={null}
    uv pip install -U agno openai sqlalchemy
    ```
  </Step>

  <Step title="Export your OpenAI API key">
    <CodeGroup>
      ```bash Mac/Linux theme={null}
      export OPENAI_API_KEY="your_openai_api_key_here"
      ```

      ```bash Windows theme={null}
      $Env:OPENAI_API_KEY="your_openai_api_key_here"
      ```
    </CodeGroup>
  </Step>

  <Step title="Run the example">
    Save the code above as `backend_feedback.py`, then run:

    ```bash theme={null}
    python backend_feedback.py
    ```
  </Step>
</Steps>

Full source: [cookbook/05\_agent\_os/interfaces/agui/backend\_feedback.py](https://github.com/agno-agi/agno/blob/v2.7.4/cookbook/05_agent_os/interfaces/agui/backend_feedback.py)
