Tasks

A task is saved work attached to a teammate. Use tasks when you want repeatable instructions that can run on demand or by trigger.

Create a task

Key fields

FieldTypeDescription
teammate_idint (required)Teammate that executes the task
instructionsstring (required)What should happen when the task runs
namestringTask label
toolsstring[]Optional override of teammate tools
expected_outputstringOutput format expectation
goalsstringTask-specific goals injected into prompt context
user_idstringEnd-user scope. See Users
webhookboolEnable webhook trigger at creation. Returns webhook_url once.
schedulestringCron expression, e.g. 0 9 * * 1-5. Attaches trigger immediately.
schedule_timezonestringTimezone for schedule. Defaults to UTC.

webhook_enabledtrue when a webhook trigger is active. webhook_url is only set on first creation when webhook=True; it's not retrievable afterwards.

How to run tasks

Manually

Manual runs are best for on-demand actions from your UI or backend.

Python

Pass task_setup_tools=False when you want a saved-task run to stay limited to the task's normal tools and skip the internal task-editing and integration-setup tools.

With human-in-the-loop

Use run_and_wait() to handle approval pauses inline — no manual polling loop needed:

Python

Accepts the same callbacks as runs.create_and_wait(). See Human-in-the-Loop for the full callback API.

Scheduling

Set a cron schedule at creation time — no separate trigger call needed.

Webhook trigger

Enable a webhook at creation time — webhook_url is returned once.

Manage tasks

Python

What's next