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

# GetAgentRunAPIv1 mirrors erdo_get_agent_run.




## OpenAPI

````yaml /api/openapi.json get /v1/runs/{runID}
openapi: 3.0.0
info:
  title: Erdo API
  description: >-
    Erdo's REST API: query and write datasets, run agents, manage threads,
    integrations, pages, evals, workstreams, and experiments. Authenticate with
    a Bearer API key (erdo_api_...) or scoped token (erdo_token_...).
  version: '2026-07-25'
servers:
  - url: https://api.erdo.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/runs/{runID}:
    get:
      summary: |
        GetAgentRunAPIv1 mirrors erdo_get_agent_run.
      operationId: GET:mcp.GetAgentRunAPIv1
      parameters:
        - allowEmptyValue: true
          explode: false
          in: path
          name: runID
          required: true
          schema:
            type: string
          style: simple
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  run:
                    $ref: '#/components/schemas/types.AgentRun'
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
components:
  schemas:
    types.AgentRun:
      properties:
        agent_id:
          format: uuid
          type: string
        agent_key:
          type: string
        agent_name:
          type: string
        completed_at:
          format: date-time
          type: string
        created_at:
          format: date-time
          type: string
        error:
          type: string
        id:
          format: uuid
          type: string
        input:
          type: string
        iterations:
          format: int32
          maximum: 2147483647
          minimum: -2147483648
          type: integer
        loaded_context:
          type: object
        model:
          type: string
        organization_id:
          format: uuid
          type: string
        output:
          type: string
        parameters:
          type: object
        parent_run_id:
          format: uuid
          type: string
        persona_id:
          format: uuid
          type: string
        persona_key:
          type: string
        persona_name:
          type: string
        resources:
          items:
            $ref: '#/components/schemas/types.ResourceRef'
          type: array
        started_at:
          format: date-time
          type: string
        status:
          $ref: '#/components/schemas/types.RunStatus'
        stop_reason:
          $ref: '#/components/schemas/types.StopReason'
        thread_id:
          format: uuid
          type: string
        tokens_used:
          format: int32
          maximum: 2147483647
          minimum: -2147483648
          type: integer
        user_id:
          format: uuid
          type: string
      title: |
        AgentRun represents an agent run in API responses.
      type: object
    types.ResourceRef:
      properties:
        id:
          format: uuid
          type: string
        type:
          title: |
            "dataset", "integration"
          type: string
      title: |
        ResourceRef references a resource (dataset, integration) for a run.
      type: object
    types.RunStatus:
      title: |
        RunStatus represents the status of an agent run.
      type: string
    types.StopReason:
      title: |
        StopReason represents the reason an agent run stopped.
      type: string
  responses:
    APIError:
      content:
        application/json:
          schema:
            externalDocs:
              url: https://pkg.go.dev/encore.dev/beta/errs#Error
            properties:
              code:
                description: Error code
                example: not_found
                externalDocs:
                  url: https://pkg.go.dev/encore.dev/beta/errs#ErrCode
                type: string
              details:
                description: Error details
                type: object
              message:
                description: Error message
                type: string
            title: APIError
            type: object
      description: Error response
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: An Erdo API key (erdo_api_...) or scoped token (erdo_token_...).

````