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

# Update Agent



## OpenAPI

````yaml PATCH /persona/{persona_id}
openapi: 3.1.0
info:
  title: Onyx API
  description: Onyx API for AI-powered enterprise search and chat
  version: Development
servers:
  - url: https://cloud.onyx.app/api
security: []
paths:
  /persona/{persona_id}:
    patch:
      tags:
        - public
      summary: Update Persona
      operationId: update_persona
      parameters:
        - name: persona_id
          in: path
          required: true
          schema:
            type: integer
            title: Persona Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PersonaUpsertRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PersonaSnapshot'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
components:
  schemas:
    PersonaUpsertRequest:
      properties:
        name:
          type: string
          title: Name
        description:
          type: string
          title: Description
        document_set_ids:
          items:
            type: integer
          type: array
          title: Document Set Ids
        num_chunks:
          type: number
          title: Num Chunks
        is_public:
          type: boolean
          title: Is Public
        recency_bias:
          $ref: '#/components/schemas/RecencyBiasSetting'
        llm_filter_extraction:
          type: boolean
          title: Llm Filter Extraction
        llm_relevance_filter:
          type: boolean
          title: Llm Relevance Filter
        llm_model_provider_override:
          anyOf:
            - type: string
            - type: 'null'
          title: Llm Model Provider Override
        llm_model_version_override:
          anyOf:
            - type: string
            - type: 'null'
          title: Llm Model Version Override
        starter_messages:
          anyOf:
            - items:
                $ref: '#/components/schemas/StarterMessage'
              type: array
            - type: 'null'
          title: Starter Messages
        users:
          items:
            type: string
            format: uuid
          type: array
          title: Users
        groups:
          items:
            type: integer
          type: array
          title: Groups
        tool_ids:
          items:
            type: integer
          type: array
          title: Tool Ids
        remove_image:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Remove Image
        uploaded_image_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Uploaded Image Id
        icon_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Icon Name
        search_start_date:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Search Start Date
        label_ids:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          title: Label Ids
        is_default_persona:
          type: boolean
          title: Is Default Persona
          default: false
        display_priority:
          anyOf:
            - type: integer
            - type: 'null'
          title: Display Priority
        user_file_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: User File Ids
        system_prompt:
          type: string
          title: System Prompt
        replace_base_system_prompt:
          type: boolean
          title: Replace Base System Prompt
          default: false
        task_prompt:
          type: string
          title: Task Prompt
        datetime_aware:
          type: boolean
          title: Datetime Aware
      type: object
      required:
        - name
        - description
        - document_set_ids
        - num_chunks
        - is_public
        - recency_bias
        - llm_filter_extraction
        - llm_relevance_filter
        - tool_ids
        - system_prompt
        - task_prompt
        - datetime_aware
      title: PersonaUpsertRequest
    PersonaSnapshot:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
        description:
          type: string
          title: Description
        is_public:
          type: boolean
          title: Is Public
        is_visible:
          type: boolean
          title: Is Visible
        uploaded_image_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Uploaded Image Id
        icon_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Icon Name
        user_file_ids:
          items:
            type: string
          type: array
          title: User File Ids
        display_priority:
          anyOf:
            - type: integer
            - type: 'null'
          title: Display Priority
        is_default_persona:
          type: boolean
          title: Is Default Persona
        builtin_persona:
          type: boolean
          title: Builtin Persona
        starter_messages:
          anyOf:
            - items:
                $ref: '#/components/schemas/StarterMessage'
              type: array
            - type: 'null'
          title: Starter Messages
        llm_relevance_filter:
          type: boolean
          title: Llm Relevance Filter
        llm_filter_extraction:
          type: boolean
          title: Llm Filter Extraction
        tools:
          items:
            $ref: '#/components/schemas/ToolSnapshot'
          type: array
          title: Tools
        labels:
          items:
            $ref: '#/components/schemas/PersonaLabelSnapshot'
          type: array
          title: Labels
        owner:
          anyOf:
            - $ref: '#/components/schemas/MinimalUserSnapshot'
            - type: 'null'
        users:
          items:
            $ref: '#/components/schemas/MinimalUserSnapshot'
          type: array
          title: Users
        groups:
          items:
            type: integer
          type: array
          title: Groups
        document_sets:
          items:
            $ref: '#/components/schemas/DocumentSetSummary'
          type: array
          title: Document Sets
        llm_model_provider_override:
          anyOf:
            - type: string
            - type: 'null'
          title: Llm Model Provider Override
        llm_model_version_override:
          anyOf:
            - type: string
            - type: 'null'
          title: Llm Model Version Override
        num_chunks:
          anyOf:
            - type: number
            - type: 'null'
          title: Num Chunks
        system_prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: System Prompt
        replace_base_system_prompt:
          type: boolean
          title: Replace Base System Prompt
          default: false
        task_prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Task Prompt
        datetime_aware:
          type: boolean
          title: Datetime Aware
          default: true
      type: object
      required:
        - id
        - name
        - description
        - is_public
        - is_visible
        - uploaded_image_id
        - icon_name
        - user_file_ids
        - display_priority
        - is_default_persona
        - builtin_persona
        - starter_messages
        - llm_relevance_filter
        - llm_filter_extraction
        - tools
        - labels
        - owner
        - users
        - groups
        - document_sets
        - llm_model_provider_override
        - llm_model_version_override
        - num_chunks
      title: PersonaSnapshot
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    RecencyBiasSetting:
      type: string
      enum:
        - favor_recent
        - base_decay
        - no_decay
        - auto
      title: RecencyBiasSetting
    StarterMessage:
      properties:
        name:
          type: string
          title: Name
        message:
          type: string
          title: Message
      type: object
      required:
        - name
        - message
      title: StarterMessage
      description: Starter message for a persona.
    ToolSnapshot:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
        description:
          type: string
          title: Description
        definition:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Definition
        display_name:
          type: string
          title: Display Name
        in_code_tool_id:
          anyOf:
            - type: string
            - type: 'null'
          title: In Code Tool Id
        custom_headers:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          title: Custom Headers
        passthrough_auth:
          type: boolean
          title: Passthrough Auth
        mcp_server_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Mcp Server Id
        user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: User Id
        oauth_config_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Oauth Config Id
        oauth_config_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Oauth Config Name
        enabled:
          type: boolean
          title: Enabled
          default: true
        chat_selectable:
          type: boolean
          title: Chat Selectable
          default: true
        agent_creation_selectable:
          type: boolean
          title: Agent Creation Selectable
          default: true
        default_enabled:
          type: boolean
          title: Default Enabled
          default: false
      type: object
      required:
        - id
        - name
        - description
        - definition
        - display_name
        - in_code_tool_id
        - custom_headers
        - passthrough_auth
      title: ToolSnapshot
    PersonaLabelSnapshot:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
      type: object
      required:
        - id
        - name
      title: PersonaLabelSnapshot
    MinimalUserSnapshot:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        email:
          type: string
          title: Email
      type: object
      required:
        - id
        - email
      title: MinimalUserSnapshot
    DocumentSetSummary:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        cc_pair_summaries:
          items:
            $ref: '#/components/schemas/CCPairSummary'
          type: array
          title: Cc Pair Summaries
        is_up_to_date:
          type: boolean
          title: Is Up To Date
        is_public:
          type: boolean
          title: Is Public
        users:
          items:
            type: string
            format: uuid
          type: array
          title: Users
        groups:
          items:
            type: integer
          type: array
          title: Groups
        federated_connector_summaries:
          items:
            $ref: '#/components/schemas/FederatedConnectorSummary'
          type: array
          title: Federated Connector Summaries
      type: object
      required:
        - id
        - name
        - description
        - cc_pair_summaries
        - is_up_to_date
        - is_public
        - users
        - groups
      title: DocumentSetSummary
      description: Simplified document set model with minimal data for list views
    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
    CCPairSummary:
      properties:
        id:
          type: integer
          title: Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        source:
          $ref: '#/components/schemas/DocumentSource'
        access_type:
          $ref: '#/components/schemas/AccessType'
      type: object
      required:
        - id
        - name
        - source
        - access_type
      title: CCPairSummary
      description: >-
        Simplified connector-credential pair information with just essential
        data
    FederatedConnectorSummary:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
        source:
          $ref: '#/components/schemas/FederatedConnectorSource'
        entities:
          additionalProperties: true
          type: object
          title: Entities
      type: object
      required:
        - id
        - name
        - source
        - entities
      title: FederatedConnectorSummary
      description: Simplified federated connector information with just essential data
    DocumentSource:
      type: string
      enum:
        - ingestion_api
        - slack
        - web
        - google_drive
        - gmail
        - requesttracker
        - github
        - gitbook
        - gitlab
        - guru
        - bookstack
        - outline
        - confluence
        - jira
        - slab
        - productboard
        - file
        - coda
        - notion
        - zulip
        - linear
        - hubspot
        - document360
        - gong
        - google_sites
        - zendesk
        - loopio
        - dropbox
        - sharepoint
        - teams
        - salesforce
        - discourse
        - axero
        - clickup
        - mediawiki
        - wikipedia
        - asana
        - s3
        - r2
        - google_cloud_storage
        - oci_storage
        - xenforo
        - not_applicable
        - discord
        - freshdesk
        - fireflies
        - egnyte
        - airtable
        - highspot
        - drupal_wiki
        - imap
        - bitbucket
        - testrail
        - mock_connector
        - user_file
      title: DocumentSource
    AccessType:
      type: string
      enum:
        - public
        - private
        - sync
      title: AccessType
    FederatedConnectorSource:
      type: string
      enum:
        - federated_slack
      title: FederatedConnectorSource
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Authorization header with Bearer token

````