Skip to content

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

FieldPurposeGuidance
NameThe tool name the agent calls

A snake_case verb phrase such as ask_question or approve_refund. Unique per organization.

DescriptionWhen 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 schemaWhat 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 schemaWhat 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

FieldPurposeGuidance
A2UI formA 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.

CatalogComponents 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 is selected, one of the given choices.
  • multi_select. The answer is selected, a list.
  • confirmation. The answer is confirmed, 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

  1. The agent calls the client task. The request pauses and emits a task event.
  2. The client shows the form to the user.
  3. The client completes the task with a body that matches the output schema (an AG-UI client can also cancel it).
  4. 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