Skip to content

Task agent

A Task agent step gives one of your agents a single job to do in the background, with no customer in the loop. You write the task, choose what data the agent receives and, if you want, describe the result as a JSON Schema. The result is checked against the schema before the workflow moves on.

  • Summarise a call transcript into three lines for the case notes.
  • Extract the policy number, vehicle number and claim date from a free-text claim description.
  • Classify an incoming complaint as billing, delivery or product quality.
  • The agent must talk with the customer. Use Conversational agent.
  • The answer is a calculation such as an EMI or a premium. Use Compute, so figures never come from a model.
  • The choice must follow fixed rules, for example for credit. Use Decision (rules).
Setting What it does
Agent Required. The agent from your library.
Task Required. The instructions. Use {{ expression }} to include run data.
Inputs What the agent receives, as name and expression pairs. Empty sends the run’s input and data.
Output schema A JSON Schema the result must match. Required fields and their types (at the top level) are checked.
Retries 0 to 5. Default: 1. How many more times the agent is asked when its result does not match the output schema.
Timeout Default: 2m. When it passes, the error path is taken.
Store result as Also saves the result under data.<name>.
  • A single Next, and an error path.
  • steps.<step id>: the agent’s result.
  • data.<name> when Store result as is set.

The error path is taken when the agent reports a failure, when the timeout passes, or when the result still does not match the schema after the retries.

An insurer extracts claim details from the description a customer typed into a form.

API / webhook → Task agent (extract claim) → Condition (data.claim.amount > 50000) → Approval / Send message → End

Task: Extract the claim details from: {{ input.description }}

Output schema:

{
"type": "object",
"required": ["policyNumber", "amount"],
"properties": {
"policyNumber": { "type": "string" },
"amount": { "type": "number" },
"incidentDate": { "type": "string" }
}
}

With Store result as set to claim, later steps read data.claim.amount.