Skip to main content

Endpoint

GET /v1/agents/run/{agentRunId}/status

Request

Path parameters

ParameterTypeDescription
agentRunIduuidThe ID of the agent run

Headers

HeaderValue
X-API-KeyYour API key

Response

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "agentId": "660e8400-e29b-41d4-a716-446655440000",
  "status": "Completed",
  "userMessage": "Summarize the Q4 sales report",
  "finalOutput": "The Q4 sales report shows a 15% increase in revenue...",
  "errorMessage": null,
  "stepsExecuted": 3,
  "tokensUsed": 2450,
  "actionsUsed": 2,
  "creditsUsed": 0.85,
  "createdAt": "2026-03-29T10:00:00Z",
  "startedAt": "2026-03-29T10:00:01Z",
  "finishedAt": "2026-03-29T10:00:12Z"
}

Run statuses

StatusDescription
PendingQueued for execution
RunningCurrently processing
CompletedFinished successfully — finalOutput is available
FailedError occurred — check errorMessage
CancelledRun was cancelled

Polling pattern

Agent runs are asynchronous. Poll this endpoint to track progress:
# Poll every 2 seconds until complete
while true; do
  STATUS=$(curl -s https://api.flowyble.com/v1/agents/run/{runId}/status \
    -H "X-API-Key: flw_key_abc123" | jq -r '.status')
  echo "Status: $STATUS"
  if [ "$STATUS" = "Completed" ] || [ "$STATUS" = "Failed" ]; then
    break
  fi
  sleep 2
done