Skip to content
Navigation

Get an agent run

Returns an agent run: where it is, the state of every step, what it is waiting on, and what it produced.

  • tasks[] is the step ledger. executor: "human" steps are yours to complete; summary is what the agent recorded when a step closed.
  • approvals[] lists the sign-offs the run is blocked on, each with the proposed params and files.
  • waiting counts both at a glance while status is waiting.
  • result and output.files carry the outcome.
  • agent.id and input.files are the immutable recipe for starting a successor after any terminal result.

Long-polling. ?wait=<seconds> (0–120) holds the request until the run finishes or blocks on a person.

Note: A paused run is not a failure: it stopped short, kept everything it produced, and can be started again. Nothing an agent run imported or attached is ever taken back.

Reading a queued run is also what starts it once its files are ready, so poll it rather than waiting. expiresAt is the run's deadline — an unfinished run parks itself for good when it passes, so a human step has to land before then.

Note: Run scope is changing. Today any API key of your organization may read and steer any agent run of that organization. Turn on the organization feature flag v1_scoped_runs and each key sees only the runs it created; a run created before you turned it on keeps answering every key. Scoping becomes the default in a future release, so give each integration its own key now.

Learn more: Agents guide

GET
https://api.cloudraker.com/v1/agent-runs/{id}
Try it
Path parameters
Query parameters
Live API request

Authorization

  • bearerAuth
    HTTP
    required

Path parameters

  • id
    string
    required
    minLength: 1

Query parameters

  • wait
    optional
    integer

    How many seconds to hold the request open. Releases early the moment the run finishes or blocks on a person. Maximum 120; 0 returns immediately.

    maximum: 120 · minimum: 0 · default: 0

Returns

200

The run.

JSON
  • object
    string
    required
  • id
    string
    required
  • agent
    object
    required
    • id
      string
      required
    • name
      string
      required
    • version
      number
      required
  • input
    object
    required
    • files
      array of
      object
      required

      The immutable input file ids. Reuse these with agent.id to start a successor after a terminal run.

      • id
        string
        required
  • status
    queued
    or
    processing
    or
    waiting
    or
    paused
    or
    completed
    or
    failed
    +2 more
    required

    Where the agent run is in its life.

    Status Meaning
    queued Accepted; its files are still being prepared
    processing The agent is working
    waiting Blocked on a person — see waiting, approvals and tasks[]
    paused Stopped short of finishing and resumable; not a failure
    completed Finished; result and output are populated
    failed Finished without producing a result
    cancelled Stopped on request
    expired Reached its expiresAt without finishing

    completed, failed, cancelled and expired are terminal. A completed run that still had outstanding work also carries incomplete: true.

  • progress
    object
    required
    • tasks
      object
      required
      • total
        number
        required
      • completed
        number
        required
  • tasks
    array of
    object
    required
    • id
      string
      required
    • title
      string
      required
    • executor
      agent
      or
      human
      required

      Who performs the step: agent runs by itself, human waits for a person to complete it.

    • status
      pending
      or
      ready
      or
      in_progress
      or
      completed
      or
      skipped
      required

      Where this step stands. pending is blocked on its dependencies, ready is claimable, skipped satisfies anything waiting on it.

    • summary
      string | null
      required
    • completedAt
      string | null
      required
    • note
      optional
      string
  • statusUrl
    string
    required
  • createdAt
    string
    required
  • expiresAt
    string | null
    required

    The run’s deadline: about seven days after it starts, an unfinished run parks itself for good and its status becomes expired. null once the run is finished. Files and anything the run already filed are never taken back.

  • finishedAt
    string | null
    required
  • waiting
    optional
    object

    What is blocking the run. Present while status is waiting.

    • approvals
      number
      required
    • tasks
      number
      required
    • summary
      string
      required
  • paused
    optional
    object

    Why the run parked. Present while status is paused. A paused run keeps everything it produced and can be started again.

    • reason
      model_error
      or
      system_error
      required
  • approvals
    optional
    array of
    object

    Sign-offs the run is waiting on, oldest first.

    • id
      string
      required
    • kind
      before
      or
      output
      required
    • action
      string
      required
    • requestedAt
      string
      required
    • files
      array of
      object
      required
      • id
        string
        required
      • name
        string
        required
    • rationale
      optional
      string | null
    • params
      optional
      map of
      unknown

      The inputs proposed for the step, for a before approval.

  • incomplete
    optional
    boolean

    Present and true on a completed run that still had outstanding work — read tasks[] to see what.

  • result
    optional
    string

    The agent's closing summary.

  • output
    optional
    object

    Files attached to the run while its steps were completed, each with a signed download link valid for about an hour.

    • files
      array of
      object
      required
      • id
        string
        required
      • name
        string
        required
      • url
        optional
        string
  • error
    optional
    object

    Why the run failed. Present whenever status is failed.

    • code
      string
      required
    • message
      string
      required
  • metadata
    optional
    map of
    unknown

400

Validation Error
JSON
  • success
    false
    required
  • error
    array of
    unknown
    required
  • data
    unknown
    required

401

Missing or invalid credentials.
JSON
  • code
    string
    required
  • message
    string
    required
  • retryable
    boolean
    required
  • requestId
    string
    required
  • docUrl
    optional
    string

403

The credential is valid but cannot administer this organization.
JSON
  • code
    string
    required
  • message
    string
    required
  • retryable
    boolean
    required
  • requestId
    string
    required
  • docUrl
    optional
    string

404

Unknown run id (or a run belonging to another organization).

429

Rate limited. The /v1 API allows at least 67 requests per minute per organization (about 1,000 requests per 15 minutes) — a guaranteed floor, enforced per edge location, so a geographically spread caller may get more. Wait for the Retry-After interval and retry — the error is retryable.
JSON
  • code
    rate_limited
    required
  • message
    string
    required
  • retryable
    true
    required
  • requestId
    string
    required
  • docUrl
    optional
    string

Type to search…

↑↓ navigate↵ selectEsc close