Browse this section
API reference

Runs

Inspect runs, traces and approvals.

The run object

{
  "id": "run_01j9x6e5f6",
  "agent": "agt_01j9x5c3d4",
  "version": 7,
  "mode": "production",
  "status": "waiting_approval",
  "trigger": { "type": "email.received", "mailbox": "invoices@", "message_id": "<…>" },
  "input": { "…": "…" },
  "output": null,
  "approvals": [ { "id": "apr_01j9…", "tool": "netvisor.purchase_invoices", "reason": "amount >= 5000", "approvers": ["finance-leads"], "status": "open" } ],
  "started_at": "2026-09-19T08:20:11Z",
  "ended_at": null,
  "duration_ms": null,
  "cost": { "amount": "0.31", "currency": "EUR" }
}

Statuses: queued, running, waiting_approval, succeeded, handed_off, failed, cancelled.

Endpoints

MethodPathPurpose
GET/runsList (filters: agent, status, trigger_type, since, until)
GET/runs/{id}Retrieve
GET/runs/{id}/traceFull trace (steps)
POST/runs/{id}/cancelCancel a queued/running run
GET/runs/{id}/approvalsList approvals
POST/runs/{id}/approvals/{approval_id}Decide: `{ "decision": "approve"
POST/workspace/emergency-stopStop all agents (admin)
POST/workspace/resumeResume after emergency stop (admin)

Trace

{
  "run": "run_01j9x6e5f6",
  "steps": [
    { "n": 1, "type": "trigger", "at": "…", "data": { "type": "email.received" } },
    { "n": 2, "type": "tool_call", "tool": "gmail.read", "scope": "read", "duration_ms": 220, "request": { "…": "…" }, "response_summary": "1 message, 1 PDF attachment" },
    { "n": 3, "type": "retrieval", "knowledge_bases": ["finance-eu"], "query": "supplier Nordic Print Oy", "passages": 4 },
    { "n": 4, "type": "reasoning", "summary": "Supplier matched. Total 6,240.00 ≥ 5,000 → approval required." },
    { "n": 5, "type": "approval", "policy": "amount >= 5000", "approvers": ["finance-leads"], "status": "open" }
  ]
}

Waiting for completion

Poll GET /runs/{id} or subscribe to run.completed and run.approval_requested webhooks.