Skip to main content
GET
/
api
/
v1
/
agents
/
{id}
/
runs
/
{runId}
Get a single run (live state or history)
curl --request GET \
  --url https://api.staging.getmodus.com/api/v1/agents/{id}/runs/{runId} \
  --header 'Authorization: Bearer <token>'
{
  "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": {},
  "taskResult": {},
  "taskError": "<string>",
  "workflowNodes": [
    {}
  ],
  "historyUnavailableReason": "<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

runId
string
required

Temporal workflow id (run identifier).

Query Parameters

temporalRunId
string

Response

id
string
required

Composite run identifier (workflowId:temporalRunId).

Example:

"wf_42_run_1:11111111-2222-3333-4444-555555555555"

workflowId
string
required

Temporal workflow id.

Example:

"wf_42_run_1"

agentId
number
required

Parent agent id.

Example:

42

agentName
string
required

Snapshot of the agent name at the time the run was indexed.

Example:

"Daily Sales Report"

agentType
enum<string>
required

Agent type.

Available options:
task,
workflow
Example:

"task"

status
string
required

Run status (running / awaiting_human / completed / error / cancelled).

Example:

"completed"

source
enum<string>
required

Where the payload was read from. live-query = Temporal workflow is still in progress; history = closed run reconstructed from event history.

Available options:
live-query,
history
temporalRunId
string

Temporal run id (one workflow may have multiple runs after retry).

triggerType
string

Trigger type for the run (schedule / webhook / api / slack / manual).

startedAt
string

ISO-8601 start timestamp.

endedAt
string

ISO-8601 end timestamp; absent for in-flight runs.

durationMs
number

Duration in milliseconds (when end timestamp is known).

summary
string

Short human-readable summary of the run outcome.

pendingApproval
object

Pending approval payload (only present when status is awaiting_human).

statusReason
enum<string>

Display-only signal that the workflow closed for a non-success reason.

Available options:
approval_timeout
taskResult
object

Final result of a task-typed agent run. Free-form (depends on the agent).

taskError
string

Error message for a failed task-typed agent run.

workflowNodes
object[]

Per-node state for a workflow-typed agent run.

historyUnavailableReason
string

Set when history was unavailable; source will be live-query in that case.