Skip to main content
GET
/
api
/
agents
/
{agent_uid}
/
activities
/
{run_uid}
Get activity
curl --request GET \
  --url https://api.example.com/api/agents/{agent_uid}/activities/{run_uid}
Returns the full detail for a specific agent run, including step history, timeline, and scratchpad content.

Path parameters

agent_uid
string
required
UUID of the agent.
run_uid
string
required
UUID of the run.

Query parameters

fields[agent-runs]
string
Comma-separated list of fields to include. Use to request token_usage (requires permission).
include
string
Comma-separated list of related resources to include.

Response

The following example uses fields[agent-runs]=trigger_payload,result,error to include the full run detail. Without sparse fields, only the default attributes are returned.
{
  "status": "success",
  "status_code": 200,
  "data": {
    "id": "run-uuid-here",
    "type": "agent-runs",
    "attributes": {
      "agent_uid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "agent_version_uid": "ver-uuid-here",
      "scratchpad_uid": "sp-uuid-here",
      "workflow_id": "agent-loop-a1b2c3d4",
      "approach": "loop",
      "status": "completed",
      "sandbox": false,
      "trigger_type": "email_received",
      "trigger_payload": {
        "message_uid": "msg-uuid-here"
      },
      "result": {
        "step_history": [
          {
            "step": 1,
            "action": "read_entity",
            "input": { "entity_type": "message", "uid": "msg-uuid-here" },
            "output": { "subject": "Invoice inquiry from Acme Corp" }
          },
          {
            "step": 2,
            "action": "classify_entity",
            "input": { "entity_type": "message", "uid": "msg-uuid-here" },
            "output": { "classification": "payment_inquiry" }
          },
          {
            "step": 3,
            "action": "send_email",
            "input": { "to": ["billing@acme.com"], "subject": "RE: Invoice inquiry" },
            "output": { "uid": "sent-email-uuid", "status": "sent" }
          }
        ],
        "timeline": [
          {
            "event": "goal_defined",
            "at": "2026-03-19T14:30:00Z",
            "detail": "Respond to payment inquiry from Acme Corp"
          },
          {
            "event": "tool_called",
            "at": "2026-03-19T14:30:05Z",
            "tool": "read_entity",
            "detail": "Read message msg-uuid-here"
          },
          {
            "event": "tool_called",
            "at": "2026-03-19T14:30:10Z",
            "tool": "send_email",
            "detail": "Sent reply to billing@acme.com"
          },
          {
            "event": "run_completed",
            "at": "2026-03-19T14:31:15Z"
          }
        ]
      },
      "error": null,
      "started_on": "2026-03-19T14:30:00Z",
      "completed_on": "2026-03-19T14:31:15Z",
      "created_on": "2026-03-19T14:30:00Z"
    }
  }
}

Sandbox run response

When the run has sandbox: true, tool steps for guarded tools show would_* payloads instead of real results:
{
  "step": 3,
  "action": "send_email",
  "input": { "to": ["billing@acme.com"], "subject": "RE: Invoice inquiry" },
  "output": {
    "sandbox": true,
    "would_send": {
      "uid": "generated-uuid",
      "status": "sent",
      "to": ["billing@acme.com"],
      "subject": "RE: Invoice inquiry",
      "body_preview": "Thank you for your inquiry regarding..."
    }
  }
}

Default attributes

Without fields[agent-runs], the response includes: agent_uid, agent_version_uid, scratchpad_uid, workflow_id, approach, status, sandbox, trigger_type, started_on, completed_on, created_on. Fields like trigger_payload, result, token_usage, and error must be explicitly requested via fields[agent-runs].

Errors

StatusReason
404Agent or run not found
403User lacks permission to view agent activity