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

# Get Agent By Id

> Retrieve an Agent by ID



## OpenAPI

````yaml GET /ext/agent/{id}
openapi: 3.0.3
info:
  title: TruGen Developer Platform API
  version: 1.0.0
  description: OpenAPI specification for MCP endpoint
servers:
  - url: https://api.trugen.ai/v1
security: []
paths:
  /ext/agent/{id}:
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Unique identifier for the Agent
    get:
      summary: Retrieve an Agent by ID
      description: Retrieve an Agent by ID
      operationId: getAgentById
      responses:
        '200':
          description: Agent retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    description: Unique identifier for the agent.
                    example: b63c2a53-266b-4b43-a71b-7ea8b5e2e916
                  agent_name:
                    type: string
                    description: Display name of the agent.
                    example: Customer Support Agent
                  agent_system_prompt:
                    type: string
                    description: Foundational system instruction used by this agent.
                    example: >-
                      You are a helpful AI assistant that handles customer
                      service inquiries.
                  avatars:
                    type: array
                    description: List of avatars associated with this agent.
                    items:
                      type: object
                      properties:
                        avatar_key_id:
                          type: string
                          description: Avatar identifier key.
                          example: 1e4ea106
                        persona_name:
                          type: string
                          description: Display name for the avatar persona.
                          example: Sofia - Friendly Support
                        persona_prompt:
                          type: string
                          description: Behavioral prompt for the avatar interaction style.
                          example: >-
                            Speak in a warm, engaging tone and provide clear
                            answers.
                        config:
                          type: object
                          description: >-
                            Configuration for avatar behavior and runtime
                            settings.
                          properties:
                            llm:
                              type: object
                              description: >-
                                Large Language Model settings used by the
                                avatar.
                              properties:
                                model:
                                  type: string
                                  description: Identifier of the LLM model.
                                  example: >-
                                    meta-llama/llama-4-maverick-17b-128e-instruct
                                provider:
                                  type: string
                                  description: Provider used for LLM inference.
                                  example: groq
                            stt:
                              type: object
                              description: Speech-to-Text model configuration.
                              properties:
                                model:
                                  type: string
                                  description: Speech recognition model identifier.
                                  example: flux-general-en
                                provider:
                                  type: string
                                  description: STT provider service name.
                                  example: deepgram
                                min_endpointing_delay:
                                  type: number
                                  description: Minimum endpointing delay in seconds.
                                  example: 0.3
                                max_endpointing_delay:
                                  type: number
                                  description: Maximum endpointing delay in seconds.
                                  example: 0.4
                            tts:
                              type: object
                              description: Text-to-Speech generation configuration.
                              properties:
                                model_id:
                                  type: string
                                  description: Voice synthesis model identifier.
                                  example: eleven_turbo_v2_5
                                provider:
                                  type: string
                                  description: TTS provider service name.
                                  example: elevenlabs
                                voice_id:
                                  type: string
                                  description: Voice ID used to synthesize speech.
                                  example: ZUrEGyu8GFMwnHbvLhv2
                  callback_events:
                    type: array
                    description: Webhook events that should trigger callbacks.
                    items:
                      type: string
                      example: utterance_committed
                    example:
                      - participant_left
                      - agent.started_speaking
                      - agent.stopped_speaking
                      - agent.interrupted
                      - user.started_speaking
                      - user.stopped_speaking
                      - utterance_committed
                      - max_call_duration_timeout
                  callback_url:
                    type: string
                    description: Webhook endpoint URL to send callback events to.
                    example: https://webhooks.example.com/agent-events
                  config:
                    type: object
                    description: Agent-level configuration properties.
                    properties:
                      systemPrompt:
                        type: string
                        description: System prompt value stored within config.
                        example: >-
                          Always respond with a concise solution first, then
                          provide optional detail.
                      maxCallDuration:
                        type: integer
                        description: Maximum call duration allowed in seconds.
                        example: 1800
                      conversationalContext:
                        type: string
                        description: >-
                          Context label used to maintain continuity across
                          sessions.
                        example: customer-support
                  knowledge_base:
                    type: array
                    description: List of knowledge bases attached to this agent.
                    nullable: true
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          description: Knowledge base identifier.
                          example: ac79226e-73e1-41fe-8cde-469ae4e244fa
                        name:
                          type: string
                          description: Name of the knowledge base.
                          example: Product Support Articles
                        description:
                          type: string
                          description: Short summary of the knowledge base content.
                          example: >-
                            Contains FAQs and troubleshooting guides for product
                            lines.
                  tool:
                    type: array
                    description: List of tools attached to this agent.
                    nullable: true
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          description: Tool identifier.
                          example: ac79226e-73e1-41fe-8cde-469ae4e244fa
                        name:
                          type: string
                          description: Name of the tool.
                          example: Product Support Articles
                        description:
                          type: string
                          description: Short summary of the tool's functionality.
                          example: Tool for accessing employee directory.
                  mcp:
                    type: array
                    description: List of MCP attached to this agent.
                    nullable: true
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          description: MCP identifier.
                          example: ac79226e-73e1-41fe-8cde-469ae4e244fa
                        name:
                          type: string
                          description: Name of the MCP.
                          example: Product Support Articles
                        description:
                          type: string
                          description: Short summary of the MCP's functionality.
                          example: MCP for accessing employee directory.
                  record:
                    type: boolean
                    description: Determines whether voice call recordings should be stored.
                    example: true
                  created_at:
                    type: string
                    format: date-time
                    description: Timestamp indicating when the agent was created.
                    example: '2025-12-01T10:20:30.000Z'
                  updated_at:
                    type: string
                    format: date-time
                    description: Last updated timestamp for the agent.
                    example: '2025-12-03T14:50:00.000Z'
        '401':
          description: Unauthorized – missing or invalid API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: 'Unauthorized: not a valid authorization api key'
        '404':
          description: Agent not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                message: Agent details not found
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Failed to retrieve agent
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````