Skip to main content
GET
/
api
/
v1
/
agents
/
{id}
/
runs
List recent runs for an agent
curl --request GET \
  --url https://api.staging.getmodus.com/api/v1/agents/{id}/runs \
  --header 'Authorization: Bearer <token>'
{
  "runs": [
    {
      "id": "wf_42_run_1:11111111-2222-3333-4444-555555555555",
      "workflowId": "wf_42_run_1",
      "agentId": 42,
      "agentName": "Daily Sales Report",
      "agentType": "task",
      "status": "completed",
      "temporalRunId": "<string>",
      "triggerType": "<string>",
      "startedAt": "<string>",
      "endedAt": "<string>",
      "durationMs": 123,
      "summary": "<string>",
      "pendingApproval": {}
    }
  ],
  "counts": {
    "all_executions": 100,
    "running": 1,
    "awaiting_human": 0,
    "error": 2,
    "completed": 97
  },
  "nextPageToken": "<string>"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

id
number
required

Numeric agent id.

Example:

42

Query Parameters

status
string

Filter by run status (running / awaiting_human / completed / error / cancelled / all_executions).

timeframe
string

Filter by run timeframe (e.g. last_hour / last_day / last_week).

approvalScope
string

Approval scope filter (mine / all). Only meaningful with status=awaiting_human.

Case-insensitive substring filter on the parent agent name.

pageSize
number

Max items per page. Defaults to 25, clamped to 100.

Required range: 1 <= x <= 100
pageToken
string

Opaque page token from a previous response's nextPageToken. Omit for the first page. AIP-158.

Response

runs
object[]
required

Page of run summaries (Temporal-ordered, descending start time).

counts
object
required

Per-status counts (all_executions / running / awaiting_human / error / completed).

Example:
{
"all_executions": 100,
"running": 1,
"awaiting_human": 0,
"error": 2,
"completed": 97
}
nextPageToken
string | null

Opaque token for the next page; null when this was the last page. Pass as pageToken on the next request. AIP-158.