Client Tasks
A client task is a task that an agent can ask the user to complete during a request. Each client task is a tool that the agent calls. The input schema is what the agent supplies. The output schema is what the user answers with.
To give an agent a client task, add it in the Tools section of the agent.
Quick Reference
Client Task
| Field | Purpose | Guidance |
|---|---|---|
| Name | The tool name the agent calls | A snake_case verb phrase such as |
| Description | When the agent should use it | Shown to the agent as the tool description. Say what the user will be asked and when it is worth interrupting them. |
| Input schema | What the agent supplies | What the agent supplies when it calls this client task, for example the question text and choices. Every property needs a description. See Message Schemas. |
| Output schema | What the user answers with | What the user supplies to complete this task. The client must submit a body that matches this schema or the completion is rejected. Every property needs a description. |
Forms
| Field | Purpose | Guidance |
|---|---|---|
| A2UI form | A rendered form for the task | Optional. An A2UI definition with an Open state (shown while the task waits) and an optional Completed state (shown after; with none, the form is removed when the task is completed). Clients that render A2UI, such as the Converse window and AG-UI clients, show the form instead of a plain schema form. |
| Catalog | Components the form may use | Defaults to the A2UI basic catalog. Import from URL or drop a catalog file to use your own components. |
Built-in client tasks
A new organization starts with four client tasks. You can edit all of them.
ask_question. The answer is a string.pick_one. The answer isselected, one of the given choices.multi_select. The answer isselected, a list.confirmation. The answer isconfirmed, true or false.
The former agent setting for asking the user questions is gone. To get the same behavior, attach ask_question to the agent.
What happens at runtime
- The agent calls the client task. The request pauses and emits a task event.
- The client shows the form to the user.
- The client completes the task with a body that matches the output schema (an AG-UI client can also cancel it).
- The agent continues with the answer.
For the event format and AG-UI, see Client Tasks and AG-UI.
Deleting
You cannot delete a client task while an agent uses it.
Related
- Agents – add a client task to an agent.
- Client Tasks and AG-UI – the event format and AG-UI.
- Message Schemas – the schema format for input and output.