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

# agents.get(id)



## OpenAPI

````yaml /api-reference/openapi.json get /agents/{id}
openapi: 3.1.0
info:
  title: paddock API
  version: 1.0.0
  description: >-
    The paddock API. Send an API key, or a session token on its own session, as
    a bearer token.
servers:
  - url: https://api.paddock.build/v1
security:
  - bearer: []
paths:
  /agents/{id}:
    get:
      summary: agents.get(id)
      operationId: getAgent
      parameters:
        - $ref: '#/components/parameters/AgentId'
      responses:
        '200':
          description: The agent
          headers:
            Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agent'
        default:
          $ref: '#/components/responses/Error'
components:
  parameters:
    AgentId:
      name: id
      in: path
      required: true
      description: The agent's ID
      schema:
        type: string
        pattern: ^agt_[0-7][0-9a-hjkmnp-tv-z]{25}$
  headers:
    RequestId:
      description: The request's ID, for support and logs
      schema:
        type: string
  schemas:
    Agent:
      type: object
      required:
        - id
        - template
        - harness
        - model
        - generation
        - status
        - lastError
        - capabilities
        - sessionCount
        - metadata
        - createdAt
      properties:
        id:
          type: string
          pattern: ^agt_[0-7][0-9a-hjkmnp-tv-z]{25}$
        template:
          type: string
          pattern: ^[a-z0-9-]{1,64}@[1-9][0-9]*$
        harness:
          $ref: '#/components/schemas/Harness'
        model:
          description: >-
            The effective model: the agent's own if set, otherwise the
            template's.
          type: string
        generation:
          description: >-
            The generation of its effective configuration; it increases each
            time the configuration changes.
          type: integer
          minimum: 1
        status:
          $ref: '#/components/schemas/AgentStatus'
        lastError:
          oneOf:
            - $ref: '#/components/schemas/TurnError'
            - type: 'null'
        capabilities:
          $ref: '#/components/schemas/Capabilities'
        sessionCount:
          description: Its active sessions.
          type: integer
          minimum: 0
        metadata:
          $ref: '#/components/schemas/Metadata'
        createdAt:
          $ref: '#/components/schemas/Timestamp'
    Harness:
      type: string
      enum:
        - claude-code
        - codex
        - pi
    AgentStatus:
      type: string
      enum:
        - sleeping
        - waking
        - awake
        - unavailable
    TurnError:
      type: object
      required:
        - code
        - message
      properties:
        code:
          $ref: '#/components/schemas/TurnErrorCode'
        message:
          type: string
    Capabilities:
      type: object
      required:
        - mcp
        - plugins
        - workflows
        - memory
      properties:
        mcp:
          type: boolean
        plugins:
          type: boolean
        workflows:
          type: boolean
        memory:
          type: boolean
    Metadata:
      description: The customer's own string keys and values; never case-converted.
      type: object
      additionalProperties:
        type: string
    Timestamp:
      description: RFC 3339 in UTC with milliseconds.
      type: string
      format: date-time
      pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}Z$
      x-go-type: wire.Timestamp
      x-go-type-import:
        path: github.com/wenfengwang/paddock/internal/wire
    ErrorBody:
      description: The body of every non-2xx response.
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorObject'
    TurnErrorCode:
      type: string
      enum:
        - harness_error
        - watchdog_timeout
        - model_unavailable
        - model_auth
        - context_too_long
        - conversation_lost
        - sandbox_unavailable
        - internal
    ErrorObject:
      type: object
      required:
        - code
        - message
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
        details:
          type: object
    ErrorCode:
      type: string
      enum:
        - invalid_request
        - unauthorized
        - forbidden
        - not_found
        - conflict
        - payload_too_large
        - unsupported
        - unavailable
        - internal
  responses:
    Error:
      description: Every non-2xx response
      headers:
        Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: An API key, or a session token on its own session

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.