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

# Patch Agent

> Partially update an agent



## OpenAPI

````yaml https://document-assistant.us.aodocs.app/openapi.json patch /assistant/api/v1/tenants/{tenant}/agents/{agent_id}
openapi: 3.1.0
info:
  title: Document Assistant API
  description: |
    <p>
      The Document Assistant API enables developers to integrate document-based assistant
      functionalities into their applications using AODocs.
    </p>
    <p>
      The first step is to enable AIDA (AODocs Intelligent Document Assistant) in your tenant.
      The support team will provide you with the necessary information on how to get started.
    </p>
    <p>
      The second step is to enable AIDA on libraries. You need to be an administrator of the
      library to do this.<br />
      AIDA can answer questions only from those documents that are in an AIDA enabled
      library.<br />
      We create a vector store index for these documents. This can take some time. The get
      library API provides the status of the indexation and an estimate of the time
      remaining.<br />
      The content of the index is automatically kept up-to-date near real time with the
      content changes.
    </p>
    <p>
      The third step is to ask questions based on the AODocs documents.<br />
      AIDA automatically filters the results based on the user's permissions.
    </p>
    <p>
      <strong>Authentication:</strong> All API endpoints require a valid OAuth2 token in the
      Authorization header. Ensure the client ID of the OAuth2 token is whitelisted in AODocs.
    </p>
  version: 1.1.0
servers:
  - url: https://document-assistant.us.aodocs.app
    description: Production US
  - url: https://document-assistant.eu.aodocs.app
    description: Production EU
security: []
paths:
  /assistant/api/v1/tenants/{tenant}/agents/{agent_id}:
    patch:
      tags:
        - agent
      summary: Patch Agent
      description: Partially update an agent
      operationId: patch_agent_assistant_api_v1_tenants__tenant__agents__agent_id__patch
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            title: Agent Id
        - name: tenant
          in: path
          required: true
          schema:
            type: string
            description: The domain of the customer
            examples:
              - example.com
            title: Tenant
          description: The domain of the customer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentPatch'
      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'
      security:
        - HTTPBearer: []
