---
title: "Get agent run status and events"
method: GET
path: "/api/agent/runs/{runId}"
tags: ["Agent"]
---

# Get agent run status and events

`GET /api/agent/runs/{runId}`

Returns the current status and all events for an agent run. Only the user who created the run (in the same organization) can access it.

## Path parameters

- `runId` string, required

## Headers

- `X-Grafana-Org-Id` string

## Response `200`

Agent run details

- AgentRun — Agent run status and events
  - `runId` string, required
  - `status` 'running' | 'completed' | 'failed' | 'cancelled', required
  - `userId` integer, required
  - `orgId` integer, required
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required
  - `events` SSEEvent[], required — All events for this run (max 500)
    - `type` 'run_started' | 'content' | 'tool_call_start' | 'tool_call_result' | 'run_plan' | 'step_start' | 'step_done' | 'evidence' | 'approval_request' | 'approval_resolved' | 'final_report' | 'done' | 'error', required — Event type
    - `data` union, required — Event data (type-specific)
      - RunStartedEvent
        - `runId` string, required
        - `sessionId` string
      - ContentEvent
        - `content` string, required — AI-generated text content
      - ToolCallStartEvent
        - `id` string, required — Tool call ID
        - `name` string, required — Tool name
        - `arguments` string, required — JSON-encoded tool arguments
      - ToolCallResultEvent
        - `id` string, required — Tool call ID
        - `name` string, required — Tool name
        - `content` string, required — Tool execution result
        - `isError` boolean, required — True if tool execution failed
      - RunPlanEvent
        - `objective` string, required
        - `steps` PlanStep[], required
          - `id` string, required
          - `title` string, required
          - `description` string
          - `status` string, required
      - StepEvent
        - `id` string, required
        - `title` string
        - `status` string, required
      - EvidenceEvent
        - `id` string, required
        - `stepId` string
        - `title` string, required
        - `summary` string, required
        - `source` string
        - `toolName` string
        - `query` string
        - `datasourceUid` string
        - `timeRange` string
      - ApprovalRequestEvent
        - `approvalId` string, required
        - `toolCallId` string, required
        - `toolName` string, required
        - `risk` string, required
        - `reason` string, required
        - `arguments` string, required
      - ApprovalResolvedEvent
        - `approvalId` string, required
        - `decision` string, required
        - `comment` string
        - `resolvedAt` string, date-time
      - FinalReportEvent
        - `verdict` string
        - `confidence` string
        - `summary` string, required
        - `evidenceIds` string[]
        - `gaps` string[]
        - `nextSteps` string[]
      - DoneEvent
        - `totalIterations` integer, required — Number of agent loop iterations completed
      - ErrorEvent
        - `message` string, required — Error message
        - `code` string — Stable error code for client diagnostics
        - `statusCode` integer — Upstream HTTP status code when the error came from an upstream service
        - `requestId` string — Upstream request or correlation ID when available
        - `retryable` boolean — Whether retrying the same operation may succeed
    - `sequence` integer, required — Event sequence number (monotonically increasing)
  - `trace` AgentRunTrace
    - `plan` PlanStep[]
      - `id` string, required
      - `title` string, required
      - `description` string
      - `status` string, required
    - `evidence` EvidenceEvent[]
      - `id` string, required
      - `stepId` string
      - `title` string, required
      - `summary` string, required
      - `source` string
      - `toolName` string
      - `query` string
      - `datasourceUid` string
      - `timeRange` string
    - `approvals` RunApproval[]
      - `approvalId` string, required
      - `toolCallId` string, required
      - `toolName` string, required
      - `risk` string, required
      - `reason` string, required
      - `arguments` string, required
      - `decision` string
      - `comment` string
      - `createdAt` string, date-time
      - `resolvedAt` string, date-time
    - `finalReport` FinalReportEvent
      - `verdict` string
      - `confidence` string
      - `summary` string, required
      - `evidenceIds` string[]
      - `gaps` string[]
      - `nextSteps` string[]
  - `error` string — Error message (only if status is 'failed')

## Other responses

- `400` — Bad request (invalid parameters or malformed request body)
- `401` — Unauthorized (missing or invalid authentication)
- `403` — Access denied (wrong user or org)
- `404` — Resource not found
- `500` — Internal server error

---

[API](https://skmtc.net/consensys/apis/ask-o11y-ai-powered-observability-assistant-api.md) · [All operations](https://skmtc.net/consensys/apis/ask-o11y-ai-powered-observability-assistant-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/consensys/ask-o11y-ai-powered-observability-assistant-api/versions/3ccc03eccaef/schema)
