This page covers the run lifecycle APIs. If you want the simpler one-call execute flow that
returns the final answer directly, see Execute.
Run lifecycle
List runs
Endpoint
Query parameters
Response
The
prompt field is truncated to 200 characters in list responses. Use the details endpoint to
get the full prompt.Step 1: Create a run
Endpoint
Run parameters
Guidance vs. instructions
The agent’sinstructions define its general behavior. The run’s guidance adds context for a specific execution:
Model override
Use a different model for a specific run without changing the agent:Object ID scoping
Restrict a run to specific vault objects at runtime. This is useful when you want a general-purpose agent to only work with specific documents for a particular task:Object scoping is applied at runtime, not at agent creation. This means the same agent can
work with different sets of documents on each run. The agent’s
vaultIds restriction (set at
creation) is still enforced — objectIds adds a further narrowing within allowed vaults.Step 2: Execute the run
Endpoint
Response
Step 3: Wait for completion
Two options: poll the status endpoint, or register a watcher before executing.Option A: Poll
Option B: Watch (webhook callback)
Register a callback URL before executing. You’ll receive a POST when the run completes:Step 4: Stream run events
Endpoint
run.completedrun.failedrun.cancelled
Replay after reconnect
You can replay from a sequence number using either:- Query param:
lastEventId - Header:
Last-Event-ID
Example SSE events
If the run is already terminal when you connect, the endpoint returns buffered events and then
sends a
close event.Cancel a run
Endpoint
Complete example
Create an agent, run a complex multi-step task, and get the results:Typical run times
Most of the run time is the AI thinking and making API calls — sandbox startup is under 10
seconds.

