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

# Retrieve an agent



## OpenAPI

````yaml api-reference/openapi.json GET /api/v1/agents/{agent_id}
openapi: 3.0.3
info:
  title: Duckie API
  version: 1.0.0
  description: >-
    Read-only API for exporting Duckie runs, tool catalog data, agents,
    guidelines, guardrails, and runbooks.
servers:
  - url: https://app.useduckie.ai
    description: Duckie app
security:
  - DuckieApiKey: []
tags:
  - name: Runs
    description: Run history, run detail, and run filter helpers.
  - name: Tools
    description: Built-in, app, custom, and MCP tools available to the organization.
  - name: Agents
    description: Agent configuration data.
  - name: Guidelines
    description: Published guidelines.
  - name: Guardrails
    description: Escalation and restriction guardrails.
  - name: Runbooks
    description: Published, non-deleted runbooks.
paths:
  /api/v1/agents/{agent_id}:
    get:
      tags:
        - Agents
      summary: Retrieve an agent
      operationId: getAgent
      parameters:
        - $ref: '#/components/parameters/AgentId'
      responses:
        '200':
          description: Agent.
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/XRateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/XRateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/XRateLimitReset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    AgentId:
      name: agent_id
      in: path
      required: true
      schema:
        type: string
        format: uuid
  headers:
    XRateLimitLimit:
      description: Request limit for the active rate-limit bucket.
      schema:
        type: integer
    XRateLimitRemaining:
      description: Requests remaining in the active rate-limit bucket.
      schema:
        type: integer
    XRateLimitReset:
      description: Unix timestamp when the active rate-limit bucket resets.
      schema:
        type: integer
    RetryAfter:
      description: Seconds to wait before retrying.
      schema:
        type: integer
        minimum: 1
  schemas:
    AgentResponse:
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/Agent'
    Agent:
      type: object
      required:
        - id
        - object
        - name
        - description
        - status
        - last_run_at
        - start_with
        - instructions
        - model_config
        - tool_ids
        - resolution_tracking
        - resolution_rule_ids
        - knowledge_tags
        - guideline_ids
        - guardrail_ids
        - attribute_ids
        - category_ids
        - included_runbook_ids
        - excluded_runbook_ids
        - included_workflow_ids
        - excluded_workflow_ids
        - created_at
        - updated_at
      properties:
        id:
          type: string
          format: uuid
        object:
          type: string
          enum:
            - agent
        name:
          type: string
        description:
          type: string
        status:
          type: string
        last_run_at:
          type: string
          format: date-time
          nullable: true
        start_with:
          type: object
          required:
            - type
            - id
            - name
          properties:
            type:
              type: string
              nullable: true
            id:
              type: string
              nullable: true
            name:
              type: string
              nullable: true
        instructions:
          type: string
          nullable: true
        model_config:
          type: object
          nullable: true
          additionalProperties: true
        tool_ids:
          type: array
          items:
            type: string
          nullable: true
        resolution_tracking:
          type: boolean
        resolution_rule_ids:
          type: array
          items:
            type: string
        knowledge_tags:
          type: array
          items:
            type: string
        guideline_ids:
          type: array
          items:
            type: string
        guardrail_ids:
          type: array
          items:
            type: string
        attribute_ids:
          type: array
          items:
            type: string
        category_ids:
          type: array
          items:
            type: string
        included_runbook_ids:
          type: array
          items:
            type: string
        excluded_runbook_ids:
          type: array
          items:
            type: string
        included_workflow_ids:
          type: array
          items:
            type: string
        excluded_workflow_ids:
          type: array
          items:
            type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/Error'
    Error:
      type: object
      required:
        - code
        - message
        - request_id
      properties:
        code:
          type: string
          enum:
            - invalid_request
            - unauthenticated
            - permission_denied
            - not_found
            - rate_limited
            - internal_error
        message:
          type: string
        request_id:
          type: string
        retry_after:
          type: integer
          minimum: 1
  responses:
    BadRequest:
      description: The request was invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: The request is missing a valid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: The API key does not have the required scope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: The resource was not found in the API key's organization.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    RateLimited:
      description: A rate limit was exceeded.
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
        X-RateLimit-Limit:
          $ref: '#/components/headers/XRateLimitLimit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/XRateLimitRemaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/XRateLimitReset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalError:
      description: The API could not complete the request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    DuckieApiKey:
      type: http
      scheme: bearer
      description: API key created in Duckie Settings -> API Access.

````