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

# Update Assistant

> Update an assistant by its ID.

Partial update: only fields included in the request body are changed.
Creates a new version of the assistant.



## OpenAPI

````yaml /openapi.json patch /assistants/{assistant_id}
openapi: 3.1.0
info:
  title: Aegra
  description: Production-ready Agent Protocol server
  version: 0.9.24
servers: []
security: []
tags:
  - name: Assistants
    description: A configured instance of a graph.
  - name: Threads
    description: Accumulated state and outputs from a group of runs.
  - name: Thread Runs
    description: Invoke a graph on a thread, updating its persistent state.
  - name: Stateless Runs
    description: Invoke a graph without state or memory persistence.
  - name: Crons
    description: Scheduled recurring runs on a cron schedule.
  - name: Store
    description: Persistent key-value and semantic storage available from any thread.
  - name: Event Streaming
    description: Agent Protocol v2 thread event streaming and commands.
  - name: Health
    description: Server health checks and service information.
paths:
  /assistants/{assistant_id}:
    patch:
      tags:
        - Assistants
      summary: Update Assistant
      description: |-
        Update an assistant by its ID.

        Partial update: only fields included in the request body are changed.
        Creates a new version of the assistant.
      operationId: update_assistant_assistants__assistant_id__patch
      parameters:
        - name: assistant_id
          in: path
          required: true
          schema:
            type: string
            title: Assistant Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssistantUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Assistant'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentProtocolError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AssistantUpdate:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: The name of the assistant (auto-generated if not provided)
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: The description of the assistant. Defaults to null.
        config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Config
          description: Configuration to use for the graph.
        graph_id:
          type: string
          title: Graph Id
          description: The ID of the graph
          default: agent
        context:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Context
          description: The context to use for the graph. Useful when graph is configurable.
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
          description: Metadata to use for searching and filtering assistants.
      type: object
      title: AssistantUpdate
      description: Request model for creating assistants
    Assistant:
      properties:
        assistant_id:
          type: string
          title: Assistant Id
          description: Unique identifier for the assistant.
        name:
          type: string
          title: Name
          description: Human-readable name of the assistant.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Optional description of the assistant's purpose.
        config:
          additionalProperties: true
          type: object
          title: Config
          description: Configuration passed to the graph at runtime.
        context:
          additionalProperties: true
          type: object
          title: Context
          description: Context variables available to the graph during execution.
        graph_id:
          type: string
          title: Graph Id
          description: Identifier of the graph this assistant executes.
        user_id:
          type: string
          title: User Id
          description: Identifier of the user who owns this assistant.
        version:
          type: integer
          title: Version
          description: The version of the assistant.
        metadata_dict:
          additionalProperties: true
          type: object
          title: Metadata Dict
          description: Arbitrary metadata for searching and filtering.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Timestamp when the assistant was created.
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: Timestamp when the assistant was last updated.
      type: object
      required:
        - assistant_id
        - name
        - graph_id
        - user_id
        - version
        - created_at
        - updated_at
      title: Assistant
      description: Assistant entity model
    AgentProtocolError:
      properties:
        error:
          type: string
          title: Error
          description: Error type
        message:
          type: string
          title: Message
          description: Human-readable error message
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
          description: Additional error details
      type: object
      required:
        - error
        - message
      title: AgentProtocolError
      description: Standard Agent Protocol error response
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````