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

# Update an assistant

> Updates an existing assistant with the provided data. Supports partial updates.



## OpenAPI

````yaml PATCH /v1/assistants/{identifier}
openapi: 3.0.0
info:
  title: Devic.ai Public API
  description: >-
    Devic.ai is an AI platform that allows you to create, manage, and use AI
    agents for various tasks.
  version: 1.0.0
  contact:
    name: Devic.ai Support
    url: https://devic.ai
  x-logo:
    url: https://devic.ai/logo.png
    altText: Devic.ai Logo
  x-summary: Public API for interacting with Devic.ai platform
servers:
  - url: https://api.devic.ai
    description: Production server
  - url: https://staging-api.devic.ai
    description: Staging server
security:
  - bearerAuth: []
tags:
  - name: Projects
    description: Group agents, assistants, documents and costs into projects
  - name: Documents
    description: >-
      Knowledge base documents: create, version, attach and index markdown
      content for RAG
  - name: Document Folders
    description: Organise knowledge base documents into folders and attach them in bulk
  - name: Files
    description: Upload files and obtain shareable download URLs to attach to messages
  - name: Agents
    description: Endpoints related to AI agents and their operations
  - name: Assistants
    description: Endpoints for interacting with assistants and their specializations
  - name: Tool Servers
    description: Endpoints for managing tool servers and their tool definitions
  - name: Health
    description: API health check endpoints
  - name: Documentation
    description: Endpoints for retrieving markdown documentation
paths:
  /v1/assistants/{identifier}:
    patch:
      tags:
        - Assistants
      summary: Update an assistant
      description: >-
        Updates an existing assistant with the provided data. Supports partial
        updates.
      operationId: updateAssistant
      parameters:
        - name: identifier
          in: path
          required: true
          description: The unique identifier of the assistant to update
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAssistantRequest'
      responses:
        '200':
          description: Assistant updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssistantDetailResponse'
        '400':
          description: Invalid request data
        '401':
          description: Unauthorized - Invalid or missing token
        '404':
          description: Assistant not found
        '500':
          description: Internal Server Error
      security:
        - bearerAuth: []
components:
  schemas:
    UpdateAssistantRequest:
      type: object
      properties:
        name:
          type: string
          description: Assistant name
        description:
          type: string
          description: Assistant description
        presets:
          type: string
          description: System prompt / instructions
        model:
          type: string
          description: Default LLM model
        provider:
          type: string
          description: Default LLM provider
        imgUrl:
          type: string
          description: Image URL for the assistant
        state:
          type: string
          enum:
            - active
            - inactive
            - coming_soon
          description: Assistant state
        availableToolsGroupsUids:
          type: array
          items:
            type: string
          description: Tool group UIDs
        enabledTools:
          type: array
          items:
            type: string
          description: Enabled tool names
        accessConfiguration:
          type: object
          properties:
            externalAccess:
              type: boolean
            visibilityByRole:
              type: array
              items:
                type: string
        widgetConfiguration:
          type: object
          properties:
            enabled:
              type: boolean
            sourcesWhiteList:
              type: array
              items:
                type: string
            color:
              type: string
            welcomeMessage:
              type: string
        memoryDocuments:
          type: array
          items:
            type: object
        structuredOutput:
          type: object
        guardrailsConfiguration:
          type: object
          properties:
            enabled:
              type: boolean
            guardrails:
              type: object
        codeSnippetIds:
          type: array
          items:
            type: string
        availableSkillIds:
          type: array
          items:
            type: string
        subagentsIds:
          type: array
          items:
            type: string
        maxChatMessages:
          type: integer
        maxToolResponseInputTokens:
          type: integer
        contextManagement:
          type: object
          properties:
            fullContextTurnDepth:
              type: integer
              description: >-
                Number of most-recent turns sent to the model in full; older
                turns are replaced by their summary. 0 or omitted disables
                compression.
            alwaysIncludeUserMessages:
              type: boolean
              description: >-
                When true, user messages are always sent in full regardless of
                depth.
          description: >-
            Context depth control: summarize older turns to reduce the token
            footprint sent to the model.
    AssistantDetailResponse:
      type: object
      properties:
        _id:
          type: string
          description: Assistant ID
        identifier:
          type: string
          description: Unique identifier
        name:
          type: string
          description: Assistant name
        description:
          type: string
          description: Assistant description
        presets:
          type: string
          description: System prompt / instructions
        model:
          type: string
          description: Default LLM model
        provider:
          type: string
          description: Default LLM provider
        imgUrl:
          type: string
          description: Image URL
        state:
          type: string
          description: Assistant state
        availableToolsGroupsUids:
          type: array
          items:
            type: string
        enabledTools:
          type: array
          items:
            type: string
        accessConfiguration:
          type: object
        widgetConfiguration:
          type: object
        memoryDocuments:
          type: array
          items:
            type: object
        structuredOutput:
          type: object
        guardrailsConfiguration:
          type: object
        codeSnippetIds:
          type: array
          items:
            type: string
        availableSkillIds:
          type: array
          items:
            type: string
        subagentsIds:
          type: array
          items:
            type: string
        maxChatMessages:
          type: integer
        maxToolResponseInputTokens:
          type: integer
        contextManagement:
          type: object
          properties:
            fullContextTurnDepth:
              type: integer
              description: >-
                Number of most-recent turns sent to the model in full; older
                turns are replaced by their summary. 0 or omitted disables
                compression.
            alwaysIncludeUserMessages:
              type: boolean
              description: >-
                When true, user messages are always sent in full regardless of
                depth.
          description: >-
            Context depth control: summarize older turns to reduce the token
            footprint sent to the model.
        creationTimestampMs:
          type: integer
          description: Creation timestamp in milliseconds
        lastEditTimestampMs:
          type: integer
          description: Last edit timestamp in milliseconds
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Use JWT token for authentication

````