components:
  schemas:
    AgentPatch:
      properties:
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: The description of the agent
        instructions:
          anyOf:
            - type: string
              maxLength: 10000
            - type: 'null'
          title: Instructions
          description: >-
            Free-text instructions that shape how the agent responds, such as
            its audience, role, tone, guardrails, and answer format
        permissions:
          anyOf:
            - items:
                $ref: '#/components/schemas/Permission'
              type: array
            - type: 'null'
          title: Permissions
          description: The permissions of the agent
        sources:
          anyOf:
            - items:
                $ref: '#/components/schemas/DataSource'
              type: array
            - type: 'null'
          title: Sources
          description: The sources of the agent
        glossary_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Glossary Ids
          description: The IDs of glossaries associated with the agent
        skill_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Skill Ids
          description: The IDs of skills associated with the agent
        dynamic_filters:
          anyOf:
            - items:
                $ref: '#/components/schemas/AgentMetadataFilterField'
              type: array
            - type: 'null'
          title: Dynamic Filters
          description: >-
            Low-cardinality metadata fields that the agent may use to scope
            searches
        dynamic_filter_instructions:
          anyOf:
            - type: string
              maxLength: 10000
            - type: 'null'
          title: Dynamic Filter Instructions
          description: >-
            Instructions that help the agent select metadata filter values for a
            question
        llm_profile_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Llm Profile Id
          description: >-
            The ID of the LLM profile that the agent uses, one of the profiles
            from GET /tenants/{tenant}/llm_profiles. The agent uses the tenant
            default model when it is null.
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: The name of the agent
      additionalProperties: false
      type: object
      title: AgentPatch
      description: Partial settings; cross-field constraints are checked after merging.
    Agent:
      properties:
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: The description of the agent
        instructions:
          anyOf:
            - type: string
              maxLength: 10000
            - type: 'null'
          title: Instructions
          description: >-
            Free-text instructions that shape how the agent responds, such as
            its audience, role, tone, guardrails, and answer format
        permissions:
          anyOf:
            - items:
                $ref: '#/components/schemas/Permission'
              type: array
            - type: 'null'
          title: Permissions
          description: The permissions of the agent
        sources:
          anyOf:
            - items:
                $ref: '#/components/schemas/DataSource'
              type: array
            - type: 'null'
          title: Sources
          description: The sources of the agent
        glossary_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Glossary Ids
          description: The IDs of glossaries associated with the agent
        skill_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Skill Ids
          description: The IDs of skills associated with the agent
        dynamic_filters:
          anyOf:
            - items:
                $ref: '#/components/schemas/AgentMetadataFilterField'
              type: array
            - type: 'null'
          title: Dynamic Filters
          description: >-
            Low-cardinality metadata fields that the agent may use to scope
            searches
        dynamic_filter_instructions:
          anyOf:
            - type: string
              maxLength: 10000
            - type: 'null'
          title: Dynamic Filter Instructions
          description: >-
            Instructions that help the agent select metadata filter values for a
            question
        llm_profile_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Llm Profile Id
          description: >-
            The ID of the LLM profile that the agent uses, one of the profiles
            from GET /tenants/{tenant}/llm_profiles. The agent uses the tenant
            default model when it is null.
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: The id of the agent
        name:
          type: string
          title: Name
          description: The name of the agent
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
          description: The date when the agent was created
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
          description: The date when the agent was last updated
      additionalProperties: false
      type: object
      required:
        - name
      title: Agent
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Permission:
      properties:
        type:
          $ref: '#/components/schemas/PermissionType'
          description: The type of the permission
        value:
          type: string
          title: Value
          description: >-
            The value of the permission. The email for user or group and * from
            everybody
      type: object
      required:
        - type
        - value
      title: Permission
    DataSource:
      properties:
        library_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Library Id
          description: The id of the library in which we want to answer questions
        library_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Library Name
          description: >-
            The current name of the library. This value is resolved by the
            server and ignored when writing an agent.
          readOnly: true
        classes:
          anyOf:
            - items:
                $ref: '#/components/schemas/DataSourceClass'
              type: array
            - type: 'null'
          title: Classes
          description: >-
            The document classes of the library in which we want to answer
            questions. All classes are used when omitted or empty.
        metadata_filters:
          anyOf:
            - items:
                $ref: '#/components/schemas/DataSourceMetadataFilter'
              type: array
            - type: 'null'
          title: Metadata Filters
          description: >-
            Optional metadata filters applied automatically to both semantic and
            keyword search. Conditions within this source use AND; sources use
            OR. Keys are field ids from this source’s library/class schema.
      additionalProperties: false
      type: object
      title: DataSource
    AgentMetadataFilterField:
      properties:
        id:
          type: string
          minLength: 1
          title: Id
          description: The id of the metadata field that the agent may filter on
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: >-
            The current display name of the metadata field. This value is
            resolved by the server and ignored when writing an agent.
          readOnly: true
      additionalProperties: false
      type: object
      required:
        - id
      title: AgentMetadataFilterField
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    PermissionType:
      type: string
      enum:
        - user
        - group
        - everybody
      title: PermissionType
    DataSourceClass:
      properties:
        id:
          type: string
          minLength: 1
          title: Id
          description: The id of a document class in the data source's library
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: >-
            The current name of the document class. This value is resolved by
            the server and ignored when writing an agent.
          readOnly: true
      additionalProperties: false
      type: object
      required:
        - id
      title: DataSourceClass
    DataSourceMetadataFilter:
      properties:
        key:
          type: string
          title: Key
          description: >-
            The field id (not the display name) of the metadata field to filter
            on
        value:
          anyOf:
            - type: integer
            - type: boolean
            - type: number
            - type: string
            - items:
                type: string
              type: array
            - items:
                type: number
              type: array
            - items:
                type: integer
              type: array
          title: Value
          description: The value or list of values to compare against
        operator:
          $ref: '#/components/schemas/AODocsFilterOperator'
          description: The comparison operator
          default: '=='
      additionalProperties: false
      type: object
      required:
        - key
        - value
      title: DataSourceMetadataFilter
    AODocsFilterOperator:
      type: string
      enum:
        - '=='
        - '!='
        - '>'
        - <
        - '>='
        - <=
        - in
        - nin
      title: AODocsFilterOperator
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.