---
title: "Get an agent run"
method: GET
path: "/v1/agent-runs/{id}"
tags: ["agent-runs"]
---

# Get an agent run

`GET /v1/agent-runs/{id}`

Returns the run's status plus the append-only event log rows after
the `since` sequence number. Poll this to stream a run's progress.

## Path parameters

- `id` string, required

## Query parameters

- `since` integer

## Response `200`

OK

- GetAgentRunSuccessResponse
  - `code` integer
  - `data` AgentRunData
    - `events` RunEvent[]
      - `createdAt` string
      - `level` string
      - `message` string
      - `metadata` object
      - `seq` integer
      - `type` string
    - `state` RunState
      - `assistantText` string
      - `detail` string
      - `finishedAt` string
      - `phase` string
      - `runId` string
      - `savedWorkflowIds` string[] — SavedWorkflowIDs are the workflow ids the run ACTUALLY saved/edited (workflow-builder's wf-save ledger, reported on agent_done; success only). Mirrored verbatim from the worker so Caddie can refresh the canvas.
      - `servedPath` string — ServedPath is the worker-relative path a serve-capable agent's output is served at (e.g. "/artifacts/<runId>/"); ServedURL is the absolute, browser-openable URL the API composes from it (worker base + path) so a client can surface the built app's link. Both empty for non-serving runs.
      - `servedUrl` string
      - `startedAt` string
      - `truncated` boolean — Truncated marks a run that hit its budget and stopped mid-task. The consumer relays the answer differently, so dropping these here would present half a report as the whole one.
      - `truncationReason` string
      - `turns` integer
      - `usage` RunUsage
        - `callCount` integer
        - `completionTokens` integer
        - `costUsd` number
        - `model` string
        - `promptTokens` integer
  - `message` string
  - `requestId` string

---

[API](https://skmtc.dev/b3os/apis/b3os-workflow-api.md) · [All operations](https://skmtc.dev/b3os/apis/b3os-workflow-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/b3os/b3os-workflow-api/revisions/a8c7af3c66a1/schema)
