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

# Update agent

> Update the project's agent configuration. Creates a new agent version.



## OpenAPI

````yaml https://api.pathors.com/openapi.json put /v1/projects/{projectId}/agent
openapi: 3.1.0
info:
  title: Pathors API
  description: >-
    Public developer API for the Pathors platform. Authenticate with a developer
    key (`Authorization: Bearer dk_...`) created from the dashboard. See
    [docs.pathors.com](https://docs.pathors.com) for guides.
  version: 1.0.0
  contact:
    name: Pathors Support
    url: https://app.pathors.com/support
servers:
  - url: https://api.pathors.com
    description: Production
  - url: http://localhost:8080
    description: Local development
security:
  - developerKey: []
tags:
  - name: Projects
    description: CRUD for projects owned by the authenticated developer
  - name: Agent Config
    description: Read and update a project's agent configuration and versions
  - name: Pathway
    description: Manage a project's pathway graph — nodes and decision edges
  - name: Chat
    description: OpenAI-compatible chat completions for a project agent
  - name: Sessions
    description: Create, search, terminate, and inspect agent sessions
  - name: Session History
    description: Browse and inspect persisted session history
  - name: Tools
    description: Manage a project's tools and inspect available tool types
  - name: Knowledgebases
    description: Manage knowledgebases and query them for relevant chunks
  - name: Datasets
    description: Upload and manage source files embedded into a knowledgebase
  - name: Test Cases
    description: CRUD for agent test cases
  - name: Test Suites
    description: Group test cases, run them, and read results
  - name: Webhooks
    description: Manage webhook subscriptions for project events
  - name: Calls
    description: Place outbound voice calls from a project agent
paths:
  /v1/projects/{projectId}/agent:
    put:
      tags:
        - Agent Config
      summary: Update agent
      description: Update the project's agent configuration. Creates a new agent version.
      operationId: putV1ProjectsByProjectIdAgent
      parameters:
        - name: projectId
          in: path
          required: true
          schema:
            type: string
          description: The ID of your project
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 16
                type:
                  type: string
                  enum:
                    - monolithic
                    - skill
                status:
                  type: string
                  enum:
                    - draft
                    - published
                globalPrompt:
                  type: string
                executionMode:
                  type: string
                  enum:
                    - smart
                    - economic
                    - on_premises
                    - realtime
                timezone:
                  anyOf:
                    - type: string
                    - type: 'null'
                memoryEnabled:
                  type: boolean
                searchKnowledgeBaseEnabled:
                  type: boolean
                promptModules:
                  anyOf:
                    - type: array
                      items:
                        type: object
                        properties:
                          name:
                            type: string
                            minLength: 1
                          description:
                            anyOf:
                              - type: string
                              - type: 'null'
                          content:
                            type: string
                          enabled:
                            type: boolean
                        required:
                          - name
                          - description
                          - content
                          - enabled
                    - type: 'null'
                beforeStartConfig:
                  anyOf:
                    - type: object
                      properties:
                        enabled:
                          type: boolean
                        mode:
                          type: string
                          const: template
                        toolTemplates:
                          type: array
                          items:
                            type: object
                            properties:
                              toolName:
                                type: string
                              toolId:
                                type: string
                              parameters:
                                type: object
                                propertyNames:
                                  type: string
                                additionalProperties:
                                  type: string
                            required:
                              - toolName
                              - toolId
                              - parameters
                      required:
                        - enabled
                        - mode
                    - type: 'null'
                postSessionWebhook:
                  anyOf:
                    - type: object
                      properties:
                        url:
                          type: string
                          format: uri
                        headers:
                          type: array
                          items:
                            type: object
                            properties:
                              key:
                                type: string
                              value:
                                type: string
                            required:
                              - key
                              - value
                        events:
                          minItems: 1
                          type: array
                          items:
                            type: string
                            enum:
                              - session.ended
                              - call.ended
                              - session.finalized
                              - recording.ready
                      required:
                        - url
                    - type: 'null'
                postSessionVariableKeys:
                  anyOf:
                    - type: array
                      items:
                        type: string
                    - type: 'null'
                postEvaluationConfig:
                  anyOf:
                    - type: object
                      properties:
                        enabled:
                          type: boolean
                        prompt:
                          type: string
                        resultType:
                          type: string
                          enum:
                            - pass_fail
                            - number
                            - enum
                        enumOptions:
                          type: array
                          items:
                            type: string
                        numberConfig:
                          type: object
                          properties:
                            min:
                              type: number
                            max:
                              type: number
                      required:
                        - enabled
                        - prompt
                        - resultType
                    - type: 'null'
                placeholderMessages:
                  anyOf:
                    - type: object
                      properties:
                        messages:
                          type: object
                          propertyNames:
                            type: string
                          additionalProperties:
                            type: string
                        defaultLanguage:
                          type: string
                      required:
                        - messages
                        - defaultLanguage
                    - type: 'null'
                variableConfigs:
                  anyOf:
                    - type: array
                      items:
                        type: object
                        properties:
                          key:
                            type: string
                          type:
                            default: string
                            type: string
                            enum:
                              - string
                              - number
                          description:
                            type: string
                        required:
                          - key
                          - type
                          - description
                    - type: 'null'
                voiceIntelligence:
                  anyOf:
                    - anyOf:
                        - type: object
                          properties:
                            ageEnabled:
                              type: boolean
                            genderEnabled:
                              type: boolean
                            voicemailDetectionEnabled:
                              type: boolean
                            languageDetectionEnabled:
                              type: boolean
                          required:
                            - ageEnabled
                            - genderEnabled
                        - type: object
                          properties:
                            ageGenderEnabled:
                              type: boolean
                            voicemailDetectionEnabled:
                              type: boolean
                            languageDetectionEnabled:
                              type: boolean
                          required:
                            - ageGenderEnabled
                    - type: 'null'
              additionalProperties: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      name:
                        type: string
                      type:
                        type: string
                      status:
                        type: string
                    required:
                      - name
                      - type
                      - status
                    additionalProperties: {}
                required:
                  - data
        '400':
          description: Error response
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      error:
                        type: string
                    required:
                      - error
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          message:
                            type: string
                          code:
                            type: string
                          details:
                            type: object
                            propertyNames:
                              type: string
                            additionalProperties: {}
                        required:
                          - message
                    required:
                      - error
        '401':
          description: Error response
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      error:
                        type: string
                    required:
                      - error
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          message:
                            type: string
                          code:
                            type: string
                          details:
                            type: object
                            propertyNames:
                              type: string
                            additionalProperties: {}
                        required:
                          - message
                    required:
                      - error
components:
  securitySchemes:
    developerKey:
      type: http
      scheme: bearer
      bearerFormat: Developer key (dk_...)
      description: Developer key created from the dashboard (Settings → Developer Keys)

````