> ## 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://registry.scalar.com/@profound/apis/external-api/latest/openapi.json?variant=processed get /v1/agents/{agent_id}/runs/{run_id}
openapi: 3.1.0
info:
  title: External API
  version: 0.60.2
  x-scalar-sdk-installation:
    - lang: Python
      description: |-
        ```sh
        pip install profound
        ```
    - lang: TypeScript
      description: |-
        ```sh
        npm install @profoundai/client
        ```
    - lang: Rust
      description: |-
        ```sh
        cargo add profound
        ```
servers:
  - url: https://api.tryprofound.com
    description: Production Server
security:
  - APIKeyHeader:
      - X-API-Key
  - BearerAuth: []
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.
        - name: verbose
          in: query
          required: false
          schema:
            type: boolean
            description: Include each step's raw `outputs` payload in the execution trace.
            default: false
            title: Verbose
          description: Include each step's raw `outputs` payload in the execution trace.
      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:
        - label: Python
          lang: Python
          source: |-
            import os

            from profound import Profound

            client = Profound(
                api_key=os.environ.get("PROFOUND_API_KEY"),
            )

            run = client.agents.runs.retrieve(
                agent_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
                run_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
                verbose=False,
            )

            print(run)
        - label: TypeScript
          lang: TypeScript
          source: >-
            import Profound from '@profoundai/client';


            const client = new Profound({
              apiKey: process.env['PROFOUND_API_KEY'], // defaults to the PROFOUND_API_KEY env var
              environment: 'production',
            });


            const run = await
            client.agents.runs.retrieve('7c9e6679-7425-40de-944b-e07fc1f90ae7',
            {
              agent_id: '7c9e6679-7425-40de-944b-e07fc1f90ae7',
              verbose: false,
            });


            console.log(run);
        - label: rust
          lang: rust
          source: |-
            use profound::*;

            #[tokio::main]
            async fn main() -> Result<(), Box<dyn std::error::Error>> {
                let client = ProfoundClient::builder()
                    .api_key(std::env::var("PROFOUND_API_KEY")?)
                    .build()?;

                let response = client
                    .agents()
                    .runs()
                    .retrieve(
                        "7c9e6679-7425-40de-944b-e07fc1f90ae7",
                        "7c9e6679-7425-40de-944b-e07fc1f90ae7",
                    )
                    .send()
                    .await?;

                println!("{:?}", response);

                Ok(())
            }
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 output-variable UUID.
            This UUID-keyed object is retained for compatibility and is empty
            when no outputs are available.
        outputs_expanded:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/AgentRunOutputDetail'
              type: object
            - type: 'null'
          title: Outputs Expanded
          description: >-
            Expanded form of `outputs`, keyed by the same output-variable UUIDs.
            Each entry carries the agent's configured human-readable key as
            `title` alongside the returned value. `title` is null when the agent
            has no configured key for that output. Entries preserve the key
            order of `outputs`. The UUID-keyed `outputs` field remains the
            stable compatibility field.
        steps:
          anyOf:
            - items:
                $ref: '#/components/schemas/AgentRunStep'
              type: array
            - type: 'null'
          title: Steps
          description: >-
            Ordered step-by-step execution trace — one entry per node that ran,
            in execution order. Always present once the run has executed a node;
            per-node `outputs` inside each step are included only when the
            request asks for `verbose`.
      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.
    AgentRunOutputDetail:
      properties:
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
          description: >-
            The agent's configured, human-readable key for this output. null
            when the agent has no configured key for this output.
        value:
          title: Value
          description: Value returned for the output variable.
      type: object
      required:
        - title
        - value
      title: AgentRunOutputDetail
    AgentRunStep:
      properties:
        node_id:
          type: string
          title: Node Id
          description: ID of the node that ran, within its agent graph.
        node_type:
          type: string
          title: Node Type
          description: Kind of node, e.g. "profound_visibility", "llm", "conditional".
        title:
          type: string
          title: Title
          description: Human-readable title of the node.
        status:
          type: string
          title: Status
          description: Terminal status of this node execution.
        elapsed_time:
          anyOf:
            - type: number
            - type: 'null'
          title: Elapsed Time
          description: Wall-clock seconds the node took, if recorded.
        finished_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Finished At
          description: When the node finished, if it has.
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
          description: Failure detail for this node, when it failed.
        outputs:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Outputs
          description: >-
            Raw output payload this node produced. Included only when the
            request asks for `verbose`.
      additionalProperties: false
      type: object
      required:
        - node_id
        - node_type
        - title
        - status
      title: AgentRunStep
      description: >-
        One executed node in a run's step trace, in execution order.


        The lightweight fields always ship; ``outputs`` is populated only when
        the

        run-retrieve request asks for ``verbose``.
    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
      bearerFormat: JWT

````