sdkDeterministic

Get agent run

pipeline.getAgentRun

Drill into a specific agent run: full input/output summary plus every tool call (agent_run_steps) with its arguments, output, duration, and tokens. Use for debugging or auditing what an agent actually did. Read-only.

Parameters

workspaceId
string
Optional workspace ID or slug. Required when this credential can access multiple workspaces and no workspace was configured on the client.
runIdrequired
string
No description.

Example

TypeScripttypescript
await pipeline.getAgentRun({
"runId": "00000000-0000-4000-8000-000000000000"
})

Response

Success response schemajson schema
{
"type": "object",
"properties": {
"run": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"workspaceId": {
"type": "string"
},
"agentRole": {
"type": "string"
},
"status": {
"type": "string"
},
"trigger": {
"type": "string"
},
"startedAt": {
"type": "string"
},
"endedAt": {
"type": "string"
},
"tokensUsed": {
"type": "number"
},
"toolCalls": {
"type": "number"
},
"costCents": {
"type": "number"
},
"summary": {
"type": "string"
},
"error": {
"type": "string"
},
"skillProvenance": {
"type": [
"object",
"null"
]
},
"createdAt": {
"type": "string"
}
},
"required": [
"id",
"workspaceId",
"agentRole",
"status",
"trigger"
]
},
"steps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"agentRunId": {
"type": "string"
},
"stepIndex": {
"type": "number"
},
"toolName": {
"type": "string"
},
"tokensIn": {
"type": "number"
},
"tokensOut": {
"type": "number"
},
"costCents": {
"type": "number"
},
"durationMs": {
"type": "number"
},
"status": {
"type": "string"
},
"error": {
"type": "string"
},
"createdAt": {
"type": "string"
}
},
"required": [
"id",
"agentRunId",
"stepIndex",
"toolName",
"status"
]
}
}
},
"required": [
"run",
"steps"
]
}

Exceptions

PipelineError
Thrown for validation, authentication, JSON-RPC, HTTP, and network failures. Inspect code and data when present.
Pipeline TypeScript SDK documentation | Pipeline