Runs API

Inspect runtime status, outputs, and step traces for every agent execution.

Required Scopes

agents:executeagents:read

Endpoints

GET/runs

List runs with status filtering.

GET/runs/{runId}

Get a run with output payload.

GET/runs/{runId}/steps

Retrieve ordered execution steps for observability.

Code Examples

Curl

curl "https://api.servoagent.com/v1/runs/run_123/steps" \
  -H "Authorization: Bearer sk_live_..."

Python

steps = client.runs.steps(run_id="run_123")
for step in steps.data:
    print(step.name, step.status, step.durationMs)

Node.js

const steps = await client.runs.steps({ runId: 'run_123' })
for (const step of steps.data) {
  console.log(step.name, step.status, step.durationMs)
}

Go

steps, err := client.Runs.Steps(ctx, "run_123")
if err != nil {
  log.Fatal(err)
}
for _, step := range steps.Data {
  fmt.Println(step.Name, step.Status, step.DurationMS)
}

Ruby

steps = client.runs.steps(run_id: 'run_123')
steps['data'].each do |step|
  puts "#{step['name']} #{step['status']} #{step['durationMs']}"
end

Test It Live

Use API Explorer to execute these endpoints and generate request snippets from real inputs.

Open API Explorer