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

# Update agent configuration

> Updates the configuration of the specified agent. Only the provided properties will be updated. Any properties not provided will be left unchanged.



## OpenAPI

````yaml admin-openapi POST /agents/{agent_id}/config
openapi: 3.0.1
info:
  title: api
  version: 0.0.1
servers:
  - url: https://api.proficientai.com
    description: Production (The production environment)
  - url: https://main-64bxvpctea-uc.a.run.app
    description: Staging (The staging environment)
  - url: http://localhost:8080
    description: Development (The local environment)
security: []
paths:
  /agents/{agent_id}/config:
    post:
      tags:
        - Agents
      summary: Update agent configuration
      description: >-
        Updates the configuration of the specified agent. Only the provided
        properties will be updated. Any properties not provided will be left
        unchanged.
      operationId: agents_updateConfig
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/AgentId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentConfigUpdateParams'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentConfig'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '503':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
components:
  schemas:
    AgentId:
      title: AgentId
      type: string
      description: The unique identifier of the agent
    AgentConfigUpdateParams:
      title: AgentConfigUpdateParams
      type: object
      description: The data with which an `AgentConfig` is updated.
      properties:
        anthropic:
          $ref: '#/components/schemas/AnthropicConfig'
          nullable: true
        greeting_message:
          $ref: '#/components/schemas/GreetingMessage'
          nullable: true
        initial_turn:
          $ref: '#/components/schemas/InitialTurn'
          nullable: true
        model:
          $ref: '#/components/schemas/Model'
          nullable: true
        openai:
          $ref: '#/components/schemas/OpenAIConfig'
          nullable: true
        system_message:
          $ref: '#/components/schemas/SystemMessage'
          nullable: true
    AgentConfig:
      title: AgentConfig
      type: object
      description: >-
        Represents the current configuration of the agent. This is an
        admin-level resource that is not exposed to the users.
      properties:
        object:
          $ref: '#/components/schemas/AgentConfigObjectType'
        anthropic:
          $ref: '#/components/schemas/AnthropicConfig'
        agent_id:
          $ref: '#/components/schemas/AgentId'
        greeting_message:
          $ref: '#/components/schemas/GreetingMessage'
        initial_turn:
          $ref: '#/components/schemas/InitialTurn'
        model:
          $ref: '#/components/schemas/Model'
        openai:
          $ref: '#/components/schemas/OpenAIConfig'
        system_message:
          $ref: '#/components/schemas/SystemMessage'
      required:
        - object
        - anthropic
        - agent_id
        - greeting_message
        - initial_turn
        - model
        - openai
        - system_message
    ApiError:
      title: ApiError
      type: object
      description: >-
        Represents the general interface of an API error. The body of every
        error returned by the API contains `code` and `message` fields.
      properties:
        error:
          $ref: '#/components/schemas/ApiErrorBody'
      required:
        - error
    AnthropicConfig:
      title: AnthropicConfig
      type: object
      description: The configuration that is applied to Anthropic models.
      properties:
        temperature:
          $ref: '#/components/schemas/AnthropicConfigTemperature'
          nullable: true
        top_k:
          $ref: '#/components/schemas/AnthropicConfigTopK'
          nullable: true
        top_p:
          $ref: '#/components/schemas/AnthropicConfigTopP'
          nullable: true
    GreetingMessage:
      title: GreetingMessage
      type: string
      description: >-
        <p>The message sent by the agent to initiate an interaction. This
        property supports <a
        href="https://handlebarsjs.com/guide/#what-is-handlebars">Handlebars</a>
        template format where you have access to the <code>user</code> and
        <code>agent</code> parameters. You can use these parameters to add
        context and personalize the message.</p>
    InitialTurn:
      $ref: '#/components/schemas/InteractionParticipant'
      title: InitialTurn
      description: >-
        Indicates who sends the first message in each interaction. Defaults to
        `"user"`.
    Model:
      title: Model
      type: string
      enum:
        - anthropic.claude-v1
        - anthropic.claude-v1-100k
        - anthropic.claude-instant-v1
        - anthropic.claude-instant-v1-100k
        - openai.gpt-4
        - openai.gpt-3.5-turbo
        - openai.gpt-3.5-turbo-16k
      description: The underlying model that powers the agent.
    OpenAIConfig:
      title: OpenAIConfig
      type: object
      description: The configuration that is applied to OpenAI models.
      properties:
        frequency_penalty:
          $ref: '#/components/schemas/OpenAIConfigFrequencyPenalty'
          nullable: true
        presence_penalty:
          $ref: '#/components/schemas/OpenAIConfigPresencePenalty'
          nullable: true
        temperature:
          $ref: '#/components/schemas/OpenAIConfigTemperature'
          nullable: true
        top_p:
          $ref: '#/components/schemas/OpenAIConfigTopP'
          nullable: true
    SystemMessage:
      title: SystemMessage
      type: string
      description: >-
        <p>The system prompt that will be injected at the beginning of each
        interaction. This property supports <a
        href="https://handlebarsjs.com/guide/#what-is-handlebars">Handlebars</a>
        template format where you have access to the <code>user</code> and
        <code>agent</code> parameters. You can use these parameters to provide
        rich context to the agent and steer it in a specific direction.</p>
    AgentConfigObjectType:
      title: AgentConfigObjectType
      type: string
      enum:
        - agent_config
      description: The type of the `AgentConfig` object
    ApiErrorBody:
      title: ApiErrorBody
      type: object
      properties:
        code:
          $ref: '#/components/schemas/ApiErrorCode'
        message:
          type: string
      required:
        - code
        - message
    AnthropicConfigTemperature:
      title: AnthropicConfigTemperature
      type: number
      format: double
      description: >-
        <p>Determines the level of randomness in the generated output. Can take
        values between 0 and 1.0, with higher values like 0.8 resulting in more
        randomness, and lower values like 0.2 making the output more
        predictable. See original <a
        href="https://console.anthropic.com/docs/api/reference">definition</a>.</p>
    AnthropicConfigTopK:
      title: AnthropicConfigTopK
      type: integer
      description: >-
        <p>Only sample from the top K options for each subsequent token. Used to
        remove "long tail" low probability responses. Defaults to -1, which
        disables it. See original <a
        href="https://console.anthropic.com/docs/api/reference">definition</a>.
        See <a
        href="https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277">technical
        details</a>.</p>
    AnthropicConfigTopP:
      title: AnthropicConfigTopP
      type: number
      format: double
      description: >-
        <p>An alternative to the <code>temperature</code> option. Uses a method
        called nucleus sampling, which involves considering only the tokens with
        the highest probability mass. It specifies the proportion of the
        probability mass to consider, with a value of 0.1 indicating that only
        the tokens comprising the top 10% probability mass will be taken into
        account. In essence, <code>top_p</code> determines the size of the set
        of tokens to choose from, based on their probabilities. Defaults to -1,
        which disables it. See original <a
        href="https://console.anthropic.com/docs/api/reference">definition</a>.</p>
    InteractionParticipant:
      title: InteractionParticipant
      type: string
      enum:
        - user
        - agent
      description: >-
        Represents the type of the participant in a given interaction. As an
        example, message are created by interaction participants so the
        `sent_by` property of a `Message` object must be an
        `InteractionParticipant`.
    OpenAIConfigFrequencyPenalty:
      title: OpenAIConfigFrequencyPenalty
      type: number
      format: double
      description: >-
        <p>Can take values between -2.0 and 2.0, with positive values penalizing
        the model for generating new tokens that have already appeared
        frequently in the generated text so far. This reduces the likelihood of
        the model repeating the same line or phrase verbatim. In essence, a
        higher positive value for <code>frequency_penalty</code> encourages the
        model to use less frequently used tokens in the generated text. See
        original <a
        href="https://platform.openai.com/docs/api-reference/completions/create#completions/create-frequency_penalty">definition</a>.</p>
    OpenAIConfigPresencePenalty:
      title: OpenAIConfigPresencePenalty
      type: number
      format: double
      description: >-
        <p>Can take values between -2.0 and 2.0, with positive values penalizing
        the model for generating new tokens that have already appeared in the
        generated text. This encourages the model to generate text about new
        topics and increases the likelihood of generating more diverse content.
        In essence, a higher positive value for <code>presence_penalty</code>
        will lead to more avoidance of repeating previously used tokens in the
        generated text. See original <a
        href="https://platform.openai.com/docs/api-reference/completions/create#completions/create-presence_penalty">definition</a>.</p>
    OpenAIConfigTemperature:
      title: OpenAIConfigTemperature
      type: number
      format: double
      description: >-
        <p>Determines the level of randomness in the generated output. Can take
        values between 0 and 2.0, with higher values like 0.8 resulting in more
        randomness, and lower values like 0.2 making the output more
        predictable. See original <a
        href="https://platform.openai.com/docs/api-reference/completions/create#completions/create-temperature">definition</a>.</p>
    OpenAIConfigTopP:
      title: OpenAIConfigTopP
      type: number
      format: double
      description: >-
        <p>An alternative to the <code>temperature</code> option. Uses a method
        called nucleus sampling, which involves considering only the tokens with
        the highest probability mass. It specifies the proportion of the
        probability mass to consider, with a value of 0.1 indicating that only
        the tokens comprising the top 10% probability mass will be taken into
        account. In essence, <code>top_p</code> determines the size of the set
        of tokens to choose from, based on their probabilities. See original <a
        href="https://platform.openai.com/docs/api-reference/completions/create#completions/create-top_p">definition</a>.</p>
    ApiErrorCode:
      title: ApiErrorCode
      type: string
      enum:
        - invalid_request
        - invalid_credentials
        - forbidden
        - resource_not_found
        - conflict
        - unavailable
        - unknown

````