> ## Documentation Index
> Fetch the complete documentation index at: https://docs.synapsai.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Get an agent run

> Returns the run status and the AG-UI events stored so far. `status` is `running`, `finished`, `error`, or `cancelled`. See [Agents](/guides/agents).



## OpenAPI

````yaml /api-reference/agents.json get /v1/agent/{agent_id}/runs/{run_id}
openapi: 3.1.0
info:
  title: SynapsAI Agents API
  version: 1.0.0
servers:
  - url: https://api.synapsai.cloud
    description: Production server
security: []
paths:
  /v1/agent/{agent_id}/runs/{run_id}:
    get:
      summary: Get an agent run
      description: >-
        Returns the run status and the AG-UI events stored so far. `status` is
        `running`, `finished`, `error`, or `cancelled`. See
        [Agents](/guides/agents).
      operationId: getAgentRun
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
        - name: run_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Agent run
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentRun'
        '404':
          description: Run not found
components:
  schemas:
    AgentRun:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
          enum:
            - agent.run
        agent_id:
          type: string
        thread_id:
          type: string
          nullable: true
        status:
          type: string
          enum:
            - running
            - finished
            - error
            - cancelled
        events:
          type: array
          items:
            type: object
            additionalProperties: true
            properties:
              seq:
                type: integer
              type:
                type: string
        error_message:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
          nullable: true
        updated_at:
          type: string
          format: date-time
          nullable: true
        finished_at:
          type: string
          format: date-time
          nullable: true

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.