Documentation Index
Fetch the complete documentation index at: https://www.truefoundry.com/llms.txt
Use this file to discover all available pages before exploring further.
Why
- Some tasks need a user decision before the agent can proceed — for example, choosing an environment, account, or scope.
How it works
The gateway registersask_user_question as a client-side tool. The server never runs it; your application collects the user’s choice and resumes the run.
The agent uses ask_user_question when it cannot continue without a decision from you—for example, which cluster to deploy to. It does not use this tool for guesses it could make from context alone.
The user selects one of the listed options. They can also type an answer that is not in the list.
Sub-agents cannot ask the user questions. Only the root agent can use
ask_user_question.Example
User
Deploy the booking-bot app to production.
Assistant
I need to know which cluster before I can deploy.
ask_user_question
ask_user_question
Tool CallTool Response — execution paused; answer required from client
Assistant
Deploying booking-bot to tfy-prod-us …
Client example
Handletool.response_required, send tool.client_side_response, then continue with previous_response_id.
For the full working example, see Using API — Ask User Questions.