Agent Runs are provider-neutral. Requests select an Environment harness ID, not a compute provider or a shell command.
Declare a harness
An Environment manifest must explicitly allow every agent harness:environmentKeys list.
Create a run
202 response contains the durable Run and Operation. Reusing the same
idempotency key with the same request replays that result; using it with a
different request returns 409. The Operation resource uses the Run’s public
ID and identifies its containing Sandbox through resource.parent.
Input bytes are written to private immutable Artifact storage. PostgreSQL and
Run events contain only the input digest and safe metadata.
The initial, steering, and cancellation harness envelopes carry the selected
model, bounded tool names, selected environment-key names, and safe endpoint
metadata when a Run uses an authenticated Endpoint. The runtime re-derives
these controls from durable state before delivery. Provider processes inherit
only the requested environment-key subset, never every secret present in the
Sandbox.
CLI and MCP
Keep run input out of shell history. The CLI accepts the complete request from a file or stdin and returns the exact API DTO with global--json:
Last-Event-ID and exits nonzero when the
Run fails, is cancelled or times out. Over MCP, use
create_agent_run, get_agent_run, get_agent_run_event_snapshot,
steer_agent_run, cancel_agent_run and list_agent_run_artifacts.
Snapshot calls return nextAfter; pass it as the next afterSequence.
Compute pricing
Sandbox Offers, Quotes, and Sandboxes disclose the compute provider. Requests remain provider-neutral and cannot name or override a provider. The pricing object also disclosesbillingModel:
reservedsettles the first reserved increment when the Sandbox becomes ready, then bills subsequent full increments and a final partial increment at the sealed Quote rate.observedreleases the initial wallet hold when the Sandbox becomes ready, then bills completed minute-aligned windows from the provider’s reported actual spend after its reporting lag. Provider nano-USD estimates are rounded conservatively up to exact six-decimal USD.
observed offer. Usage windows
are durably reconciled so delayed provider reporting retries instead of
silently creating an unbilled interval.
Follow and steer
Events are ordered bysequence. Reconnect an SSE client with the last
received sequence:
afterSequence is rejected. Cancellation is also an idempotent
mutation at POST /v1/agent-runs/{id}/cancel.
Artifacts and privacy
List metadata withGET /v1/agent-runs/{id}/artifacts. Fetch one Artifact to
mint a fresh short-lived download URL:
read. Minting a download URL requires
compute manage; read-only API keys and organization members are refused.
Prompts, tool arguments, tool output, logs, checkpoints, and generated files
never appear in event payloads. Unrecognized stdout and all stderr are captured
as bounded private log Artifacts. Cross-organization identifiers return the
same 404 as unknown identifiers.
Agent input, steering, output, log, checkpoint, and file bytes are retained for
seven days by default, measured from each Artifact’s availableAt time. The
Run, its events, and Artifact metadata remain durable after those bytes expire.
Expired or deleted Artifacts do not return a download URL.
Cleanup deletes the exact immutable object generation recorded for the
Artifact. If storage deletion fails, metadata remains available and cleanup
retries later; it is marked deleted only after storage confirms deletion.