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

# Get a Run

> Retrieve the current status and details of a run, including its result and associated session information. To fetch the run's messages, use [List Run Messages](/reference/api/list-run-messages).



## OpenAPI

````yaml get /v1/agents/runs/{runId}
openapi: 3.0.0
info:
  title: Browserbase API
  description: Browserbase API for 3rd party developers
  version: v1
servers:
  - url: https://api.browserbase.com
    description: Public endpoint
    variables: {}
security:
  - BrowserbaseAuth: []
tags: []
paths:
  /v1/agents/runs/{runId}:
    get:
      summary: Get a Run
      description: >-
        Retrieve the current status and details of a run, including its result
        and associated session information. To fetch the run's messages, use
        [List Run Messages](/reference/api/list-run-messages).
      operationId: AgentRuns_get
      parameters:
        - name: runId
          in: path
          description: The run ID.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The agent run.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentRun'
components:
  schemas:
    AgentRun:
      description: >-
        One execution of an agent against a task. Created in `pending` and
        transitioned through `running` → `completed`/`failed` by the runner.
      type: object
      properties:
        runId:
          description: Unique identifier for the run.
          type: string
        agentId:
          description: >-
            The ID of the agent applied to this run, if any. Omitted for ad-hoc
            runs.
          type: string
        task:
          description: The original task description.
          type: string
        status:
          description: |-
            Current status of the run.
            - `PENDING` - agent will run soon
            - `RUNNING` - agent is currently running
            - `COMPLETED` - agent has finished running
            - `FAILED` - agent has failed the run
            - `STOPPED` - run was stopped by the user
            - `TIMED_OUT` - run exceeded maximum time
          type: string
          enum:
            - PENDING
            - RUNNING
            - COMPLETED
            - FAILED
            - STOPPED
            - TIMED_OUT
        sessionId:
          description: The Browserbase session ID powering this run.
          type: string
        sandboxId:
          description: External sandbox identifier assigned by the runner. Optional.
          type: string
        resultSchema:
          description: >-
            Per-run [JSON Schema](https://json-schema.org/specification)
            override for the result shape. When unset, the agent's default
            `resultSchema` applies.
          type: object
          additionalProperties: true
          properties: {}
        result:
          description: >-
            The agent's structured result for the run. Only present when the run
            has finished and output is available. The result conforms to the
            provided [JSON Schema](https://json-schema.org/specification) when
            one is set.
          type: object
          additionalProperties: true
          properties: {}
        cause:
          type: object
          properties:
            code:
              description: Structured failure code (e.g., RUNNER_HEARTBEAT_LOST).
              type: string
              maxLength: 64
            message:
              description: Human-readable failure detail.
              type: string
              maxLength: 500
          required:
            - code
        startedAt:
          type: string
          format: date-time
        endedAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - runId
        - task
        - status
        - createdAt
        - updatedAt
  securitySchemes:
    BrowserbaseAuth:
      type: apiKey
      in: header
      name: X-BB-API-Key
      description: Your [Browserbase API Key](https://www.browserbase.com/settings).

````