Skip to main content
GET
/
agents
/
{agentId}
/
runs
/
{runId}
Get Agent Run
curl --request GET \
  --url https://api.ag.dev/v0.1/agents/{agentId}/runs/{runId} \
  --header 'X-API-Key: <api-key>'
{
  "id": "<string>",
  "agentId": "<string>",
  "input": {},
  "status": "pending",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "error": {
    "code": "<string>",
    "message": "<string>"
  },
  "resultType": "document",
  "resultData": {
    "result": "<string>",
    "sources": [
      {
        "url": "<string>",
        "title": "<string>"
      }
    ]
  }
}

Authorizations

X-API-Key
string
header
required

Provide either X-API-Key: or Authorization: Bearer

Path Parameters

agentId
string
required

Agent ID

runId
string
required

Run ID

Response

Run details

id
string
required

Unique identifier for the run

agentId
string
required

ID of the agent that executed this run

input
object
required

Input data provided for the run

status
enum<string>
required

Current status of the run

Available options:
pending,
running,
done,
error
createdAt
string<date-time>
required

Run creation timestamp

updatedAt
string<date-time>
required

Run last update timestamp

error
object

Error information (only present when status is 'error')

resultType
enum<string> | null

Type of result (null until run completes)

Available options:
document,
json
resultData
object

The result data (null until run completes successfully)