Agent Runs
15 operations.
List runs
GET /api/v1/agent-runs
List canonical Agent Runs accessible to the authenticated credential.
Scope
- Authorization is evaluated against the caller's Organization and Agent scope before pagination.
- A Project or Environment filter narrows the authorized run collection; it does not widen access.
- API keys and sessions use the same resource and operation authorization boundary.
Filtering
projectId: Optional canonical Project filter.environmentId: Optional canonical Environment filter.agentId: Optional canonical Agent filter.agentRunId: Optional exact Agent Run filter; combined with the other filters, it returns the run only when every filter matches.agentJobId: Optional scheduled Agent Job firing filter.createdBy: Optional creator identity filter.states: Optional lifecycle-state filter (comma-separated list or array).
Sorting
sort:createdAtorupdatedAt.order:ascordesc.
Pagination
limit: Number of Agent Runs to return (1–100, default 20).cursor: Opaque cursor returned inpagination.nextCursor; reuse it only with the same filters and ordering.
Response
- Returns
agentRunswith canonical run ID, Agent and Agent Revision identity, actor, lifecycle state, digests, timestamps, runtime version, and content size. - Returns
paginationwith the next opaque cursor when another page is available; no separate total-count field is returned.
Authentication
- Requires a valid session or API key in the Authorization header.
Parameters
query
| Name | Type | Required | Description |
|---|---|---|---|
sort | "createdAt" | "updatedAt" | optional | Selects the resource field used to order results. Applies to List runs. |
order | "asc" | "desc" | optional | Selects ascending or descending order for the requested sort field. Applies to List runs. |
limit | integer | optional | Sets the maximum number of resources returned in this page. Applies to List runs. |
cursor | string | optional | Opaque cursor returned by the previous page; omit it to read the first page. Applies to List runs. |
projectId | string | optional | Filters results to the specified Project. Applies to List runs. |
environmentId | string | optional | Selects the active Project environment coordinate. Applies to List runs. |
agentId | string | optional | Selects the Project Agent by its stable identifier. Applies to List runs. |
agentRunId | string | optional | Filters runs to the single Agent Run with this identifier. Applies to List runs. |
agentJobId | string | optional | Filters runs to those created by this scheduled agent job. Applies to List runs. |
createdBy | string | optional | Filters runs to the specified creator identity. Applies to List runs. |
states | array<"queued" | "acquiring" | "starting" | "running" | "awaitingToolResult" | "awaitingDelegateResult" | "canceling" | "completed" | "failed" | "canceled" | "expired"> | optional | Filters runs to the supplied set of lifecycle states. Applies to List runs. |
Responses
| Status | Description | Body |
|---|---|---|
200 | Response for status 200 | application/json — object — agentRuns: array<AgentRun> (required); pagination: object (required) |
400 | The request is malformed or cannot be processed. | application/json — PublicApiError — error: object (required) |
401 | Authentication failed. The Authorization header is missing, or the credential is invalid or expired. | application/json — PublicApiError — error: object (required) |
403 | Access denied. The authenticated user does not have permission to perform this action. | application/json — PublicApiError — error: object (required) |
404 | Resource not found. | application/json — PublicApiError — error: object (required) |
409 | Request conflicts with current state of the resource, including safe deployment conflict classifications. | application/json — PublicApiError — error: object (required) |
422 | Request validation failed. Check the request body, query parameters, or path parameters. | application/json — PublicApiError — error: object (required) |
429 | Too many requests. The code foreign_resource_rate_limited means the caller made too many requests for Projects outside its reach: correct the Project id instead of retrying. | application/json — PublicApiError — error: object (required) |
500 | The server could not complete the request. | application/json — PublicApiError — error: object (required) |
503 | Service temporarily unavailable (e.g. execution capacity exhausted). The response carries a Retry-After header; retry with backoff. | application/json — PublicApiError — error: object (required) |
Start a run
POST /api/v1/agent-runs
Start a new Agent Run for a Project Agent or System Agent.
Ownership
- Requires agentId; Project Agents may also specify environmentId.
Agent Resolution
- The target Agent and its active revision are resolved server-side.
Provider selection
- Project Agents require a configured Project model policy. Omit
providerandmodelto use that policy's default; explicit selections must be allowed by the policy and eligible for the immutable Environment configuration. - Credentials come from the configuration's pinned Organization binding or the deployment-managed provider route. Selecting a provider does not select a credential source. Unavailable bindings are rejected without fallback.
- System Agents use the deployment's default provider/model and credentials.
Execution
- AgentRun admission persists the run and queues asynchronous dispatch to a dedicated runner; runner execution does not block the response.
- Dispatch capacity and idempotency leases can produce 503/429 responses with Retry-After. A request may already have durable admission state, so use an Idempotency-Key when retrying and inspect the AgentRun state.
- After admission the run is handed to the runner; progress is journaled as lifecycle transitions (see GET /agent-runs/:agentRunId/transitions) and can be monitored via the checkpoints endpoint.
- JSON requests may provide canonical
contents; multipart requests may repeatfiles(UTF-8 text, supported images, or PDF). Files are validated and converted to inline message parts before dispatch.
Authentication
- Requires a valid session or API key in the Authorization header.
Parameters
header
| Name | Type | Required | Description |
|---|---|---|---|
Idempotency-Key | string | optional |
Request body
Required — Request body for: Start a run.
application/json
| Name | Type | Required | Description |
|---|---|---|---|
agentId | string | required | Project or System Agent ID for the new agent run |
environmentId | string | optional | |
fdaWorkId | string | optional | |
query | string | optional | |
contents | array<one of 3 types> | optional | |
provider | "anthropic" | "google" | "openai" | "deepseek" | "azure-openai" | "amazon-bedrock" | "google-vertex" | "fireworks" | optional | |
model | string | optional | |
reasoningBudget | one of 2 types | optional | |
maxRetries | number | optional | |
subjectUserId | string | optional |
multipart/form-data
| Name | Type | Required | Description |
|---|---|---|---|
agentId | string | required | |
environmentId | string | optional | |
fdaWorkId | string | optional | |
query | string | optional | |
provider | "anthropic" | "google" | "openai" | "deepseek" | "azure-openai" | "amazon-bedrock" | "google-vertex" | "fireworks" | optional | |
model | string | optional | |
reasoningBudget | one of 2 types | optional | |
maxRetries | number | optional | |
subjectUserId | string | optional | |
files | array<file> | required | Repeat files for UTF-8 text, supported images, or PDF; each <=5 MiB, total <=10 MiB. |
Responses
| Status | Description | Body |
|---|---|---|
200 | Response for status 200 | application/json — object — data: object (required) |
400 | The request is malformed or cannot be processed. | application/json — PublicApiError — error: object (required) |
401 | Authentication failed. The Authorization header is missing, or the credential is invalid or expired. | application/json — PublicApiError — error: object (required) |
402 | Payment required. The organization has exhausted its billing-period minute budget. Upgrade the plan or wait for the period to roll over. | application/json — PublicApiError — error: object (required) |
403 | Access denied. The authenticated user does not have permission to perform this action. | application/json — PublicApiError — error: object (required) |
404 | Resource not found. | application/json — PublicApiError — error: object (required) |
409 | Request conflicts with current state of the resource, including safe deployment conflict classifications. | application/json — PublicApiError — error: object (required) |
422 | Request validation failed. Check the request body, query parameters, or path parameters. | application/json — PublicApiError — error: object (required) |
429 | Rate limited by the execution backend during admission or dispatch. The response carries a Retry-After header; use an Idempotency-Key when retrying and inspect the AgentRun state. | application/json — PublicApiError — error: object (required) |
500 | The server could not complete the request. | application/json — PublicApiError — error: object (required) |
503 | Service temporarily unavailable while admitting or dispatching the run. Durable admission may already exist; the response carries a Retry-After header. Use an Idempotency-Key when retrying and inspect the AgentRun state. | application/json — PublicApiError — error: object (required) |
Get a run
GET /api/v1/agent-runs/{agentRunId}
Retrieve one canonical Agent Run by its opaque run_ ID.
Ownership
- The run is resolved by its canonical ID and must be authorized in the caller's Organization and Agent scope.
- A run retains the Agent and immutable Agent Revision identity selected at admission; it is not rebound to a newer revision.
Response
- Returns the public Agent Run record, including Agent and Agent Revision identity, actor references, lifecycle state, digests, timestamps, runtime version, and content size.
- The response does not expose internal execution tables, provider details, token statistics, or a separate step collection.
AgentRun Lifecycle States
queued: Accepted; no live attemptacquiring: Attempt opened; machine lease in progressstarting: Machine leased; runner handoff and runtime bootrunning: Runtime executingawaitingToolResult: Paused for an interactive tool resultawaitingDelegateResult: Paused for an external delegate resultcanceling: Cancel requested; runtime winding downcompleted/failed/canceled/expired: Terminal
Authentication
- Requires a valid session or API key in the Authorization header.
- The credential must be authorized for the run's Agent Run operation and resource scope.
Parameters
path
| Name | Type | Required | Description |
|---|---|---|---|
agentRunId | string | required | Identifies the agent run whose state or history is addressed. Applies to Get a run. |
Responses
| Status | Description | Body |
|---|---|---|
200 | Response for status 200 | application/json — object — data: object (required) |
400 | The request is malformed or cannot be processed. | application/json — PublicApiError — error: object (required) |
401 | Authentication failed. The Authorization header is missing, or the credential is invalid or expired. | application/json — PublicApiError — error: object (required) |
403 | Access denied. The authenticated user does not have permission to perform this action. | application/json — PublicApiError — error: object (required) |
404 | Resource not found. | application/json — PublicApiError — error: object (required) |
409 | Request conflicts with current state of the resource, including safe deployment conflict classifications. | application/json — PublicApiError — error: object (required) |
422 | Request validation failed. Check the request body, query parameters, or path parameters. | application/json — PublicApiError — error: object (required) |
429 | Too many requests. The code foreign_resource_rate_limited means the caller made too many requests for Projects outside its reach: correct the Project id instead of retrying. | application/json — PublicApiError — error: object (required) |
500 | The server could not complete the request. | application/json — PublicApiError — error: object (required) |
503 | Service temporarily unavailable (e.g. execution capacity exhausted). The response carries a Retry-After header; retry with backoff. | application/json — PublicApiError — error: object (required) |
Read the Run's selected model and configured alternatives at its pinned deployment
GET /api/v1/agent-runs/{agentRunId}/available-models
Parameters
path
| Name | Type | Required | Description |
|---|---|---|---|
agentRunId | string | required | Identifies the agent run whose state or history is addressed. Applies to Read the Run's selected model and configured alternatives at its pinned deployment. |
Responses
| Status | Description | Body |
|---|---|---|
200 | Response for status 200 | application/json — object — data: object (required) |
400 | The request is malformed or cannot be processed. | application/json — PublicApiError — error: object (required) |
401 | Authentication failed. The Authorization header is missing, or the credential is invalid or expired. | application/json — PublicApiError — error: object (required) |
403 | Access denied. The authenticated user does not have permission to perform this action. | application/json — PublicApiError — error: object (required) |
404 | Resource not found. | application/json — PublicApiError — error: object (required) |
409 | Request conflicts with current state of the resource, including safe deployment conflict classifications. | application/json — PublicApiError — error: object (required) |
422 | Request validation failed. Check the request body, query parameters, or path parameters. | application/json — PublicApiError — error: object (required) |
429 | Too many requests. The code foreign_resource_rate_limited means the caller made too many requests for Projects outside its reach: correct the Project id instead of retrying. | application/json — PublicApiError — error: object (required) |
500 | The server could not complete the request. | application/json — PublicApiError — error: object (required) |
503 | Service temporarily unavailable (e.g. execution capacity exhausted). The response carries a Retry-After header; retry with backoff. | application/json — PublicApiError — error: object (required) |
Cancel a live run
POST /api/v1/agent-runs/{agentRunId}/cancel
Cancel a run. The outcome depends on the run's lifecycle state:
running: the run transitions tocancelingand the execution worker is signaled to stop after the current step; its final report settles the run ascanceled.queued,acquiring,starting,awaitingToolResult,awaitingDelegateResult: the run transitions straight tocanceledand any held machine is released.canceling: retry-safe; the execution worker is signaled again and the current run is returned.canceled: already satisfied; the current run is returned.completed,failed, orexpired: 409 Conflict; the message carries the run's current state.
Authentication
- Requires a valid API key supplied in the Authorization header.
- The caller must be authorized for the run's Project and Environment operation scope. No tenant ID is accepted; the run is resolved server-side by its canonical ID.
Parameters
path
| Name | Type | Required | Description |
|---|---|---|---|
agentRunId | string | required | Identifies the agent run whose state or history is addressed. Applies to Cancel a live run. |
header
| Name | Type | Required | Description |
|---|---|---|---|
Idempotency-Key | string | optional |
Responses
| Status | Description | Body |
|---|---|---|
200 | Response for status 200 | application/json — object — data: object (required) |
400 | The request is malformed or cannot be processed. | application/json — PublicApiError — error: object (required) |
401 | Authentication failed. The Authorization header is missing, or the credential is invalid or expired. | application/json — PublicApiError — error: object (required) |
403 | Access denied. The authenticated user does not have permission to perform this action. | application/json — PublicApiError — error: object (required) |
404 | Resource not found. | application/json — PublicApiError — error: object (required) |
409 | Conflict. The run has reached a terminal state that cannot be canceled. The message carries the run's current state. | application/json — PublicApiError — error: object (required) |
422 | Request validation failed. Check the request body, query parameters, or path parameters. | application/json — PublicApiError — error: object (required) |
429 | Too many requests. The code foreign_resource_rate_limited means the caller made too many requests for Projects outside its reach: correct the Project id instead of retrying. | application/json — PublicApiError — error: object (required) |
500 | The server could not complete the request. | application/json — PublicApiError — error: object (required) |
503 | Service temporarily unavailable (e.g. execution capacity exhausted). The response carries a Retry-After header; retry with backoff. | application/json — PublicApiError — error: object (required) |
List the run's checkpoint metadata
GET /api/v1/agent-runs/{agentRunId}/checkpoints
Returns one row per persisted checkpoint artifact for the run.
Use the returned identifiers to fetch any checkpoint resources needed by the client.
Authentication
- Requires session or API key with operation
agent-runs:checkpoints:list - The caller must be authorized for this operation within the run's owning organization and its persisted Project, Environment, or Agent scope
Parameters
path
| Name | Type | Required | Description |
|---|---|---|---|
agentRunId | string | required | Identifies the agent run whose state or history is addressed. Applies to List the run's checkpoint metadata. |
query
| Name | Type | Required | Description |
|---|---|---|---|
limit | integer | optional | Sets the maximum number of resources returned in this page. Applies to List the run's checkpoint metadata. |
cursor | string | optional | Opaque cursor returned by the previous page; omit it to read the first page. Applies to List the run's checkpoint metadata. |
Responses
| Status | Description | Body |
|---|---|---|
200 | Response for status 200 | application/json — object — checkpoints: array<object> (required); pagination: object (required) |
400 | The request is malformed or cannot be processed. | application/json — PublicApiError — error: object (required) |
401 | Authentication failed. The Authorization header is missing, or the credential is invalid or expired. | application/json — PublicApiError — error: object (required) |
403 | Access denied. The authenticated user does not have permission to perform this action. | application/json — PublicApiError — error: object (required) |
404 | Resource not found. | application/json — PublicApiError — error: object (required) |
409 | Request conflicts with current state of the resource, including safe deployment conflict classifications. | application/json — PublicApiError — error: object (required) |
422 | Request validation failed. Check the request body, query parameters, or path parameters. | application/json — PublicApiError — error: object (required) |
429 | Too many requests. The code foreign_resource_rate_limited means the caller made too many requests for Projects outside its reach: correct the Project id instead of retrying. | application/json — PublicApiError — error: object (required) |
500 | The server could not complete the request. | application/json — PublicApiError — error: object (required) |
503 | Service temporarily unavailable (e.g. execution capacity exhausted). The response carries a Retry-After header; retry with backoff. | application/json — PublicApiError — error: object (required) |
Get the latest checkpoint bundle
GET /api/v1/agent-runs/{agentRunId}/checkpoints/latest
Retrieve the latest persisted checkpoint for an AgentRun together with its runtime checkpoint and step payload. The lookup is scoped to the caller's organization and operation-specific Project, Environment, or Agent access, and uses the same latest selector as run continuation.
Authentication
- Requires session or API key with operation
agent-runs:steps:checkpoints:get - Automated-run credentials must be bound to the run's agent revision
Parameters
path
| Name | Type | Required | Description |
|---|---|---|---|
agentRunId | string | required | Identifies the agent run whose state or history is addressed. Applies to Get the latest checkpoint bundle. |
Responses
| Status | Description | Body |
|---|---|---|
200 | Response for status 200 | application/json — object — data: object (required) |
400 | The request is malformed or cannot be processed. | application/json — PublicApiError — error: object (required) |
401 | Authentication failed. The Authorization header is missing, or the credential is invalid or expired. | application/json — PublicApiError — error: object (required) |
403 | Access denied. The authenticated user does not have permission to perform this action. | application/json — PublicApiError — error: object (required) |
404 | Resource not found. | application/json — PublicApiError — error: object (required) |
409 | Request conflicts with current state of the resource, including safe deployment conflict classifications. | application/json — PublicApiError — error: object (required) |
422 | Request validation failed. Check the request body, query parameters, or path parameters. | application/json — PublicApiError — error: object (required) |
429 | Too many requests. The code foreign_resource_rate_limited means the caller made too many requests for Projects outside its reach: correct the Project id instead of retrying. | application/json — PublicApiError — error: object (required) |
500 | The server could not complete the request. | application/json — PublicApiError — error: object (required) |
503 | Service temporarily unavailable (e.g. execution capacity exhausted). The response carries a Retry-After header; retry with backoff. | application/json — PublicApiError — error: object (required) |
Continue a run
POST /api/v1/agent-runs/{agentRunId}/continue
Continue an agent run in a resumable state in the specified project agent. When a checkpoint exists the run resumes from the latest one; otherwise it starts a fresh attempt with the provided query. Approval decisions are processed by the operation-approval resource and enqueue a durable, server-owned resume. This endpoint accepts only an ordinary authorized continuation query; it cannot carry an approval decision or privileged resume signal.
Ownership
- The persisted execution target identifies the project agent (or system agent)
- AgentRun must belong to that persisted target
Use Cases
- Respond to interactive tool requests.
- Add the next user message to a completed run (multi-turn chat). Optional contents attach new files to this turn. Original attachment payloads are not replayed as new input.
- Retry after failure or after a cancel.
State Requirements
- AgentRun must be in a resumable state:
completed,awaitingToolResult,failed, orcanceled.expiredis dead and rejects with 409; an externally waiting run rejects with 400. A live state (queued/acquiring/starting/running/canceling) rejects with 409 Conflict; the response message carries the run's current state.
Authentication
- Requires a valid session or API key in the Authorization header
- The credential must be authorized for the persisted execution target
Provider selection
- Omit
providerandmodelto keep the Run's last recorded selection. Historical Runs without a record require both provider and model explicitly. - Project Agent selections are rechecked against the current Project model policy and the Run's persisted Environment configuration. A removed selection is rejected; it is never silently replaced by the policy default.
- Credentials are resolved from the pinned binding or deployment route at continuation time. Unavailable credentials are rejected without fallback.
Parameters
path
| Name | Type | Required | Description |
|---|---|---|---|
agentRunId | string | required | Identifies the agent run whose state or history is addressed. Applies to Continue a run. |
header
| Name | Type | Required | Description |
|---|---|---|---|
Idempotency-Key | string | optional |
Request body
Required — Request body for: Continue a run.
application/json
| Name | Type | Required | Description |
|---|---|---|---|
query | string | required | |
contents | array<one of 3 types> | optional | |
provider | "anthropic" | "google" | "openai" | "deepseek" | "azure-openai" | "amazon-bedrock" | "google-vertex" | "fireworks" | optional | |
model | string | optional | |
reasoningBudget | one of 2 types | optional | |
maxRetries | number | optional |
Responses
| Status | Description | Body |
|---|---|---|
200 | Response for status 200 | application/json — object — data: object (required) |
400 | The request is malformed or cannot be processed. | application/json — PublicApiError — error: object (required) |
401 | Authentication failed. The Authorization header is missing, or the credential is invalid or expired. | application/json — PublicApiError — error: object (required) |
402 | Payment required. The organization has exhausted its billing-period minute budget. Upgrade the plan or wait for the period to roll over. | application/json — PublicApiError — error: object (required) |
403 | Access denied. The authenticated user does not have permission to perform this action. | application/json — PublicApiError — error: object (required) |
404 | Resource not found. | application/json — PublicApiError — error: object (required) |
409 | Conflict. The run is not in a resumable state (it is live, expired, or another request queued it first). The message carries the run's current state. The response may include a safe details.conflictReason classification. | application/json — PublicApiError — error: object (required) |
422 | Request validation failed. Check the request body, query parameters, or path parameters. | application/json — PublicApiError — error: object (required) |
429 | Rate limited while starting the run. The run is left in its prior resumable state. Retry-After header set. | application/json — PublicApiError — error: object (required) |
500 | The server could not complete the request. | application/json — PublicApiError — error: object (required) |
503 | Service temporarily unavailable. Execution capacity could not secure a runner right now. The run is left in its prior resumable state. Retry-After header set. | application/json — PublicApiError — error: object (required) |
List steps
GET /api/v1/agent-runs/{agentRunId}/steps
List all agent steps for a specific run.
Sorting
sort: Sort bycreatedAtorupdatedAtorder: Sort order (ascordesc)
Pagination
limit: Number of results to return (1-100, default 20)cursor: Opaque cursor returned inpagination.nextCursor.
Depth
depth: Tree depth for nested step responses (0-10, default 0)0: Flat list of all steps (default)1: Root steps only (parentAgentStepId is null) with lastCheckpointId and empty childAgentSteps2+: Root steps with nested childAgentSteps up to the specified depth
Response
- Returns steps with full details
- Each step includes agent information and execution context
pagination.countis the number of steps in this page
Authentication
- Requires a valid session or API key in the Authorization header
Parameters
path
| Name | Type | Required | Description |
|---|---|---|---|
agentRunId | string | required | Identifies the agent run whose state or history is addressed. Applies to List steps. |
query
| Name | Type | Required | Description |
|---|---|---|---|
sort | "createdAt" | "updatedAt" | optional | Selects the resource field used to order results. Applies to List steps. |
order | "asc" | "desc" | optional | Selects ascending or descending order for the requested sort field. Applies to List steps. |
limit | integer | optional | Sets the maximum number of resources returned in this page. Applies to List steps. |
cursor | string | optional | Opaque cursor returned by the previous page; omit it to read the first page. Applies to List steps. |
depth | integer | optional | Limits step expansion to the requested nesting depth. Applies to List steps. |
Responses
| Status | Description | Body |
|---|---|---|
200 | Response for status 200 | application/json — object — agentSteps: array<AgentStepTreeNode> (required); pagination: object (required) |
400 | The request is malformed or cannot be processed. | application/json — PublicApiError — error: object (required) |
401 | Authentication failed. The Authorization header is missing, or the credential is invalid or expired. | application/json — PublicApiError — error: object (required) |
403 | Access denied. The authenticated user does not have permission to perform this action. | application/json — PublicApiError — error: object (required) |
404 | Resource not found. | application/json — PublicApiError — error: object (required) |
409 | Request conflicts with current state of the resource, including safe deployment conflict classifications. | application/json — PublicApiError — error: object (required) |
422 | Request validation failed. Check the request body, query parameters, or path parameters. | application/json — PublicApiError — error: object (required) |
429 | Too many requests. The code foreign_resource_rate_limited means the caller made too many requests for Projects outside its reach: correct the Project id instead of retrying. | application/json — PublicApiError — error: object (required) |
500 | The server could not complete the request. | application/json — PublicApiError — error: object (required) |
503 | Service temporarily unavailable (e.g. execution capacity exhausted). The response carries a Retry-After header; retry with backoff. | application/json — PublicApiError — error: object (required) |
Get a step
GET /api/v1/agent-runs/{agentRunId}/steps/{agentStepId}
Retrieve detailed information about a specific step.
Response
- Returns full step details
- Includes agent information and execution context
AgentStep Data
- Step execution details (timing, token usage)
- Agent information used for the step
- Status and execution metadata
Authentication
- Requires a valid session or API key in the Authorization header
- The caller must have operation-specific access to the run's owning organization and persisted Project, Environment, or Agent scope
Parameters
path
| Name | Type | Required | Description |
|---|---|---|---|
agentRunId | string | required | Identifies the agent run whose state or history is addressed. Applies to Get a step. |
agentStepId | integer | required | Identifies the step within the addressed agent run. Applies to Get a step. |
Responses
| Status | Description | Body |
|---|---|---|
200 | Response for status 200 | application/json — object — data: object (required) |
400 | The request is malformed or cannot be processed. | application/json — PublicApiError — error: object (required) |
401 | Authentication failed. The Authorization header is missing, or the credential is invalid or expired. | application/json — PublicApiError — error: object (required) |
403 | Access denied. The authenticated user does not have permission to perform this action. | application/json — PublicApiError — error: object (required) |
404 | Resource not found. | application/json — PublicApiError — error: object (required) |
409 | Request conflicts with current state of the resource, including safe deployment conflict classifications. | application/json — PublicApiError — error: object (required) |
422 | Request validation failed. Check the request body, query parameters, or path parameters. | application/json — PublicApiError — error: object (required) |
429 | Too many requests. The code foreign_resource_rate_limited means the caller made too many requests for Projects outside its reach: correct the Project id instead of retrying. | application/json — PublicApiError — error: object (required) |
500 | The server could not complete the request. | application/json — PublicApiError — error: object (required) |
503 | Service temporarily unavailable (e.g. execution capacity exhausted). The response carries a Retry-After header; retry with backoff. | application/json — PublicApiError — error: object (required) |
Get checkpoint artifact metadata
GET /api/v1/agent-runs/{agentRunId}/steps/{agentStepId}/checkpoints/{checkpointId}
Parameters
path
| Name | Type | Required | Description |
|---|---|---|---|
agentRunId | string | required | Identifies the agent run whose state or history is addressed. Applies to Get checkpoint artifact metadata. |
agentStepId | integer | required | Identifies the step within the addressed agent run. Applies to Get checkpoint artifact metadata. |
checkpointId | integer | required | Identifies the checkpoint within the addressed agent step. Applies to Get checkpoint artifact metadata. |
Responses
| Status | Description | Body |
|---|---|---|
200 | Response for status 200 | application/json — object — data: object (required) |
400 | The request is malformed or cannot be processed. | application/json — PublicApiError — error: object (required) |
401 | Authentication failed. The Authorization header is missing, or the credential is invalid or expired. | application/json — PublicApiError — error: object (required) |
403 | Access denied. The authenticated user does not have permission to perform this action. | application/json — PublicApiError — error: object (required) |
404 | Resource not found. | application/json — PublicApiError — error: object (required) |
409 | Request conflicts with current state of the resource, including safe deployment conflict classifications. | application/json — PublicApiError — error: object (required) |
422 | Request validation failed. Check the request body, query parameters, or path parameters. | application/json — PublicApiError — error: object (required) |
429 | Too many requests. The code foreign_resource_rate_limited means the caller made too many requests for Projects outside its reach: correct the Project id instead of retrying. | application/json — PublicApiError — error: object (required) |
500 | The server could not complete the request. | application/json — PublicApiError — error: object (required) |
503 | Service temporarily unavailable (e.g. execution capacity exhausted). The response carries a Retry-After header; retry with backoff. | application/json — PublicApiError — error: object (required) |
Get checkpoint artifact metadata
HEAD /api/v1/agent-runs/{agentRunId}/steps/{agentStepId}/checkpoints/{checkpointId}
Parameters
path
| Name | Type | Required | Description |
|---|---|---|---|
agentRunId | string | required | Identifies the agent run whose state or history is addressed. Applies to Get checkpoint artifact metadata. |
agentStepId | integer | required | Identifies the step within the addressed agent run. Applies to Get checkpoint artifact metadata. |
checkpointId | integer | required | Identifies the checkpoint within the addressed agent step. Applies to Get checkpoint artifact metadata. |
Responses
| Status | Description | Body |
|---|---|---|
200 | Response for status 200 | application/json — object — data: object (required) |
204 | Response for status 204 | none — none |
400 | The request is malformed or cannot be processed. | application/json — PublicApiError — error: object (required) |
401 | Authentication failed. The Authorization header is missing, or the credential is invalid or expired. | application/json — PublicApiError — error: object (required) |
403 | Access denied. The authenticated user does not have permission to perform this action. | application/json — PublicApiError — error: object (required) |
404 | Resource not found. | application/json — PublicApiError — error: object (required) |
409 | Request conflicts with current state of the resource, including safe deployment conflict classifications. | application/json — PublicApiError — error: object (required) |
422 | Request validation failed. Check the request body, query parameters, or path parameters. | application/json — PublicApiError — error: object (required) |
429 | Too many requests. The code foreign_resource_rate_limited means the caller made too many requests for Projects outside its reach: correct the Project id instead of retrying. | application/json — PublicApiError — error: object (required) |
500 | The server could not complete the request. | application/json — PublicApiError — error: object (required) |
503 | Service temporarily unavailable (e.g. execution capacity exhausted). The response carries a Retry-After header; retry with backoff. | application/json — PublicApiError — error: object (required) |
Stream live run telemetry
GET /api/v1/agent-runs/{agentRunId}/stream
Stream live runtime telemetry for an agent run via Server-Sent Events (SSE).
- Runtime PerstackEvent objects are relayed as
messageevents. pingevents are transport keepalives only.- Lifecycle state is not part of this stream. Use
GET /agent-runs/:idfor current state,/transitionsfor lifecycle history, and checkpoints for durable runtime history/replay. - The stream is bound to the run attempt it attached to. It closes when that
attempt's runtime telemetry ends, or within about two seconds after the run
leaves its live state (
running/canceling) or the attached attempt ends, whether or not a terminal runtime event was relayed. ReadGET /agent-runs/:idfor the outcome, and re-attach only when that state is live again. - The route performs auth/resource/state/runner-attach preflight before
the SSE body starts. Non-live states return HTTP status:
409when no live runtime stream exists,503 + Retry-Afterwhen the run is not ready or runner attachment is temporarily unavailable.
Authentication
- Requires a valid session or API key in the Authorization header
Parameters
path
| Name | Type | Required | Description |
|---|---|---|---|
agentRunId | string | required | Identifies the agent run whose state or history is addressed. Applies to Stream live run telemetry. |
Responses
| Status | Description | Body |
|---|---|---|
200 | SSE stream (text/event-stream) | text/event-stream — string |
400 | The request is malformed or cannot be processed. | application/json — PublicApiError — error: object (required) |
401 | Authentication failed. The Authorization header is missing, or the credential is invalid or expired. | application/json — PublicApiError — error: object (required) |
403 | Access denied. The authenticated user does not have permission to perform this action. | application/json — PublicApiError — error: object (required) |
404 | Resource not found. | application/json — PublicApiError — error: object (required) |
409 | Request conflicts with current state of the resource, including safe deployment conflict classifications. | application/json — PublicApiError — error: object (required) |
422 | Request validation failed. Check the request body, query parameters, or path parameters. | application/json — PublicApiError — error: object (required) |
429 | Too many requests. The code foreign_resource_rate_limited means the caller made too many requests for Projects outside its reach: correct the Project id instead of retrying. | application/json — PublicApiError — error: object (required) |
500 | The server could not complete the request. | application/json — PublicApiError — error: object (required) |
503 | Service temporarily unavailable (e.g. execution capacity exhausted). The response carries a Retry-After header; retry with backoff. | application/json — PublicApiError — error: object (required) |
Replay a run's lifecycle journal
GET /api/v1/agent-runs/{agentRunId}/transitions
Return the run's full transition journal in seq order. Every lifecycle change (queued→acquiring, …, terminal) is one journal entry carrying the acting component, the attempt it belongs to, and an optional reason.
Authentication
- Requires a valid session or API key in the Authorization header
- The credential must be authorized for the canonical Agent Run operation and its Organization/Project/Environment/Agent resource scope
Parameters
path
| Name | Type | Required | Description |
|---|---|---|---|
agentRunId | string | required | Identifies the agent run whose state or history is addressed. Applies to Replay a run's lifecycle journal. |
query
| Name | Type | Required | Description |
|---|---|---|---|
limit | integer | optional | Sets the maximum number of resources returned in this page. Applies to Replay a run's lifecycle journal. |
cursor | string | optional | Opaque cursor returned by the previous page; omit it to read the first page. Applies to Replay a run's lifecycle journal. |
Responses
| Status | Description | Body |
|---|---|---|
200 | Response for status 200 | application/json — object — data: object (required); pagination: object (required) |
400 | The request is malformed or cannot be processed. | application/json — PublicApiError — error: object (required) |
401 | Authentication failed. The Authorization header is missing, or the credential is invalid or expired. | application/json — PublicApiError — error: object (required) |
403 | Access denied. The authenticated user does not have permission to perform this action. | application/json — PublicApiError — error: object (required) |
404 | Resource not found. | application/json — PublicApiError — error: object (required) |
409 | Request conflicts with current state of the resource, including safe deployment conflict classifications. | application/json — PublicApiError — error: object (required) |
422 | Request validation failed. Check the request body, query parameters, or path parameters. | application/json — PublicApiError — error: object (required) |
429 | Too many requests. The code foreign_resource_rate_limited means the caller made too many requests for Projects outside its reach: correct the Project id instead of retrying. | application/json — PublicApiError — error: object (required) |
500 | The server could not complete the request. | application/json — PublicApiError — error: object (required) |
503 | Service temporarily unavailable (e.g. execution capacity exhausted). The response carries a Retry-After header; retry with backoff. | application/json — PublicApiError — error: object (required) |
List the past runs this run recalled
GET /api/v1/agent-runs/{agentRunId}/work-memory-reads
Returns every long-term memory read the run's work-memory delegate performed, oldest first: which past run it read and whether it saw an excerpt, the summary, or the transcript.
Parameters
path
| Name | Type | Required | Description |
|---|---|---|---|
agentRunId | string | required | Identifies the agent run whose state or history is addressed. Applies to List the past runs this run recalled. |
Responses
| Status | Description | Body |
|---|---|---|
200 | Response for status 200 | application/json — object — reads: array<object> (required) |
400 | The request is malformed or cannot be processed. | application/json — PublicApiError — error: object (required) |
401 | Authentication failed. The Authorization header is missing, or the credential is invalid or expired. | application/json — PublicApiError — error: object (required) |
403 | Access denied. The authenticated user does not have permission to perform this action. | application/json — PublicApiError — error: object (required) |
404 | Resource not found. | application/json — PublicApiError — error: object (required) |
409 | Request conflicts with current state of the resource, including safe deployment conflict classifications. | application/json — PublicApiError — error: object (required) |
422 | Request validation failed. Check the request body, query parameters, or path parameters. | application/json — PublicApiError — error: object (required) |
429 | Too many requests. The code foreign_resource_rate_limited means the caller made too many requests for Projects outside its reach: correct the Project id instead of retrying. | application/json — PublicApiError — error: object (required) |
500 | The server could not complete the request. | application/json — PublicApiError — error: object (required) |
503 | Service temporarily unavailable (e.g. execution capacity exhausted). The response carries a Retry-After header; retry with backoff. | application/json — PublicApiError — error: object (required) |