Features

Runs

How an agent executes: lifecycle, ways to launch, inputs, results, logs and limits.

A run is one execution of an agent in its own sandbox. A run has an id (run_ followed by a UUID), a per-agent runNumber, a status, a result and an audit trail that records who or what launched it.

Lifecycle

pending → running → success | failed | timeout | cancelled
StatusMeaning
pendingThe run exists, the sandbox is being provisioned.
runningThe agent loop is executing.
successThe run finished and its output (if a schema is declared) is valid.
failedAn error, an invalid output, a model failure, or a stall detected by the watchdog.
timeoutThe run exceeded its timeout.
cancelledSomeone cancelled it.

Terminal runs carry completed_at, duration (milliseconds), cost (US dollars) and token_usage (see Run cost).

Launching a run

From the web app

Open an agent and click Run. If the agent declares an input schema, a form generated from it appears. The run page streams logs and status as the run progresses (see The run page).

From the API

curl -X POST https://your-instance/api/agents/@acme/support-triage/run \
  -H "Authorization: Bearer apst_your_key" \
  -H "Idempotency-Key: 2f1c0b0e-launch-001" \
  -H "Content-Type: application/json" \
  -d '{ "input": { "max_tickets": 10 } }'

The call is fire-and-forget: it answers 201 with the created run resource (the same shape as GET /api/runs/{id}, with status usually pending or already running) and execution continues in the background. The route is rate-limited to 20 requests per minute and honours Idempotency-Key.

The body is closed (an unknown field is a 400) and every field is optional:

FieldMeaning
inputValues for the agent's input schema. File fields take upload://, appfile:// or inline data URIs (see Files).
rerun_fromA previous run id whose stored input is replayed. Mutually exclusive with input. The run must belong to the same agent (409 rerun_agent_mismatch).
modelIdModel for this run only (system model key or organization model id).
generationPer-run temperature and reasoning_level.
proxyIdProxy for this run, or "none" for direct egress.
connection_overridesPer-integration connection picks, as arrays of connection ids. A set imposed by an admin pin or an enforced default is always bound: an override can only add to it (Preview).
dependency_overridesPer-run version overrides for skills and integrations. "draft" requires write access to that package.

Query parameter version chooses the agent definition: published (default, the latest published version), a version, dist-tag or semver range, or draft for callers who can write the agent. The run records the definition it used in version_ref.

Headers worth knowing: X-Space-Id (browser sessions), Appstrate-User (impersonation), Appstrate-Version (API versioning), and X-Appstrate-Connect-Offers: 1, which asks a 409 missing_integration_connection to carry a ready-to-open connect link for each missing integration.

Launch failures that create no run: 400 model_not_configured or 400 model_credential_missing when no usable model is configured, 404 agent_not_active_in_space, 404 no_published_version, 422 dependency_unresolved, 422 bundle_invalid, 409 missing_integration_connection, 409 model_credential_required (the model is left to each member's own credential and the caller has none), 402 when the optional billing module refuses usage, 413 when input files exceed their caps.

Waiting for the result

Poll GET /api/runs/{id}, or let the server hold the request:

curl "https://your-instance/api/runs/run_0194...?wait=55" \
  -H "Authorization: Bearer apst_your_key"

wait accepts true or a number of seconds, capped at 55. The call returns when the run reaches a terminal status or the wait elapses, so a non-terminal status means "ask again". Each identity can hold 10 concurrent waits. To watch live progress, use the realtime streams. The run_and_wait tool of the MCP server launches and waits in one call.

Rerunning

Send rerun_from instead of input. Files attached through upload:// are kept as durable appfile:// references, so a rerun does not need them uploaded again. Inline data: files are not replayable (409 rerun_inline_input_unavailable): stage them with an upload when the input must be replayable.

Inline runs

An inline run executes an agent defined entirely in the request, without publishing a package first.

curl -X POST https://your-instance/api/runs/inline \
  -H "Authorization: Bearer apst_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "manifest": {
      "name": "@inline/summarize-contract",
      "version": "0.0.0",
      "type": "agent",
      "schema_version": "0.3",
      "display_name": "Summarize contract"
    },
    "prompt": "Summarize the attached document.",
    "context_files": ["appfile://file_..."]
  }'

