# ask_user

Canonical URL: https://developers.iagenify.com/sdk/agent/tools/ask-user/
Language: en

`ask_user({ question, options? })`

Ask you something and wait. It exists only when you supply onQuestion — without it, the agent has no way to ask.

Status: category: read · needs onQuestion · not for subagents

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `question` | string | required | What it is asking. |
| `options` | string[] |  | Two to four short answers, when it can offer them. |

## When it asks {#when}

- The request is ambiguous and the choice is genuinely yours.
- After two failed attempts at the same approach — it is told to ask rather than improvise a third.

## Wiring it {#wiring}

```javascript
api.agents.create({
  runtime: "local", machine: pc, model,
  onQuestion: async ({ question, options }) => askThePerson(question, options),
});
```

A `question` event is emitted before the callback is awaited, so an interface can paint the dialog while the loop waits.

## Without the callback {#without}

> **The tool is simply not declared**
>
> An agent with no onQuestion is instructed to make a judgement call or explain what is blocking. That is a different run, not a stuck one — but it means an unattended agent will choose for you.

## A subagent never gets it {#subagents}

One of three tools a subagent does without, along with `todo_write` and `memory`. It is told it cannot talk to you and must report back instead.

- [question](/sdk/agent/events/question): The event.
- [Agent tools](/sdk/agent/tools): The 35, by family.

```python
api.agents.create(
    runtime="local", machine=pc, model=model,
    on_question=lambda request: ask_the_person(request["question"], request["options"]),
)
```
