Skip to content

Tasks ​

Overview
What it isTracked work requests between agents, with results and reports
Agent toolstask_* (needs task_collaboration)
CLIagt tool call ... task_*
Web consoleTasks (任务) in the conversation title bar; Interactions (交互观察)
Settingsscheduler.parallel_work
Storageruntime/runtime.db
Cratesagt-service, agt-runtime

What it does ​

A task is a request from one agent (the requester) to another (the assignee) that agt tracks until it ends: it is queued, run, its result is delivered back to the requester, and the requester files a report to the original conversation. Tasks survive restarts, can wait for one another, and can run in parallel when they declare which shared things they touch.

Use messages for conversation and tasks for work whose result matters. See Task collaboration for the workflow.

How to use it ​

  1. Give the requester (usually the lead) task_collaboration. Assignees only need to be bound.
  2. Make sure requester and assignee share a conversation (direct_create or a group).
  3. The requester calls task_request, later reviews the result with task_get, and calls task_report.
bash
agt tool call --principal lead task_list --args '{"queued_only":true}'
agt tool call --principal lead task_get --args '{"task_id":"<id>"}'

Common parameters ​

ParameterMeaning
assignee, conversation, inputWho does what, and where both are members
request_keyRepeating the same key returns the same task
expected_revisionRequired for every change; get it from task_get

All parameters ​

Requesting and reporting ​

ToolParametersMeaning
task_requestassignee, conversation, input, request_key, priority?, execution_policy?, source_message?Queue a task. Returns queued, not completion. input is at most 120 KiB. source_message is for people calling from the CLI: the message that authorized the discussion.
task_gettask_idState, result, blocking reason, report and notification state, revision
task_listconversation?, queued_only?, limit?, before?Your requested and assigned tasks, newest first. Use the last list_cursor as before.
task_reporttask_id, expected_revision, bodyPost the report to the task's original conversation. Required after a result; a normal message does not count.

Managing the queue ​

ToolParametersMeaning
task_reprioritizetask_id, expected_revision, priority, reasonlow, normal, high; only people can set urgent
task_defertask_id, expected_revision, reason, and either not_before or after_task + deadlineStart no earlier than a time, or only after another task of the same assignee ends
task_execution_policytask_id, expected_revision, reason, execution_policyDeclare parallelism and exclusive resources for a queued task
task_canceltask_id, expected_revision, reasonCancel a task and the subtasks it created
task_retrytask_id, expected_revision, request_key, reasonNew task from a failed, canceled or interrupted one (requester or people)
task_resolvetask_id, expected_revision, outcome (succeeded or failed), evidencePeople only: record what really happened to an outcome_unknown task
task_replytask_id, input_request_id, expected_revision, answer, request_keyAnswer a question the task asked with task_input
task_attentionlimit?, before?Workspace owner only: tasks that need a person

Waiting inside a task ​

Available only while an agent is working on a task.

ToolParametersMeaning
task_awaitdeadline (required), task_id or task_ids (1–20)Save a checkpoint and wait until the tasks end or the deadline passes. Must be the only call in its step.
task_yieldnot_before, reasonSave a checkpoint and pause until a time
task_inputquestion, deadlineAsk the requester a question and wait for task_reply or the deadline

Times are local, such as 2026-11-01T09:00 in the workspace time zone (scheduler.timezone), or carry an offset such as +08:00; this applies to task_defer too. Unix milliseconds, which earlier versions required, still work. While waiting, the agent's slot is free for other work. A deadline never cancels the awaited tasks and never invents a result.

Timers ​

Timers come with task_collaboration. See Timers for how they behave.

ToolParametersMeaning
timer_createtext, one of after_seconds / at / cron, mentions?, name?, timezone?, discussion_seconds?, conversation?Post text to the conversation later, once or on a cron schedule. Agents can only use their current conversation; people calling from the CLI must name it. Returns the resolved next_at in local time.
timer_listconversation?, include_finished?Active timers in your conversations; include_finished adds fired and canceled ones
timer_canceltimer_id, reason?Agents cancel their own timers; people cancel any timer in their conversation

execution_policy ​

json
{ "parallel": true, "exclusive_resources": ["repo:frontend"] }
FieldDefaultMeaning
parallelfalseAllow this task to run alongside other parallel tasks of the same agent. Needs scheduler.parallel_work: true.
exclusive_resources[]Keys of shared things the task changes. Tasks with overlapping keys never run at once, across all agents.

Settings ​

KeyDefaultMeaning
scheduler.parallel_workfalseAllow parallel tasks for one agent. Takes effect on scheduler restart.

Task states ​

StateMeaning
queuedWaiting to start
runningBeing worked on
waiting_dependencyWaiting with task_await
waiting_untilWaiting with task_yield
waiting_inputWaiting for an answer to task_input
succeeded, failed, canceledEnded
interruptedStopped by a crash or restart, and the stop is confirmed. Can be retried with task_retry.
outcome_unknownCut off; whether the work happened is unknown. Never retried automatically.

blocked_reason explains why a queued task does not start, for example a disabled or manual assignee, an expired discussion, a deferral or a dependency.

Ordering ​

Queued tasks run by priority (urgent, high, normal, low), then in the order they were queued. A task gains one priority level for every five minutes it waits, up to high. Running tasks are never preempted.

  • Agent: granting task_collaboration
  • Scheduler: discussions and limits that tasks inherit
  • Runs: the runs that work on tasks

Released under the MIT License.