> ## 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.

# HITL Backend Feedback

> Minimal backend agent with frontend-defined tools via useHumanInTheLoop.

```python hitl_backend_feedback.py theme={null}
"""
HITL Backend Feedback
=====================

Minimal backend agent with frontend-defined tools via useHumanInTheLoop.
"""

from agno.agent.agent import Agent
from agno.db.sqlite import SqliteDb
from agno.models.openai import OpenAIResponses
from agno.os import AgentOS
from agno.os.interfaces.agui import AGUI

backend_feedback_agent = Agent(
    name="backend_feedback",
    model=OpenAIResponses(id="gpt-5.5"),
    db=SqliteDb(db_file="/tmp/agui_hitl_backend_feedback.db"),
    instructions=(
        "You help users make decisions. When a choice would benefit from user input, "
        "use available tools to present options - they are provided by the frontend."
    ),
    markdown=True,
)

agent_os = AgentOS(
    agents=[backend_feedback_agent],
    interfaces=[AGUI(agent=backend_feedback_agent, prefix="/backend_feedback")],
)
app = agent_os.get_app()


if __name__ == "__main__":
    agent_os.serve(app="hitl_backend_feedback:app", port=9001, reload=True)
```

## Run the Example

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

  <Step title="Install dependencies">
    ```bash theme={null}
    uv pip install -U "agno[agui,os]" openai
    ```
  </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 `hitl_backend_feedback.py`, then run:

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

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