Skip to main content

Get an automation run

Request

Get a run's prompt snapshot and final answer.

Security
ApiKey(Required scopes: automations.list)
Path
runIdstring, non-emptyrequired

Automation run ID

Payload
// No request payload

Responses

Run with its final answer

Bodyapplication/json
idstringrequired
automationIdstringrequired
actionPromptstringrequired

Snapshot of the automation's saved instructions.

runPromptstringrequired

Prompt submitted for this run.

statusstringrequired
Enum:"pending""running""succeeded""failed"
createdAtstring, (date-time)required
updatedAtstring, (date-time)required
startedAtstring or null, (date-time)required
completedAtstring or null, (date-time)required
errorMessagestring or nullrequired
executionstringrequired

Whether Foxglove ran the automation to the end, separate from what the run found. finished means the agent's turn ended, or a limit stopped the run after the agent reported its result. blocked means a limit or a missing permission stopped the run before that, such as the AI usage limit, the run's time limit, or an owner who lost access to the project. error means the run failed on Foxglove's side.

Enum:"pending""running""finished""error""blocked"
resultstring or nullrequired

What the agent reported the run accomplished. needs_review means the task finished but the agent was not sure whether something went wrong. no_result means the task ran and had nothing to act on, such as no matching data. Null when the agent did not report a result, for example because the run was blocked or failed before it finished.

Enum:"succeeded""needs_review""failed""no_result"
resultSummarystring or nullrequired

The agent's one-sentence summary of what the run found or did.

modelstring or nullrequired

Concrete model the run's chat used, such as claude-sonnet-5-5. Null until the run's chat exists.

automationNamestringrequired
finalAnswerstring or nullrequired

The agent's final response: the last stretch of text, after any tool call before it, in the newest recent message that has text. For a failed run, set only when the run ended on that text. Null while the run is pending or running, when no recent message has text, or when the turn holding it was stopped or failed.

triggerAutomationTrigger (object) or nullrequired
One of:

The trigger whose event started the run, or null when the run was started manually. Editing a trigger replaces it with a new one, so its event type and configuration are as they were when the run started. deletedAt is set once the trigger has been replaced or removed.

triggerSourceAutomationRunTriggerSource (object) or nullrequired
One of:

The recording, event, session, or device whose webhook event started the run, or null for manual and scheduled runs. Taken from the event saved with the run, so it names the item even after the item is deleted.

tokenUsageobject or null(AutomationRunTokenUsage)required

Token usage summed across model calls attached to the run's assistant messages, including tool-loop iterations and reported partial usage from failed calls. The buckets are disjoint; add all four for the total. Cache reads are input served from the prompt cache; cache writes combine 5-minute and 1-hour writes. Auxiliary calls without a message are excluded. Active runs report usage persisted so far. Null means no usage has been recorded, including runs that predate usage collection.

Response
{ "id": "string", "automationId": "string", "actionPrompt": "string", "runPrompt": "string", "status": "pending", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "startedAt": "2019-08-24T14:15:22Z", "completedAt": "2019-08-24T14:15:22Z", "errorMessage": "string", "execution": "pending", "result": "succeeded", "resultSummary": "string", "model": "string", "automationName": "string", "finalAnswer": "string", "trigger": { "id": "string", "automationId": "string", "eventType": "recording.created", "enabled": true, "configurationVersion": 1, "configuration": { … }, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "deletedAt": "2019-08-24T14:15:22Z" }, "triggerSource": { "kind": "recording", "id": "string", "projectId": "string", "available": true }, "tokenUsage": { "inputTokens": 0, "outputTokens": 0, "cacheReadTokens": 0, "cacheWriteTokens": 0 } }