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

# Update agent

> Update an agent's configuration



## OpenAPI

````yaml /api-reference/openapi.json put /agents/{agent_uuid}
openapi: 3.1.0
info:
  title: Calibrate Public API
  version: 0.1.0
  description: Programmatic API for CI/automation. Pass your key in the `X-API-Key` header.
servers:
  - url: https://api.calibrate.artpark.ai
    description: Production
security: []
paths:
  /agents/{agent_uuid}:
    put:
      tags:
        - agents
      summary: Update agent
      description: Update an agent's configuration
      operationId: update_agent_endpoint_agents__agent_uuid__put
      parameters:
        - name: agent_uuid
          in: path
          required: true
          schema:
            type: string
            description: The agent to update
            examples:
              - f47ac10b-58cc-4372-a567-0e02b2c3d479
            title: Agent Uuid
          description: The agent to update
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/routers__agents__AgentResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    AgentUpdate:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: New agent name. Omit to leave the name unchanged
        config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: >-
            Agent behavioral config. The keys depend on `type`.


            **`type=agent`**, built inside Calibrate:

            - `system_prompt`: the agent's instructions

            - `llm.model`: `provider/model`, e.g. `openai/gpt-4.1` or
            `google/gemini-2.5-flash`

            - `stt.provider`: `deepgram`, `openai`, `cartesia`, `elevenlabs`,
            `google`, `sarvam`, or `smallest`

            - `tts.provider`: `cartesia`, `openai`, `google`, `elevenlabs`,
            `sarvam`, or `smallest`

            - `settings.agent_speaks_first`, `settings.max_assistant_turns`

            - `system_tools.end_call`: let the agent end the call

            - `data_extraction_fields`: `[{name, type, description, required}]`


            ```json

            {
              "system_prompt": "You are a helpful support agent.",
              "llm": {"model": "openai/gpt-4.1"},
              "stt": {"provider": "deepgram"},
              "tts": {"provider": "elevenlabs"},
              "settings": {"agent_speaks_first": true, "max_assistant_turns": 50}
            }

            ```


            **`type=connection`**, your own HTTP endpoint:

            - `agent_url`: public HTTP(S) endpoint your agent is called at

            - `agent_headers`: headers sent on each request, e.g. auth

            - `benchmark_provider`: `openrouter` by default. Other values:
            `openai`, `google`, `anthropic`, `meta-llama`, `mistralai`,
            `deepseek`, `x-ai`, `cohere`, `qwen`, or `ai21`


            ```json

            {
              "agent_url": "https://api.example.com/agent",
              "agent_headers": {"Authorization": "Bearer <token>"},
              "benchmark_provider": "openrouter"
            }

            ```


            Replaces the stored config. Omit to leave unchanged


            For `type=connection`, changing `agent_url` or `agent_headers`
            resets the connection and benchmark verification flags
      type: object
      title: AgentUpdate
    routers__agents__AgentResponse:
      properties:
        uuid:
          type: string
          maxLength: 36
          minLength: 36
          title: Uuid
          description: ID of the agent
          examples:
            - f47ac10b-58cc-4372-a567-0e02b2c3d479
        name:
          type: string
          title: Name
          description: Name of the agent
        type:
          type: string
          enum:
            - agent
            - connection
          title: Type
          description: |-
            - `agent`: built inside Calibrate
            - `connection`: your existing agent connected to Calibrate
        config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: Agent configuration
        created_at:
          type: string
          title: Created At
          description: When the agent was created (ISO 8601 UTC)
        updated_at:
          type: string
          title: Updated At
          description: When the agent was last updated (ISO 8601 UTC)
      type: object
      required:
        - uuid
        - name
        - type
        - created_at
        - updated_at
      title: AgentResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authentication

````