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

# Get Agent Details

> Retrieve the full configuration and details of a specific saved voice agent using its unique ID.

Retrieve the complete configuration profile of a specific Voice Agent.

This endpoint is particularly useful when you need to audit an agent's current settings, verify its configured LLM/TTS engine, or dynamically load its variables into your own application's UI before starting a live session.

<Info>
  **Authentication Required:** You must include your API key in the `x-api-key` header.
</Info>

### Required Parameters

To fetch an agent, you must provide its `agentId` directly in the URL path.

* **`agentId`:** The unique identifier generated when the agent was first created (e.g., `1bca24a70cf2e9fb0c722a35`).

### Understanding the Response

If the agent is successfully located, the API returns a `200 OK` status with the full agent object.

* **`id`**: Confirms the ID of the fetched agent.
* **`config`**: The exact configuration dictionary powering the agent. This includes all prompt instructions (`agent_role`, `agent_goal`), configured voice/avatar models, and any connected tools or knowledge bases.
* **`createdAt` & `updatedAt`**: Timestamps to help you track configuration changes over time.

### Troubleshooting Common Errors

* **`400 Invalid agent id`**: This usually occurs if the ID string is malformed or not the correct length. Ensure there are no trailing spaces in your path.
* **`404 Agent not found`**: The format of the ID is correct, but no agent exists with this identifier in your organization. Double-check the ID or verify that the agent hasn't been deleted.


## OpenAPI

````yaml get /agents/{agentId}
openapi: 3.0.3
info:
  title: Lyzr Voice LiveKit API
  version: 1.0.0
servers:
  - url: https://voice-livekit.studio.lyzr.ai/v1
security: []
paths:
  /agents/{agentId}:
    get:
      summary: Get Agent Details
      description: >-
        Retrieve the full configuration and details of a specific saved voice
        agent using its unique ID.
      parameters:
        - name: agentId
          in: path
          required: true
          description: The unique 24-character identifier of the agent.
          schema:
            type: string
            example: 1bca24a70cf2e9fb0c722a35
      responses:
        '200':
          description: Agent found successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  agent:
                    type: object
                    properties:
                      id:
                        type: string
                        example: 1bca24a70cf2e9fb0c722a35
                      config:
                        $ref: '#/components/schemas/AgentConfig'
                      createdAt:
                        type: string
                        example: '2023-10-25T12:00:00Z'
                      updatedAt:
                        type: string
                        example: '2023-10-26T12:00:00Z'
                      shared:
                        type: boolean
                        example: true
        '400':
          description: Invalid agent ID format.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  issues:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
                  example:
                    type: object
                    additionalProperties: true
        '404':
          description: Agent not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Agent not found.
                  details:
                    type: string
      security:
        - ApiKeyAuth: []
components:
  schemas:
    AgentConfig:
      type: object
      description: Comprehensive configuration settings for the agent.
      properties:
        agent_name:
          type: string
        agent_description:
          type: string
        engine:
          type: object
          properties:
            kind:
              type: string
            stt:
              type: string
            llm:
              type: string
            tts:
              type: string
            voice_id:
              type: string
            language:
              type: string
        engine_pipeline:
          type: object
        engine_realtime:
          type: object
        prompt:
          type: string
        agent_role:
          type: string
        agent_goal:
          type: string
        agent_instructions:
          type: string
        dynamic_variables:
          type: object
          additionalProperties:
            type: string
        dynamic_variable_defaults:
          type: object
          additionalProperties:
            type: string
        conversation_start:
          type: object
          properties:
            who:
              type: string
            greeting:
              type: string
        turn_detection:
          type: string
        noise_cancellation:
          type: object
        api_key:
          type: string
        knowledge_base:
          type: object
        managed_agents:
          type: object
        tools:
          type: array
          items:
            type: string
        lyzr_tools:
          type: array
          items:
            type: object
        agent_id:
          type: string
        user_id:
          type: string
        session_id:
          type: string
        preemptive_generation:
          type: boolean
        pronunciation_correction:
          type: boolean
        pronunciation_rules:
          type: object
        audio_recording_enabled:
          type: boolean
        vad_enabled:
          type: boolean
        avatar:
          type: object
        background_audio:
          type: object
        corrections:
          type: array
          items:
            type: object
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````