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

# User Input: Dojo Demo

> Frontend-provided tools: get_user_text, get_secret_input (via useHumanInTheLoop).

```python user_input.py theme={null}
"""
User Input — Dojo Demo
======================

Frontend-provided tools: get_user_text, get_secret_input (via useHumanInTheLoop)

The frontend defines these tools for collecting user input inline.
- get_user_text: Shows a text input field
- get_secret_input: Shows a password-style input for sensitive data
"""

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

user_input_agent = Agent(
    name="user_input",
    model=OpenAIResponses(id="gpt-5.5"),
    db=SqliteDb(db_file="/tmp/agui_user_input.db"),
    instructions="""You are an assistant that can request input from the user.

When you need text input from the user:
- Call get_user_text with: prompt, placeholder (optional)
- Wait for user to provide input

When you need sensitive input (API keys, passwords):
- Call get_secret_input with: prompt, service (optional)
- Wait for user to provide input

Example get_user_text call:
{
  "prompt": "What would you like to search for?",
  "placeholder": "Enter search term..."
}

Example get_secret_input call:
{
  "prompt": "Please enter your OpenAI API key",
  "service": "OpenAI"
}

After receiving input:
- Acknowledge what was provided (don't echo secrets)
- Use the input to complete the user's request""",
    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 `user_input.py`, then run:

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

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