AskUser
Lets the model ask the user multiple-choice questions mid-run — Pydantic AI Harness AskUser, with the same tool (ask_user_question), schema, limits, instruction and result, so prompts and servers written for it work unchanged.
The question reaches the user through the chat's dev.ai.elements.core.chat.ToolApprover.input as an InputRequest whose schema is a standard JSON Schema object: one property per question (keyed by header), a single choice (oneOf of {const, title, description}) or a multiple choice (array of anyOf those), plus a plain {"type": "string"} alternative for the user's own answer. The result maps each header to the picked labels, or to a one-item list with the user's own answer; a declined question returns DECLINED.
On a device that talks to an agent server, pass tool as an AG-UI frontend tool or an AI SDK client-side tool: the server's model asks, the device answers — no protocol extension needed.
Functions
Per-turn context read when a turn starts (e.g. a memory snapshot), placed after the static instructions. It may change between turns, so keep it small and at the end.