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

# Get agent

> Fetches one agent by id (draft or published). Scope `sessions:read`.



## OpenAPI

````yaml /api-reference/openapi.json get /agent/{agent_id}
openapi: 3.1.0
info:
  title: Lehar API
  version: v0
  description: >-
    Customer-facing REST API for the Lehar voice-AI platform. Platform-admin
    endpoints are intentionally excluded from this reference. Regenerate with
    `npm run sync:openapi`.
servers:
  - url: https://api.lehar.ai/ca/api/v0
security:
  - ApiKeyAuth: []
  - BearerAuth: []
paths:
  /agent/{agent_id}:
    get:
      tags:
        - Agents
      summary: Get agent
      description: Fetches one agent by id (draft or published). Scope `sessions:read`.
      operationId: get_agent_ca_api_v0_agent__agent_id__get
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            title: Agent Id
      responses:
        '200':
          description: Agent record
          content:
            application/json:
              example:
                id: agent_sales_hi
                name: Sales Agent
                objective: You are a sales assistant for {{company}}.
                instruction: Be warm and concise. Confirm the callback time.
                task: Qualify the lead and book a callback.
                faqs: null
                sample_conversations: null
                channel: voice
                config:
                  llm_provider: gemini
                  tts_provider: sarvam
                  voice: anushka
                tools: []
                custom_variables:
                  - callee_name
                  - company
                questionnaire: null
                template_agent_id: null
                customer_id: customer_01EXAMPLE
                owner_user_id: user_01EXAMPLE
                created_by_user_id: user_01EXAMPLE
                visibility: private
                status: draft
                published_at: null
                created_at: '2026-05-22T10:00:00Z'
                updated_at: '2026-05-22T10:05:00Z'
        '404':
          description: Not found
          content:
            application/json:
              example:
                error:
                  code: not_found
                  message: Agent not found
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
    BearerAuth:
      type: http
      scheme: bearer

````