Update working state
update_stateCreate or replace a scoped working-state record for resuming a task, next action, or blocker.
Instructions
Create or replace one scoped working-state record for resuming a task, next action, or blocker. Requires memory:write; it versions that state slot and refreshes its expiry without deleting other memories. Use remember for durable facts or record_event for history. Provide content or a structured state field; ttl_seconds=0 means no expiry.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | Scope containing the working-state slot; blank uses the token default. | |
| bucket | No | Bucket containing the working-state slot; defaults to work. | work |
| content | No | Free-form state body; otherwise provide at least one structured state field. | |
| state_key | No | Normalized state slot; the same owner, bucket, scope, and key updates that slot. | active_task |
| next_action | No | Next action; used to build the state body when content is blank. | |
| ttl_seconds | No | Expiry in seconds from 0 to 2592000; 0 means no expiry. | |
| current_task | No | Current task; used to build the state body when content is blank. | |
| metadata_json | No | JSON object merged into the working-state metadata. | {} |
| blocked_reason | No | Blocker; used to build the state body when content is blank. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |