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

# Get an agent run

> Return an agent run's status and transcript.

Poll every 3 to 10 seconds while ``loop_status`` is ``running``. Runs
commonly take several minutes. For the status values, see the
[Agent lifecycle and polling](/agent-lifecycle) guide.

The response is scoped to the API key: a run that belongs to another
organization or agent returns 404, so a key can't enumerate or inspect
runs it doesn't own.



## OpenAPI

````yaml openapi.mintlify.json GET /v1/agents/{agent_id}
openapi: 3.1.0
info:
  description: >-
    Run your configured Clicks agents programmatically: create an agent run and
    poll its status and transcript.


    Authenticate with a per-agent API key created on the agent's **API access**
    tab. Send it as `Authorization: Bearer <key>` (preferred) or `X-API-Key:
    <key>`.
  title: Clicks Agents API
  version: '1.0'
servers:
  - description: US production
    url: https://app.us.goclicks.ai
security:
  - bearerAuth: []
  - apiKeyHeader: []
tags:
  - description: Create agent runs and read their status and transcript.
    name: public-api
    x-displayName: Agents
paths:
  /v1/agents/{agent_id}:
    get:
      tags:
        - public-api
      summary: Get an agent run
      description: |-
        Return an agent run's status and transcript.

        Poll every 3 to 10 seconds while ``loop_status`` is ``running``. Runs
        commonly take several minutes. For the status values, see the
        [Agent lifecycle and polling](/agent-lifecycle) guide.

        The response is scoped to the API key: a run that belongs to another
        organization or agent returns 404, so a key can't enumerate or inspect
        runs it doesn't own.
      operationId: public_get_agent
      parameters:
        - in: path
          name: agent_id
          required: true
          schema:
            format: uuid
            title: Agent Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicAgentStatusResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorResponse'
          description: Missing or invalid API key.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorResponse'
          description: >-
            No run with this ID is visible to the API key. Runs that belong to
            another organization or agent also return 404, the same as a
            nonexistent ID.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorResponse'
          description: The event history lookup failed. Retry with backoff.
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorResponse'
          description: Event history is temporarily unavailable. Retry with backoff.
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl \
              "https://app.us.goclicks.ai/v1/agents/$AGENT_ID" \
              -H "Authorization: Bearer $CLICKS_API_KEY"
        - lang: python
          label: Python
          source: |-
            import os, requests

            agent_id = "<run-id>"
            resp = requests.get(
                f"https://app.us.goclicks.ai/v1/agents/{agent_id}",
                headers={"Authorization": f"Bearer {os.environ['CLICKS_API_KEY']}"},
            )
            resp.raise_for_status()
            run = resp.json()
            print(run["loop_status"], run["transcript"])
components:
  schemas:
    PublicAgentStatusResponse:
      examples:
        - agent_id: 0f4d3f9a-6b1c-4a2e-8c7d-5e9b0a1f2c3d
          loop_status: finished
          transcript:
            - role: input_to_agent
              text: Summarize report.pdf in three bullet points.
            - role: output_from_agent
              text: 1. Revenue grew 12% ...
      properties:
        agent_id:
          format: uuid
          title: Agent Id
          type: string
        loop_status:
          description: >-
            `running`: the agent is working, which includes startup. `finished`:
            the agent is idle; when it ended its turn normally, the output for
            the last input is complete. `technical_error`: the run hit an
            internal error. `terminated`: the run was stopped or deleted.
          enum:
            - running
            - finished
            - technical_error
            - terminated
          title: Loop Status
          type: string
        transcript:
          description: >-
            The inputs the agent accepted and each turn's final output, ordered
            oldest first. It doesn't include intermediate tool steps. An empty
            transcript early in a run is normal.
          items:
            $ref: '#/components/schemas/TranscriptMessage'
          title: Transcript
          type: array
      required:
        - agent_id
        - loop_status
        - transcript
      title: PublicAgentStatusResponse
      type: object
    PublicErrorResponse:
      description: |-
        Error body for failures other than request validation. 422 schema
        violations use FastAPI's list-of-issues ``detail`` shape instead.
      properties:
        detail:
          description: Human-readable reason for the failure.
          title: Detail
          type: string
      required:
        - detail
      title: PublicErrorResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    TranscriptMessage:
      properties:
        role:
          description: >-
            `input_to_agent` is an input the agent accepted; `output_from_agent`
            is a turn's final output.
          enum:
            - input_to_agent
            - output_from_agent
          title: Role
          type: string
        text:
          title: Text
          type: string
      required:
        - role
        - text
      title: TranscriptMessage
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    bearerAuth:
      description: API key (`ak_...`) as a Bearer token. Preferred.
      scheme: bearer
      type: http
    apiKeyHeader:
      description: >-
        API key (`ak_...`) as a header. Used only when the `Authorization`
        header is missing or not a Bearer credential.
      in: header
      name: X-API-Key
      type: apiKey

````