Skip to main content

Create an automation run

Request

Create a pending run with a free-text run prompt and a snapshot of the saved automation instructions. Any member of the automation's project, or an organization API key, can start a run; it executes as the automation's owner, using the owner's data access and AI usage.

Security
ApiKey(Required scopes: automations.run) or OAuthToken
Bodyapplication/jsonrequired
automationIdstring, non-empty

The automation to run. Required.

runPromptstring, non-empty\S

Free-text instructions for this run. May reference recordings or other resources. Required for members, including personal access tokens. Organization API keys must omit it, and the run uses only the automation's saved instructions.

Payload
{ "automationId": "string", "runPrompt": "string" }

Responses

The pending run

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

How far Foxglove got in executing the automation. A run skipped by its filter is finished. 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 run accomplished. needs_review means the task finished but the agent was unsure whether something went wrong. no_result means the task ran and had nothing to act on. not_applicable means the source did not match the run filter, so the agent did not run. Null when the run has no result, such as when it is blocked.

Enum:"succeeded""needs_review""failed""no_result""not_applicable"
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.

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" }