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

## Request

- Base URL: `/api/plugins/consensys-asko11y-app/resources` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/plugins/consensys-asko11y-app/resources/api/agent/runs/{runId}`
- Auth: one of:
  - API key in cookie `grafana_session`
  - HTTP bearer

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: Emitted as the first event of a run when a run ID is set, carrying the active skill metadata for the UI.
        - `runId` string, required
        - `sessionId` string
        - `skills` RunStartedSkill[]: Skills active for this run
          - `name` string, required
          - `description` string, required
      - 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

## Changes

- **2026-09-07** `68d0f5cf753e`: 1 info
  - added the optional property `events/items/data/oneOf[#/components/schemas/RunStartedEvent]/skills` to the response with the `200` status
- **2026-05-29** `9cfa0662028e`: 4 info
  - added the optional property `events/items/data/oneOf[#/components/schemas/ErrorEvent]/code` to the response with the `200` status
  - added the optional property `events/items/data/oneOf[#/components/schemas/ErrorEvent]/requestId` to the response with the `200` status
  - added the optional property `events/items/data/oneOf[#/components/schemas/ErrorEvent]/retryable` to the response with the `200` status
  - added the optional property `events/items/data/oneOf[#/components/schemas/ErrorEvent]/statusCode` to the response with the `200` status
- …earlier changes not shown

[Operation history](https://skmtc.dev/consensys/apis/ask-o11y-ai-powered-observability-assistant-api/changes/api/agent/runs/:runId/get.md)

---

[API](https://skmtc.dev/consensys/apis/ask-o11y-ai-powered-observability-assistant-api.md) - [All operations](https://skmtc.dev/consensys/apis/ask-o11y-ai-powered-observability-assistant-api/llms.txt) - [OpenAPI document](https://skmtc.dev/consensys/apis/ask-o11y-ai-powered-observability-assistant-api/revisions/ee3ccd0f186d?raw)
