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

# Get an agent run

> Retrieve the current status and result details for an agent run.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/profound/openapi.documented.yml get /v1/agents/{agent_id}/runs/{run_id}
openapi: 3.1.0
info:
  title: External API
  version: 60df76cc2b9752c279276872b19310c02da38378
servers:
  - url: https://api.tryprofound.com
    description: Production Server
security: []
paths:
  /v1/agents/{agent_id}/runs/{run_id}:
    get:
      tags:
        - Agents
      summary: Get an agent run
      description: Retrieve the current status and result details for an agent run.
      operationId: get_agent_run_v1_agents__agent_id__runs__run_id__get
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: The ID of the agent that owns the run.
            title: Agent Id
          description: The ID of the agent that owns the run.
        - name: run_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: The ID of the run to retrieve.
            title: Run Id
          description: The ID of the run to retrieve.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentRun'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
        - BearerAuth: []
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Profound from '@profoundai/client';


            const client = new Profound({
              apiKey: process.env['PROFOUND_API_KEY'], // This is the default and can be omitted
            });


            const run = await
            client.agents.runs.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
            {
              agent_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
            });


            console.log(run.id);
        - lang: Python
          source: |-
            import os
            from profound import Profound

            client = Profound(
                api_key=os.environ.get("PROFOUND_API_KEY"),  # This is the default and can be omitted
            )
            run = client.agents.runs.retrieve(
                run_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                agent_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(run.id)
components:
  schemas:
    AgentRun:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Unique ID for the run.
        agent_id:
          type: string
          format: uuid
          title: Agent Id
          description: Unique ID of the agent for this run.
        status:
          $ref: '#/components/schemas/AgentRunStatus'
          description: Current status of the run.
        started_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Started At
          description: When the run started, if it has started.
        finished_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Finished At
          description: When the run finished, if it has completed.
        error:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Error
          description: >-
            Error details, when the run fails and error information is
            available.
        outputs:
          additionalProperties: true
          type: object
          title: Outputs
          description: >-
            Output values returned by the run, keyed by variable ID. This object
            conforms to `schema.output` from the agent detail response and is
            empty when no outputs are available.
      additionalProperties: false
      type: object
      required:
        - id
        - agent_id
        - status
      title: AgentRun
      description: Status and result details for an agent run.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AgentRunStatus:
      type: string
      enum:
        - queued
        - running
        - succeeded
        - failed
        - cancelled
        - skipped
        - unknown
      title: AgentRunStatus
      description: Current execution status for an agent run.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    BearerAuth:
      type: http
      scheme: bearer

````