Tasks.aupdate patches selected fields on a task. Pass only the fields you want to change: anything left as None is ignored.
For finer control over save semantics (especially when mutating Task attributes locally first), use task.asave() on the instance.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
task_id | str | Yes | Task to update. |
tool_call_payload_extension | dict | No | Extra fields merged into every tool-call payload going forward. |
source | str | No | Update the origin tag. |
status | AgentExecutionStatus | No | New status. |
last_executed_node_id | str | No | Move the task’s “current node” cursor (workflow agents). |
result | str | No | Final result string. |
None are stripped from the request: only what you pass is sent.
Returns Task
The freshly-loaded task with updates applied. See Task.
Examples
Mark complete
Mark errored
Update only payload extension
Sync version
When to use this vs. task.asave()
| Use | When |
|---|---|
Tasks().aupdate(task_id=..., field=...) | You only need to set a couple of fields and don’t have a Task instance loaded. |
task.asave() | You’ve mutated the Task instance directly (e.g. set task.result = "..."). asave PATCHes everything except configuration and (by default) deep_planning. |
@on_task runtime auto-saves the task at the end of the handler: you don’t usually call aupdate or asave yourself inside a handler.
Errors
RaisesModuleException. Common statuses:
| Status | Cause |
|---|---|
| 404 | Task doesn’t exist. |
| 409 | Concurrent update conflict. Reload and retry. |
| 500 | Server error. |

