> ## 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.

# List agents

> Returns the agent catalog for the workspace (drafts and published). Scope `sessions:read`.



## OpenAPI

````yaml /api-reference/openapi.json get /agent/all
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/all:
    get:
      tags:
        - Agents
      summary: List agents
      description: >-
        Returns the agent catalog for the workspace (drafts and published).
        Scope `sessions:read`.
      operationId: list_agents_ca_api_v0_agent_all_get
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 20
            maximum: 100
          description: Items to return (max 100).
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            default: 0
          description: Items to skip.
      responses:
        '200':
          description: Paginated agent catalog
          content:
            application/json:
              example:
                data:
                  - id: agent_sales_hi
                    name: Sales Agent
                    objective: You are a sales assistant for {{company}}.
                    instruction: Be polite, concise, and never invent prices.
                    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: published
                    published_at: '2026-05-22T11:00:00Z'
                    created_at: '2026-05-22T10:00:00Z'
                    updated_at: '2026-05-22T11:00:00Z'
                pagination:
                  limit: 20
                  offset: 0
                  total: 1
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
    BearerAuth:
      type: http
      scheme: bearer

````