Overview
The AskUserQuestion tool allows agents to pause execution and ask users multiple-choice questions. The agent can ask 1-4 questions at a time, each with 2-4 options, supporting both single-select and multi-select modes.Message Flow
Data Structures
Output
Input (Response)
"Option A, Option B".
Example
Single-select:{ "Database": "PostgreSQL" }
Multi-select:
{ "Features": "Caching, Metrics" }
Agent State
While waiting, the agent entersAgentState::WaitingForUserInput { request_id }. Use this to show a waiting indicator in your UI.
Tauri Integration
Backend
Frontend
Validation Rules
- 1-4 questions per request
- 2-4 options per question
- Headers: max 12 characters
- Labels: 1-5 words
Handling Cancellation
If the user cancels instead of answering, send an interrupt:ToolResult::error("Interrupted") and the agent ends the turn. See Interrupt Handling for details.
Limitations
- No custom input: Users must choose from provided options only.
- No nested questions: Cannot show conditional follow-ups within one request.
- No rich media: Options support text only (no images or formatting).
Next Steps
Message Flow
Communication patterns
Interrupt Handling
Canceling questions