Execution Endpoints

Manage agent task execution state with checkpoints, pause and resume capabilities. Execution memory allows long-running agent tasks to survive interruptions and resume from the last known state.

Overview

The execution API provides durable task state management for agents. Tasks can save checkpoints at key milestones, be paused and resumed, and recover from failures by rolling back to the last checkpoint. This is essential for long-running operations like data processing, multi-step workflows, and complex research tasks.

MethodEndpointDescription
POST/v1/executionCreate a new execution task
GET/v1/execution/:taskIdGet execution task status
PUT/v1/execution/:taskId/checkpointSave a checkpoint
POST/v1/execution/:taskId/pausePause a running task
POST/v1/execution/:taskId/resumeResume a paused task
DELETE/v1/execution/:taskIdDelete an execution task

Create Execution

Get Execution

Save Checkpoint

Checkpoint frequency

Save checkpoints at meaningful milestones (e.g., after completing a stage or processing a batch of data). Frequent checkpoints reduce the amount of work lost on failure but add overhead. The checkpoint_interval_seconds config option can automate checkpoint timing.

Pause Execution

Resume Execution

Resuming from a specific checkpoint

If you omit the checkpoint_id, the task will resume from the most recent checkpoint. Specify an earlier checkpoint ID to roll back to a previous state -- useful when the latest state contains errors.

Delete Execution

Running tasks

If the task is currently running, it will be forcefully terminated before deletion. Consider pausing the task first if you need to preserve its current state before deciding to delete.

Execution Object

The following table describes all fields in an execution task object.

FieldTypeDescription
idstringUnique execution identifier (prefixed with exec_)
namestringHuman-readable task name
descriptionstringDescription of the task purpose
agent_idstringID of the agent executing the task
task_typestringClassification of the task type
statusstringCurrent status: running, paused, completed, failed, terminated
stateobjectCurrent task state (arbitrary JSON reflecting progress)
checkpointsarrayList of saved checkpoints with id, label, state, and timestamp
configobjectTask configuration (max duration, checkpoint interval, retry settings)
elapsed_secondsintegerTotal active execution time (excludes paused time)
started_atstringISO 8601 timestamp when the task started
completed_atstring | nullISO 8601 timestamp when the task completed (null if still active)
updated_atstringISO 8601 timestamp of the last state update
Rekall
rekall