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

# Update Agent Configuration

> Update an existing agent configuration.

Supports partial updates - you can update just the api_key field, or any other field(s).
All fields in the request body are optional.

Requires agent:write permission + billing feature 'write_custom_agent'.

Example:
    # Update only the API key
    PUT /agent-configurations/{id}
    {
      "api_key": "sk-new-key-value"
    }
    
    # Update multiple fields
    PUT /agent-configurations/{id}
    {
      "agent_name": "New Name",
      "api_key": "sk-new-key-value",
      "mcp_config": {"proxy_url": "https://proxy.example.com", "access_level": "read"}
    }
    
    # Enable/disable dome auto-apply (when true, saving dome config auto-applies it)
    PUT /agent-configurations/{id}
    {
      "dome_manually_configured": true
    }



## OpenAPI

````yaml /openapi/api.json put /v1/agent-configurations/{id}
openapi: 3.1.0
info:
  title: Vijil Console API (Combined)
  description: Combined OpenAPI specification for all vijil-console microservices.
  version: 0.1.0
servers: []
security: []
tags:
  - name: Teams
    description: Authentication, users, and team management
  - name: Agent Environment
    description: Agent, persona, policy, and harness management
  - name: Diamond
    description: Evaluation management and report retrieval
  - name: Dome
    description: Protection, guardrails, and telemetry
  - name: Red Team
    description: Red team campaigns
