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

# Update Agent Old

> Update agent (old implementation - deprecated).



## OpenAPI

````yaml https://api.mrassistant.ai/openapi.json put /agents/{agent_id}_old
openapi: 3.1.0
info:
  title: Backend - Multilingual Voice Agent System
  description: FastAPI backend for multilingual voice agents with tool use
  version: 1.0.0
servers: []
security: []
paths:
  /agents/{agent_id}_old:
    put:
      tags:
        - agents
      summary: Update Agent Old
      description: Update agent (old implementation - deprecated).
      operationId: update_agent_old_agents__agent_id__old_put
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Agent Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agent'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    AgentUpdate:
      properties:
        name:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        default_user_lang:
          anyOf:
            - type: string
              maxLength: 10
              minLength: 2
            - type: 'null'
          title: Default User Lang
        thinking_lang:
          anyOf:
            - type: string
              maxLength: 10
              minLength: 2
            - type: 'null'
          title: Thinking Lang
        default_voice_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Default Voice Id
        interruptions_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Interruptions Enabled
        escalation_policy:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Escalation Policy
        status:
          anyOf:
            - $ref: '#/components/schemas/AgentStatus'
            - type: 'null'
        model_provider:
          anyOf:
            - type: string
              pattern: >-
                ^(openai|azure_openai|anthropic|google|groq|cerebras|deepseek|xai|perplexity|together|amazon_bedrock|anyscale|openrouter|deepinfra)$
            - type: 'null'
          title: Model Provider
        model_name:
          anyOf:
            - type: string
              maxLength: 100
              minLength: 1
            - type: 'null'
          title: Model Name
        temperature:
          anyOf:
            - type: number
              maximum: 1
              minimum: 0
            - type: 'null'
          title: Temperature
        max_tokens:
          anyOf:
            - type: integer
              maximum: 1000
              minimum: 50
            - type: 'null'
          title: Max Tokens
        system_prompt:
          anyOf:
            - type: string
              maxLength: 8000
            - type: 'null'
          title: System Prompt
          description: System prompt defining role/behavior. Send empty string to clear.
        persona:
          anyOf:
            - type: string
              maxLength: 2000
            - type: 'null'
          title: Persona
          description: Short character/personality. Send empty string to clear.
        first_message_mode:
          anyOf:
            - type: string
              pattern: >-
                ^(assistant-speaks-first|wait-for-user|assistant-speaks-first-with-model-generated-message)$
            - type: 'null'
          title: First Message Mode
        first_message_script:
          anyOf:
            - type: string
              maxLength: 500
            - type: 'null'
          title: First Message Script
        voice_provider:
          anyOf:
            - type: string
              pattern: ^(elevenlabs|cartesia|openai|deepgram|google|azure|rime|lmnt)$
            - type: 'null'
          title: Voice Provider
        voice_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Voice Id
        background_sound_url:
          anyOf:
            - type: string
              maxLength: 500
            - type: 'null'
          title: Background Sound Url
        input_min_characters:
          anyOf:
            - type: integer
              maximum: 100
              minimum: 10
            - type: 'null'
          title: Input Min Characters
        transcriber_provider:
          anyOf:
            - type: string
              pattern: ^(deepgram|openai|assemblyai|google|azure)$
            - type: 'null'
          title: Transcriber Provider
        transcriber_model:
          anyOf:
            - type: string
              maxLength: 100
              minLength: 1
            - type: 'null'
          title: Transcriber Model
        background_denoising:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Background Denoising
        confidence_threshold:
          anyOf:
            - type: number
              maximum: 1
              minimum: 0
            - type: 'null'
          title: Confidence Threshold
        multilingual_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Multilingual Enabled
        supported_languages:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Supported Languages
        language_detection_provider:
          anyOf:
            - type: string
              pattern: ^(auto|deepgram|whisper)$
            - type: 'null'
          title: Language Detection Provider
        respond_in_user_language:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Respond In User Language
        wait_seconds:
          anyOf:
            - type: number
              maximum: 1
              minimum: 0.1
            - type: 'null'
          title: Wait Seconds
        smart_endpointing:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Smart Endpointing
        interruption_words:
          anyOf:
            - type: integer
              maximum: 10
              minimum: 0
            - type: 'null'
          title: Interruption Words
        punctuation_boundary_ms:
          anyOf:
            - type: integer
              maximum: 500
              minimum: 50
            - type: 'null'
          title: Punctuation Boundary Ms
        no_punctuation_boundary_ms:
          anyOf:
            - type: integer
              maximum: 3000
              minimum: 800
            - type: 'null'
          title: No Punctuation Boundary Ms
        silence_timeout_seconds:
          anyOf:
            - type: integer
              maximum: 120
              minimum: 10
            - type: 'null'
          title: Silence Timeout Seconds
        max_duration_seconds:
          anyOf:
            - type: integer
              maximum: 1800
              minimum: 180
            - type: 'null'
          title: Max Duration Seconds
        idle_messages_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Idle Messages Enabled
        max_idle_messages:
          anyOf:
            - type: integer
              maximum: 10
              minimum: 1
            - type: 'null'
          title: Max Idle Messages
        idle_timeout_seconds:
          anyOf:
            - type: number
              maximum: 60
              minimum: 5
            - type: 'null'
          title: Idle Timeout Seconds
        analysis_prompt:
          anyOf:
            - type: string
              maxLength: 2000
            - type: 'null'
          title: Analysis Prompt
        analysis_timeout_sec:
          anyOf:
            - type: integer
              maximum: 60
              minimum: 1
            - type: 'null'
          title: Analysis Timeout Sec
        min_messages_for_analysis:
          anyOf:
            - type: integer
              maximum: 10
              minimum: 0
            - type: 'null'
          title: Min Messages For Analysis
        voicemail_detection_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Voicemail Detection Enabled
        voicemail_message:
          anyOf:
            - type: string
              maxLength: 500
            - type: 'null'
          title: Voicemail Message
        end_call_message:
          anyOf:
            - type: string
              maxLength: 500
            - type: 'null'
          title: End Call Message
        keypad_input_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Keypad Input Enabled
        keypad_timeout_seconds:
          anyOf:
            - type: integer
              maximum: 6
              minimum: 1
            - type: 'null'
          title: Keypad Timeout Seconds
        keypad_delimiters:
          anyOf:
            - type: string
              pattern: ^[#*]+$
            - type: 'null'
          title: Keypad Delimiters
        sip_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Sip Enabled
          description: Enable SIP/phone calling for this agent
        recording_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Recording Enabled
          description: Enable call recording for this agent
        analytics_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Analytics Enabled
          description: Enable analytics tracking for this agent
      type: object
      title: AgentUpdate
      description: Agent update model - all fields optional for partial updates.
    Agent:
      properties:
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        default_user_lang:
          type: string
          maxLength: 10
          minLength: 2
          title: Default User Lang
        thinking_lang:
          type: string
          maxLength: 10
          minLength: 2
          title: Thinking Lang
        default_voice_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Default Voice Id
        interruptions_enabled:
          type: boolean
          title: Interruptions Enabled
          default: true
        escalation_policy:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Escalation Policy
        model_provider:
          type: string
          pattern: >-
            ^(openai|azure_openai|anthropic|google|groq|cerebras|deepseek|xai|perplexity|together|amazon_bedrock|anyscale|openrouter|deepinfra)$
          title: Model Provider
          default: openai
        model_name:
          type: string
          maxLength: 100
          minLength: 1
          title: Model Name
          default: gpt-4o-mini
        temperature:
          type: number
          maximum: 1
          minimum: 0
          title: Temperature
          default: 0.7
        max_tokens:
          type: integer
          maximum: 1000
          minimum: 50
          title: Max Tokens
          default: 150
        system_prompt:
          anyOf:
            - type: string
              maxLength: 8000
            - type: 'null'
          title: System Prompt
          description: >-
            Full system prompt defining the agent's role, behavior, and
            instructions. Falls back to description if not set.
        persona:
          anyOf:
            - type: string
              maxLength: 2000
            - type: 'null'
          title: Persona
          description: >-
            Short character/personality descriptor (e.g. 'Friendly British
            accountant'). Renders as 'Personality: ...' in the system prompt.
        first_message_mode:
          type: string
          pattern: >-
            ^(assistant-speaks-first|wait-for-user|assistant-speaks-first-with-model-generated-message)$
          title: First Message Mode
          default: assistant-speaks-first
        first_message_script:
          anyOf:
            - type: string
              maxLength: 500
            - type: 'null'
          title: First Message Script
        voice_provider:
          type: string
          pattern: ^(elevenlabs|cartesia|openai|deepgram|google|azure|rime|lmnt)$
          title: Voice Provider
          default: elevenlabs
        voice_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Voice Id
        background_sound_url:
          anyOf:
            - type: string
              maxLength: 500
            - type: 'null'
          title: Background Sound Url
        input_min_characters:
          type: integer
          maximum: 100
          minimum: 10
          title: Input Min Characters
          default: 30
        transcriber_provider:
          type: string
          pattern: ^(deepgram|openai|assemblyai|google|azure)$
          title: Transcriber Provider
          default: deepgram
        transcriber_model:
          type: string
          maxLength: 100
          minLength: 1
          title: Transcriber Model
          default: nova-3
        background_denoising:
          type: boolean
          title: Background Denoising
          default: true
        confidence_threshold:
          type: number
          maximum: 1
          minimum: 0
          title: Confidence Threshold
          default: 0.4
        multilingual_enabled:
          type: boolean
          title: Multilingual Enabled
          description: Enable automatic language detection for multilingual conversations
          default: false
        supported_languages:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Supported Languages
          description: >-
            List of language codes the agent supports (e.g., ['en', 'es',
            'fr']). If multilingual_enabled=true and this is empty, all
            languages are supported.
        language_detection_provider:
          type: string
          pattern: ^(auto|deepgram|whisper)$
          title: Language Detection Provider
          description: >-
            Provider for language detection: 'auto' uses STT provider's built-in
            detection
          default: auto
        respond_in_user_language:
          type: boolean
          title: Respond In User Language
          description: >-
            When true, agent responds in the detected user language. When false,
            always responds in default_user_lang.
          default: true
        wait_seconds:
          type: number
          maximum: 1
          minimum: 0.1
          title: Wait Seconds
          default: 0.4
        smart_endpointing:
          type: boolean
          title: Smart Endpointing
          default: true
        interruption_words:
          type: integer
          maximum: 10
          minimum: 0
          title: Interruption Words
          default: 3
        punctuation_boundary_ms:
          type: integer
          maximum: 500
          minimum: 50
          title: Punctuation Boundary Ms
          default: 100
        no_punctuation_boundary_ms:
          type: integer
          maximum: 3000
          minimum: 800
          title: No Punctuation Boundary Ms
          default: 1500
        silence_timeout_seconds:
          type: integer
          maximum: 120
          minimum: 10
          title: Silence Timeout Seconds
          default: 30
        max_duration_seconds:
          type: integer
          maximum: 1800
          minimum: 180
          title: Max Duration Seconds
          default: 600
        idle_messages_enabled:
          type: boolean
          title: Idle Messages Enabled
          default: true
        max_idle_messages:
          type: integer
          maximum: 10
          minimum: 1
          title: Max Idle Messages
          default: 3
        idle_timeout_seconds:
          type: number
          maximum: 60
          minimum: 5
          title: Idle Timeout Seconds
          default: 7.5
        analysis_prompt:
          anyOf:
            - type: string
              maxLength: 2000
            - type: 'null'
          title: Analysis Prompt
        analysis_timeout_sec:
          type: integer
          maximum: 60
          minimum: 1
          title: Analysis Timeout Sec
          default: 10
        min_messages_for_analysis:
          type: integer
          maximum: 10
          minimum: 0
          title: Min Messages For Analysis
          default: 2
        voicemail_detection_enabled:
          type: boolean
          title: Voicemail Detection Enabled
          default: true
        voicemail_message:
          anyOf:
            - type: string
              maxLength: 500
            - type: 'null'
          title: Voicemail Message
        end_call_message:
          anyOf:
            - type: string
              maxLength: 500
            - type: 'null'
          title: End Call Message
        keypad_input_enabled:
          type: boolean
          title: Keypad Input Enabled
          default: false
        keypad_timeout_seconds:
          type: integer
          maximum: 6
          minimum: 1
          title: Keypad Timeout Seconds
          default: 2
        keypad_delimiters:
          type: string
          pattern: ^[#*]+$
          title: Keypad Delimiters
          default: '#'
        sip_enabled:
          type: boolean
          title: Sip Enabled
          description: Enable SIP/phone calling for this agent
          default: false
        recording_enabled:
          type: boolean
          title: Recording Enabled
          description: Enable call recording for this agent
          default: true
        analytics_enabled:
          type: boolean
          title: Analytics Enabled
          description: Enable analytics tracking for this agent
          default: true
        id:
          type: string
          format: uuid
          title: Id
        owner_id:
          type: string
          format: uuid
          title: Owner Id
        status:
          $ref: '#/components/schemas/AgentStatus'
        meta_data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta Data
        workflow_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Workflow Id
      type: object
      required:
        - created_at
        - name
        - default_user_lang
        - thinking_lang
        - id
        - owner_id
        - status
      title: Agent
      description: Agent response model.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AgentStatus:
      type: string
      enum:
        - draft
        - active
        - paused
      title: AgentStatus
      description: Agent status enumeration.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````