The body takes manifest and prompt (required), input, context_files (existing appfile:// files mounted read-only), connection_overrides, modelId, proxyId and generation. The platform stores a temporary shadow package (package_ephemeral: true on the run), runs it through the normal pipeline, and keeps the manifest and prompt snapshot for the retention window (default 30 days) before compacting them.

An inline run can select the note and pin runtime tools, and what they write is readable on the run page by whoever can read the run. Referenced skills and integrations must already exist in the organization or system catalog. Composing a manifest is authoring and launching it is running, so the caller needs both agents:write and agents:run.

POST /api/runs/inline/validate runs the same preflight (manifest, input, integration readiness) without creating anything. It has the same per-minute cap as inline runs, counted separately.

Remote runs

A remote run (runOrigin: "remote") executes the agent on the caller's host, for example appstrate run --local or a GitHub Action, and streams signed events back to the platform. The platform still tracks its status, logs, files, cost and liveness. In the web app it carries a Remote badge and has no Cancel button, because the platform cannot signal the caller's host. A silent runner is finished by the watchdog. How to start one, the scopes its key needs, and how it reaches the organization's models and the space's connections through the LLM proxy and the credential proxy are in CLI.

Results

A finished run exposes:

  • result.output: the structured value passed to the output tool, validated against output.schema when one exists. It is null while the run is in flight or when no output was emitted.
  • error: a message when the run did not succeed, kept verbatim for debugging.
  • model_error (Preview): for a run that failed on a model call, a category (credential_unavailable, rate_limited, upstream_unavailable, invalid_request or unknown), whether it is retryable, and the provider's status and message. It is null on every other run. Branch on it, not on the error text.
  • Files: deliverables the agent wrote under ./outputs/ or published with publish_file (see Files). file_counts gives the number of input and output files. artifacts summarises the end-of-run sweep (complete or partial, with the names of any files that could not be stored).
  • checkpoint: the carry-over snapshot of the run (see Memory).
  • connections_used: the connections bound to the run, for display.

Logs

curl "https://your-instance/api/runs/run_0194.../logs?level=info&limit=500" \
  -H "Authorization: Bearer apst_your_key"

The response is a list envelope. since=<id> returns entries with a greater id and is the cursor for tailing. level is a minimum severity (debug, info, warn, error). limit defaults to 1000 and, when more follow, a Link: rel="next" header points at the next page. The route is limited to 120 requests per minute. Tool results inside log data are truncated at write time (2048 bytes by default).

The run page

Open a run from Runs, from an agent's runs tab or from a notification. The same page serves a running and a finished run, and updates live. It has three tabs: Overview (the default: trigger, start time, cost and duration in the header, then the execution, activity, results, usage, input, connections used and metadata of the run, plus a per-turn breakdown), Journal (the run's logs, where each tool call is a single row that opens on its arguments and result) and Results (the files, the structured output and the memory the run produced). The URL hash (#journal, #results) selects a tab. The header shows the run status, a Remote badge for a remote run, and Re-run and Cancel buttons. Cards above the tabs report Connection lost during this run when an integration's authentication failed even after a refresh (each one with a Reconnect link, and its id in metadata.degraded_integrations), Model replaced when the run fell back to the default model, and Some files were not saved when the end-of-run sweep could not store some outputs (re-running the agent regenerates them). The cost and the context gauge are explained in A zero is not always free.

Degraded runs

Some things the platform cannot give a run are not errors, so the run starts anyway and records the gap as a warn entry in the run's logs. The entries have type system, and their data carries platform: true. They are written once, right after the run is created and before the sandbox's own logs, for runs the platform launches, and a failure to write one never fails the run. The run's status is not changed by them. Without them, a run that started with fewer tools would look the same as an agent that chose not to use them. In the web app they appear as warning lines in the Journal tab. Over the API, read GET /api/runs/{id}/logs (level=warn narrows it) and look for these event values.

eventWhat it means
integration_droppedThe agent declares an integration that could not be started, so its tools are unavailable to this run. One entry per drop.
generation_setting_droppedA stored generation setting (temperature or reasoning_level, from the space's defaults or a schedule's override) is refused by the run's model, so the run goes on without it. One entry per setting.
model_fallbackThe model chosen for the run is no longer usable, so the run uses the default model instead.

integration_dropped carries integrationId, a reason, and optionally a detail and a connectionLabel. The connection label is set when the drop concerns one bound connection. Several connections bound to one integration form a set that starts whole or not at all: when one of them has no usable credential, the integration is dropped, the lost connection with no_delivery and each of the others with bound_set_incomplete.

reasonCause
not_foundNo package with that id.
not_integrationThe package is of another type (the detail names it).
invalid_manifestThe integration's manifest fails validation.
not_activeThe integration is not active in the space.
remote_source_invalidA remote integration has no usable url and transport.
local_server_ref_missingA local integration names no server package.
mcp_server_unresolved, mcp_server_not_runnableThe MCP server package it references could not be resolved, or has no runnable configuration.
no_deliveryThe bound connection is no longer reachable, or it has no usable credential (for example a corrupted one). A credential encrypted under a key the instance does not hold fails the launch with 503 encryption_key_unavailable instead.
bound_set_incompleteAnother connection of the same bound set had no usable credential.
resolve_errorAn unexpected error while resolving it, with its message in detail.

generation_setting_dropped carries setting, value, model and reason: "refused_by_model". model_fallback carries pinnedModelId, model and reason: "pinned_model_unavailable". Read these entries when an agent seems to be missing a tool or ignoring a setting. An integration whose tool selection is empty is skipped without an entry, because there is nothing to expose. An integration whose source.server.version pin cannot be satisfied is a different case: the launch fails with 422 dependency_unresolved and no run starts.

Cancelling

curl -X POST https://your-instance/api/runs/run_0194.../cancel \
  -H "Authorization: Bearer apst_your_key"

The call returns the updated run, already cancelled, once the sandbox has been stopped. It requires runs:cancel and applies only to runs you may read. A run that is already terminal answers 409 not_cancellable.

Listing and deleting

GET /api/runs lists the runs of the current space. Filters: user=me, kind (all, package, inline), status (one or several, comma-separated, as in status=failed,timeout; several values are Preview), q (Preview: free text on the agent and the error, or on the run number), start_date, end_date, chat_session_id, with limit (max 100) and offset. GET /api/agents/{scope}/{name}/runs lists one agent's runs.

Visibility follows roles and permissions: runs:read shows the runs you launched, runs:read-all shows every run of the space. DELETE /api/agents/{scope}/{name}/runs deletes the completed runs of an agent and needs runs:delete plus runs:read-all. It is refused while a run of that agent is in progress.

Who launched it

Every run records the identity it ran as, and how it was triggered. A run has an actor, either userId or endUserId, and may also carry the key or schedule that triggered it:

FieldMeaning
userIdThe member the run executed as (dashboard, CLI, MCP, chat). For a run started with an API key, the member who created the key.
endUserIdThe end-user the run executed as, instead of a member.
apiKeyIdSet in addition to the actor when a server-side API key launched it.
scheduleIdSet in addition to the actor (the schedule's actor) when a schedule fired.

The response adds readable names (user_name, end_user_name, api_key_name, schedule_name), plus runner_name and runner_kind for remote runs. model_label, model_source and proxy_label freeze which model and proxy the run used.

Limits

These are operator settings. The values below are the defaults. The variables are described in Environment Variables.

LimitDefaultSetting
Run timeout ceiling (a manifest timeout is clamped to it)1800 sPLATFORM_RUN_LIMITS.timeout_ceiling_seconds
Timeout when the manifest declares none300 sfixed
Concurrent runs per organization50PLATFORM_RUN_LIMITS.max_concurrent_per_org
Runs started per organization per minute200PLATFORM_RUN_LIMITS.per_org_global_rate_per_min
Agent memory and CPU ceiling1536 MiB, 2 vCPUPLATFORM_RUN_LIMITS.agent_memory_ceiling_mb, agent_cpu_ceiling
Inline runs per minute60INLINE_RUN_LIMITS.rate_per_min
Inline manifest / prompt size65536 / 200000 bytesINLINE_RUN_LIMITS.manifest_bytes, prompt_bytes
Skills in an inline run20INLINE_RUN_LIMITS.max_skills
Inline shadow retention30 daysINLINE_RUN_LIMITS.retention_days
Files per run (input and output)200RUN_MAX_FILES

Run boot and stall limits are covered in Run liveness.

On this page