paths:
  /v1/agent-configurations/{id}:
    put:
      tags:
        - Agent Environment
        - agent-configurations
      summary: Update Agent Configuration
      description: >-
        Update an existing agent configuration.


        Supports partial updates - you can update just the api_key field, or any
        other field(s).

        All fields in the request body are optional.


        Requires agent:write permission + billing feature 'write_custom_agent'.


        Example:
            # Update only the API key
            PUT /agent-configurations/{id}
            {
              "api_key": "sk-new-key-value"
            }
            
            # Update multiple fields
            PUT /agent-configurations/{id}
            {
              "agent_name": "New Name",
              "api_key": "sk-new-key-value",
              "mcp_config": {"proxy_url": "https://proxy.example.com", "access_level": "read"}
            }
            
            # Enable/disable dome auto-apply (when true, saving dome config auto-applies it)
            PUT /agent-configurations/{id}
            {
              "dome_manually_configured": true
            }
      operationId: update_agent_configuration_v1_agent_configurations__id__put
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: 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'
components:
  schemas:
    AgentUpdate:
      properties:
        status:
          anyOf:
            - $ref: '#/components/schemas/AgentStatus'
            - type: 'null'
        agent_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Name
        agent_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Url
        model_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Model Name
        api_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Api Key
          description: API key value. Stored directly in the agent configuration.
        agent_system_prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent System Prompt
        hub:
          anyOf:
            - type: string
            - type: 'null'
          title: Hub
        rate_limit_requests_per_minute:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Rate Limit Requests Per Minute
          description: Rate limit for API requests per minute
        access_level:
          anyOf:
            - $ref: '#/components/schemas/AccessLevel'
            - type: 'null'
        agent_params:
          anyOf:
            - $ref: '#/components/schemas/AgentParams'
            - type: 'null'
        mcp_config:
          anyOf:
            - $ref: '#/components/schemas/MCPConfig'
            - type: 'null'
        delegated_agents:
          anyOf:
            - items:
                $ref: '#/components/schemas/DelegatedAgent'
              type: array
            - type: 'null'
          title: Delegated Agents
        white_box_config:
          anyOf:
            - $ref: '#/components/schemas/WhiteBoxConfig-Input'
            - type: 'null'
        agent_metadata:
          anyOf:
            - $ref: '#/components/schemas/AgentMetadata'
            - type: 'null'
        purpose:
          anyOf:
            - type: string
            - type: 'null'
          title: Purpose
        protocol:
          anyOf:
            - $ref: '#/components/schemas/ProtocolType'
            - type: 'null'
        test_score:
          anyOf:
            - type: number
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Test Score
        last_tested_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Tested By
        evaluated_harnesses:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Evaluated Harnesses
        last_evaluated_at:
          anyOf:
            - type: integer
            - type: 'null'
          title: Last Evaluated At
        protection_status:
          anyOf:
            - $ref: '#/components/schemas/ProtectionStatus'
            - type: 'null'
        dome_config_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Dome Config Id
        dome_manually_configured:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Dome Manually Configured
      type: object
      title: AgentUpdate
      description: Model for updating an agent (all fields optional).
    Agent:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        agent_name:
          type: string
          title: Agent Name
        model_name:
          type: string
          title: Model Name
        agent_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Url
        hub:
          type: string
          title: Hub
          default: custom
        api_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Api Key
        agent_system_prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent System Prompt
        rate_limit_requests_per_minute:
          type: integer
          minimum: 1
          title: Rate Limit Requests Per Minute
          description: Rate limit for API requests per minute
          default: 100
        team_id:
          type: string
          format: uuid
          title: Team Id
        created_by:
          type: string
          format: uuid
          title: Created By
        status:
          $ref: '#/components/schemas/AgentStatus'
          default: active
        created_at:
          type: integer
          title: Created At
        updated_at:
          type: integer
          title: Updated At
        access_level:
          $ref: '#/components/schemas/AccessLevel'
          default: black_box
        agent_params:
          anyOf:
            - $ref: '#/components/schemas/AgentParams'
            - type: 'null'
        mcp_config:
          anyOf:
            - $ref: '#/components/schemas/MCPConfig'
            - type: 'null'
        delegated_agents:
          items:
            $ref: '#/components/schemas/DelegatedAgent'
          type: array
          title: Delegated Agents
        white_box_config:
          anyOf:
            - $ref: '#/components/schemas/WhiteBoxConfig-Output'
            - type: 'null'
        agent_metadata:
          anyOf:
            - $ref: '#/components/schemas/AgentMetadata'
            - type: 'null'
        purpose:
          anyOf:
            - type: string
            - type: 'null'
          title: Purpose
        protocol:
          $ref: '#/components/schemas/ProtocolType'
          default: chat_completions
        test_score:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Test Score
        last_tested_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Tested By
        evaluated_harnesses:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Evaluated Harnesses
        last_evaluated_at:
          anyOf:
            - type: integer
            - type: 'null'
          title: Last Evaluated At
        protection_status:
          $ref: '#/components/schemas/ProtectionStatus'
          default: unprotected
        trust_stage:
          $ref: '#/components/schemas/TrustLifecycleStage'
          default: registered
        trusted_at:
          anyOf:
            - type: integer
            - type: 'null'
          title: Trusted At
        ttt_days:
          anyOf:
            - type: number
            - type: 'null'
          title: Ttt Days
        dome_config_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Dome Config Id
        dome_manually_configured:
          type: boolean
          title: Dome Manually Configured
          default: false
        import_metadata:
          anyOf:
            - $ref: '#/components/schemas/ImportMetadata'
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Import Metadata
        capabilities:
          anyOf:
            - $ref: '#/components/schemas/AgentCapabilities'
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Capabilities
        skills:
          items:
            anyOf:
              - $ref: '#/components/schemas/AgentSkill'
              - additionalProperties: true
                type: object
          type: array
          title: Skills
        latest_evaluation:
          anyOf:
            - $ref: '#/components/schemas/AgentLatestEvaluation'
            - type: 'null'
      type: object
      required:
        - id
        - agent_name
        - model_name
        - team_id
        - created_by
        - created_at
        - updated_at
      title: Agent
      description: Agent domain model.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AgentStatus:
      type: string
      enum:
        - draft
        - creating
        - active
        - under_review
        - deprecated
        - archived
        - pending
        - rejected
      title: AgentStatus
      description: Agent status values.
    AccessLevel:
      type: string
      enum:
        - black_box
        - grey_box
        - white_box
      title: AccessLevel
      description: |-
        Access level for agent analysis.

        Black Box: URL only - behavioral testing only
        Grey Box: Agent configuration - structure/capabilities analysis
        White Box: Source code access - full code + sandbox runtime analysis
    AgentParams:
      properties:
        temperature:
          anyOf:
            - type: number
            - type: 'null'
          title: Temperature
        top_p:
          anyOf:
            - type: number
            - type: 'null'
          title: Top P
        max_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Tokens
        timeout:
          anyOf:
            - type: integer
            - type: 'null'
          title: Timeout
        rag_params:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Rag Params
        function_route_params:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Function Route Params
      type: object
      title: AgentParams
      description: Model parameters for agent configuration.
    MCPConfig:
      properties:
        proxy_url:
          anyOf:
            - type: string
              maxLength: 2083
              minLength: 1
              format: uri
            - type: 'null'
          title: Proxy Url
        access_level:
          anyOf:
            - $ref: '#/components/schemas/MCPAccessLevel'
            - type: 'null'
        server_urls:
          anyOf:
            - items:
                type: string
                maxLength: 2083
                minLength: 1
                format: uri
              type: array
            - type: 'null'
          title: Server Urls
      type: object
      title: MCPConfig
      description: MCP (Model Context Protocol) proxy configuration.
    DelegatedAgent:
      properties:
        url:
          type: string
          title: Url
        agent_card_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Card Url
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        capabilities:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Capabilities
      type: object
      required:
        - url
      title: DelegatedAgent
      description: Reference to a delegated agent.
    WhiteBoxConfig-Input:
      properties:
        source_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Code
        repo_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Repo Url
        github_username:
          anyOf:
            - type: string
            - type: 'null'
          title: Github Username
        github_token:
          anyOf:
            - type: string
            - type: 'null'
          title: Github Token
        repo_branch:
          anyOf:
            - type: string
            - type: 'null'
          title: Repo Branch
        entry_point:
          anyOf:
            - type: string
            - type: 'null'
          title: Entry Point
      type: object
      title: WhiteBoxConfig
      description: Source code access configuration for white box analysis.
    AgentMetadata:
      properties:
        role:
          anyOf:
            - type: string
            - type: 'null'
          title: Role
        job_description:
          anyOf:
            - type: string
            - type: 'null'
          title: Job Description
        version:
          anyOf:
            - type: string
            - type: 'null'
          title: Version
        author:
          anyOf:
            - type: string
            - type: 'null'
          title: Author
        tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Tags
      type: object
      title: AgentMetadata
      description: Agent metadata for display and organization.
    ProtocolType:
      type: string
      enum:
        - chat_completions
        - a2a
      title: ProtocolType
      description: Communication protocol for agent endpoints.
    ProtectionStatus:
      type: string
      enum:
        - unprotected
        - configured
        - domed
      title: ProtectionStatus
      description: Dome protection lifecycle state.
    WhiteBoxConfig-Output:
      properties:
        source_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Code
        repo_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Repo Url
        github_username:
          anyOf:
            - type: string
            - type: 'null'
          title: Github Username
        repo_branch:
          anyOf:
            - type: string
            - type: 'null'
          title: Repo Branch
        entry_point:
          anyOf:
            - type: string
            - type: 'null'
          title: Entry Point
      type: object
      title: WhiteBoxConfig
      description: Source code access configuration for white box analysis.
    TrustLifecycleStage:
      type: string
      enum:
        - registered
        - tested
        - hardened
        - trusted
        - optimized
        - adapted
      title: TrustLifecycleStage
      description: Trust maturity lifecycle stage for an agent.
    ImportMetadata:
      properties:
        source:
          anyOf:
            - $ref: '#/components/schemas/ImportSource'
            - type: 'null'
        source_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Url
        imported_at:
          anyOf:
            - type: integer
            - type: 'null'
          title: Imported At
        original_format:
          anyOf:
            - type: string
            - type: 'null'
          title: Original Format
      type: object
      title: ImportMetadata
      description: Metadata about how an agent was imported.
    AgentCapabilities:
      properties:
        streaming:
          type: boolean
          title: Streaming
          default: false
        push_notifications:
          type: boolean
          title: Push Notifications
          default: false
        code_execution:
          type: boolean
          title: Code Execution
          default: false
        memory:
          type: boolean
          title: Memory
          default: false
        delegation:
          type: boolean
          title: Delegation
          default: false
        tools:
          items:
            type: string
          type: array
          title: Tools
      type: object
      title: AgentCapabilities
      description: Agent capability flags.
    AgentSkill:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        input_modes:
          items:
            type: string
          type: array
          title: Input Modes
        output_modes:
          items:
            type: string
          type: array
          title: Output Modes
      type: object
      required:
        - id
        - name
      title: AgentSkill
      description: An agent skill definition (for A2A protocol agents).
    AgentLatestEvaluation:
      properties:
        evaluation_id:
          type: string
          format: uuid
          title: Evaluation Id
        overall_score:
          anyOf:
            - type: number
            - type: 'null'
          title: Overall Score
        reliability_score:
          anyOf:
            - type: number
            - type: 'null'
          title: Reliability Score
        security_score:
          anyOf:
            - type: number
            - type: 'null'
          title: Security Score
        safety_score:
          anyOf:
            - type: number
            - type: 'null'
          title: Safety Score
        completed_at:
          anyOf:
            - type: integer
            - type: 'null'
          title: Completed At
      type: object
      required:
        - evaluation_id
      title: AgentLatestEvaluation
      description: |-
        Latest completed evaluation scores for an agent.

        Sideloaded on GET /agent-configurations when include_scores=true.
        Contains only domain-level score data — no UI or presentation concerns.
    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
    MCPAccessLevel:
      type: string
      enum:
        - read
        - write
        - admin
      title: MCPAccessLevel
      description: MCP (Model Context Protocol) access level values.
    ImportSource:
      type: string
      enum:
        - manual
      title: ImportSource
      description: Import source for agent configuration.

````