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

# Update Agent

> Updates an existing AI agent's configuration. All fields in the agent configuration can be updated including name, status, actions, and behavior settings.



## OpenAPI

````yaml /api-reference/conversation-ai/openapi.json put /conversation-ai/agents/{agentId}
openapi: 3.0.0
info:
  title: Conversation AI API
  description: Documentation for AI Employees API
  version: '1.0'
  contact: {}
servers:
  - url: https://services.leadconnectorhq.com
security: []
tags:
  - name: AI-Employees
    description: Documentation for AI Employees API
  - name: Actions
    description: Documentation for AI Employees API
  - name: Agents
    description: Documentation for AI Employees API
  - name: Generations
    description: Documentation for AI Employees API
paths:
  /conversation-ai/agents/{agentId}:
    put:
      tags:
        - Agents
      summary: Update Agent
      description: >-
        Updates an existing AI agent's configuration. All fields in the agent
        configuration can be updated including name, status, actions, and
        behavior settings.
      operationId: update-agent
      parameters:
        - name: Version
          in: header
          description: API Version
          required: true
          schema:
            type: string
            enum:
              - '2021-04-15'
        - name: agentId
          required: true
          in: path
          description: Conversations AI agent id
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateEmployeeDto'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmployeeResponseDTO'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedDTO'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableDTO'
      security:
        - bearer:
            - conversation-ai.write
components:
  schemas:
    UpdateEmployeeDto:
      type: object
      properties:
        name:
          type: string
          example: John Doe
          description: Name of the agent.
        businessName:
          type: string
          example: Tech Corp
          description: Name of the business the agent represents.
        mode:
          type: string
          enum:
            - 'off'
            - suggestive
            - auto-pilot
          description: Mode of operation for the agent, required if primary is enabled.
        channels:
          type: array
          description: Channels the agent can use.
          items:
            type: string
            enum:
              - IG
              - FB
              - SMS
              - WebChat
              - WhatsApp
              - Live_Chat
        isPrimary:
          type: boolean
          example: true
          description: Indicates if this agent is a primary agent.
        waitTime:
          type: number
          example: 30
          description: >-
            Wait time before agent responds (max 5 for minutes, 300 for
            seconds).
        waitTimeUnit:
          type: string
          enum:
            - minutes
            - seconds
          example: seconds
          description: Unit for wait time - SECONDS or MINUTES
        sleepEnabled:
          type: boolean
          example: false
          description: Indicates if sleep functionality is enabled.
        sleepTime:
          type: number
          example: 10
          description: >-
            Sleep time in the specified unit, required if sleepEnabled is true.
            (max 2880 for minutes, 172800 for seconds, 48 for hours)
        sleepTimeUnit:
          type: string
          enum:
            - hours
            - minutes
            - seconds
          description: Unit of sleep time, required if sleepEnabled is true.
          default: hours
        personality:
          type: string
          example: You re an AI assistant and you are friendly and helpful
          description: Personality traits of the agent.
        goal:
          type: string
          example: >-
            You are an AI assistant and you are helping customers with
            inquiries.
          description: The goal of the agent.
        instructions:
          type: string
          example: Provide excellent customer service.
          description: Instructions for the agent.
        autoPilotMaxMessages:
          type: number
          default: 10
        knowledgeBaseIds:
          description: Array of knowledge base IDs associated with this agent.
          type: array
          items:
            type: string
        respondToImages:
          type: boolean
          example: true
          default: false
          description: Allow agent to respond to images
        respondToAudio:
          type: boolean
          example: true
          default: false
          description: Allow agent to respond to audio
      required:
        - autoPilotMaxMessages
    EmployeeResponseDTO:
      type: object
      properties:
        id:
          type: string
          example: emp_123
          description: Unique identifier for the agent.
        name:
          type: string
          example: John Doe
          description: Name of the agent.
        businessName:
          type: string
          example: Tech Corp
          description: Name of the business the agent represents.
        mode:
          type: string
          enum:
            - 'off'
            - suggestive
            - auto-pilot
          example: auto-pilot
          description: Current operating mode of the agent.
        channels:
          type: array
          example:
            - SMS
            - Live_Chat
          description: Communication channels the agent operates on.
          items:
            type: string
            enum:
              - IG
              - FB
              - SMS
              - WebChat
              - WhatsApp
              - Live_Chat
        waitTime:
          type: number
          example: 30
          description: Wait time before agent responds.
        waitTimeUnit:
          type: string
          enum:
            - minutes
            - seconds
          example: seconds
          description: Unit for wait time.
        sleepEnabled:
          type: boolean
          example: false
          description: Indicates if sleep functionality is enabled.
        sleepTime:
          type: number
          example: 2
          description: Duration of sleep period.
        sleepTimeUnit:
          type: string
          enum:
            - hours
            - minutes
            - seconds
          example: hours
          description: Unit of sleep time.
        actions:
          description: List of actions associated with this agent.
          type: array
          items:
            $ref: '#/components/schemas/ActionsIdDto'
        isPrimary:
          type: boolean
          example: false
          description: Indicates if this agent is a primary agent.
        autoPilotMaxMessages:
          type: number
          example: 25
          description: >-
            Maximum number of messages in auto-pilot mode before requiring human
            intervention.
        goal:
          type: string
          example: Assist customers with inquiries
          description: The goal of the agent.
        personality:
          type: string
          example: Friendly and helpful
          description: Personality traits of the agent.
        instructions:
          type: string
          example: Provide excellent customer service
          description: Instructions for the agent.
        knowledgeBaseIds:
          example:
            - kb_123
            - kb_456
          description: Array of knowledge base IDs associated with this agent.
          type: array
          items:
            type: string
      required:
        - id
        - name
        - mode
        - channels
        - waitTime
        - waitTimeUnit
        - sleepEnabled
        - actions
        - isPrimary
        - autoPilotMaxMessages
    BadRequestDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 400
        message:
          type: string
          example: Bad Request
    UnauthorizedDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 401
        message:
          type: string
          example: 'Invalid token: access token is invalid'
        error:
          type: string
          example: Unauthorized
    UnprocessableDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 422
        message:
          example:
            - Unprocessable Entity
          type: array
          items:
            type: string
        error:
          type: string
          example: Unprocessable Entity
    ActionsIdDto:
      type: object
      properties:
        id:
          type: string
          example: actionId123
          description: Unique identifier for the action.
        type:
          type: string
          example: triggerWorkflow
          description: type of action.
          enum:
            - triggerWorkflow
            - updateContactField
            - appointmentBooking
            - stopBot
            - humanHandOver
            - advancedFollowup
            - transferBot
      required:
        - id
        - type
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Access Token or Private Integration Token

````