GET
/
v1
/
teams
/
{teamId}
/
agent-runs
/
{runId}
/
trace
/
steps
TypeScript client
import { OctosparkClient } from '@octospark/sdk'

const client = new OctosparkClient({
  token: process.env.OCTOSPARK_TOKEN
})

const response = await client.agents.listRunTraceSteps({
  teamId: process.env.OCTOSPARK_TEAM_ID ?? "teamId",
  runId: process.env.OCTOSPARK_RUN_ID ?? "runId",
  query: {},
})
{
  "data": [
    {
      "id": "<string>",
      "runId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "ordinal": 123,
      "name": "<string>",
      "callId": "<string>",
      "parentStepId": "<string>",
      "attempt": 123,
      "startedAt": "<string>",
      "finishedAt": "<string>",
      "input": "<string>",
      "output": "<string>",
      "error": "<string>",
      "model": "<string>",
      "inputTokens": 123,
      "outputTokens": 123,
      "cachedTokens": 123,
      "providerCostUsd": 123
    }
  ],
  "total": 123,
  "nextCursor": "<string>",
  "prevCursor": "<string>",
  "historyComplete": true,
  "pageOffset": 123
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

teamId
string
required

Team (workspace) id (UUID). Discover ids via the list teams endpoint or the agent context.

runId
string
required

Agent run id (UUID), as returned by the start/list runs endpoints.

Query Parameters

cursor
string

Opaque signed page cursor scoped to this team, run and trace source. Steps are ordered by execution ordinal ascending.

limit
string

a string to be decoded into a number

Response

RunTraceSteps

data
object[]
required
total
number
required
nextCursor
string | null
required

Opaque cursor for the page after this one; null on the last page.

prevCursor
string | null
required

Opaque cursor for the page before this one; null on the first page. Lists on the signed cursor standard return a real backwards cursor; older lists echo the request cursor.

historyComplete
boolean
required
pageOffset
number | null

Zero-based position of the first row of this page within total (for "Showing 26-50 of 268" and page numbers); null when unknown.