Agentic
Question Card
The agent asks the person to choose, one question at a time: options with number keys, an answer in their own words, and Skip. Once answered, it folds into one line.
Usage
With the AI SDK
Make asking a client-side tool. The model sends the questions as its input, and addToolOutput returns the answers, so the agent continues with them.
With TanStack AI
Use a client tool whose input is the questions, and return the answers as its result.
Examples
Answered
A single question from history folds into the question and its answer.
Recommendations
| Guidance | Practice |
|---|---|
| Do | Keep each question to one decision with two to five options, put the trade-off in each option's description, and leave Something else on unless the options cover every case. |
Usage boundaries
| Guidance | Boundary |
|---|---|
| Scope | The application sends the answers back to the agent. Question Card collects them and reports them once, after the last question. |
| Scope | Ask only what the agent cannot decide itself. Use Approval Card to ask permission for one action. |
API reference
Public props from @mizen-labs/ui. Use exported prop types for the complete TypeScript contract.
| Prop | Type | Default | Description |
|---|---|---|---|
| | — | Asked one at a time. Each has an id, a title, options with an optional description, and may allow several answers or turn off Something else. |
| | — | pending asks; answered folds into one line: the question and answer for one question, or Answered 2 of 3 questions for several. |
| | — | Called once after the last question with each question's chosen labels or typed text, by id. A skipped question has an empty list. |
| | — | The answers given, shown in the folded line and its record. Pass them for a card from history. |