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

# Update Semantic Memory Config

> Update semantic memory configuration.

    This endpoint updates the semantic memory configuration at runtime.
    Only the fields you supply are modified; omitted fields retain their
    current values.

    The configuration includes:
    - enabled: Whether semantic memory is enabled
    - database: The database resource to use for storing semantic memories
    - llm_model: The language model to use for feature extraction
    - embedding_model: The embedder to use for semantic similarity
    - ingestion_trigger_messages: Number of messages before triggering ingestion
    - ingestion_trigger_age_seconds: Age threshold for triggering ingestion



## OpenAPI

````yaml /openapi.json put /api/v2/config/memory/semantic
openapi: 3.1.0
info:
  title: MemMachine API
  version: 0.3.10
  description: >-
    Architectural Memory Systems for AI Agents. Specialized in episodic and
    semantic memory management with strict namespace isolation.
servers:
  - url: http://localhost:8080
security: []
tags:
  - name: Configuration
    description: System overview and memory subsystem configuration.
  - name: Episodic Configuration
    description: Per-project episodic memory subsystem configuration.
  - name: Memories
    description: Core operations for episodic and semantic memory ingestion and retrieval.
  - name: Projects
    description: Lifecycle management for isolated memory namespaces.
  - name: Resources
    description: Embedder, language model, and reranker lifecycle management.
  - name: 'Semantic Memory: Categories'
    description: Category, template, and tag management for semantic sets.
  - name: 'Semantic Memory: Features'
    description: Add, retrieve, and update individual semantic features.
  - name: 'Semantic Memory: Sets'
    description: Set type and set ID lifecycle, listing, and configuration.
  - name: System
    description: Infrastructure, health, and observability.
paths:
  /api/v2/config/memory/semantic:
    put:
      tags:
        - Configuration
      summary: Update Semantic Memory Config
      description: |-
        Update semantic memory configuration.

            This endpoint updates the semantic memory configuration at runtime.
            Only the fields you supply are modified; omitted fields retain their
            current values.

            The configuration includes:
            - enabled: Whether semantic memory is enabled
            - database: The database resource to use for storing semantic memories
            - llm_model: The language model to use for feature extraction
            - embedding_model: The embedder to use for semantic similarity
            - ingestion_trigger_messages: Number of messages before triggering ingestion
            - ingestion_trigger_age_seconds: Age threshold for triggering ingestion
      operationId: update_semantic_memory_config
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSemanticMemorySpec'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateMemoryConfigResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    UpdateSemanticMemorySpec:
      properties:
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Enabled
          description: |2-

                Whether semantic memory is enabled. When set to true, the required
                fields (database, llm_model, embedding_model) must also be configured.
                Set to false to disable semantic memory entirely.
        database:
          anyOf:
            - type: string
            - type: 'null'
          title: Database
          description: |2-

                The ID of the database to use for semantic memory storage.
                Must reference a database configured in the resources section. Used by
                legacy semantic storage backends.
        storage_backend:
          anyOf:
            - type: string
            - type: 'null'
          title: Storage Backend
          description: |2-

                The storage backend used for semantic memory.
        feature_store:
          anyOf:
            - type: string
            - type: 'null'
          title: Feature Store
          description: |2-

                The ID of the relational database resource used to store semantic feature
                data when the semantic storage backend is `vector_store`.
        vector_collection:
          anyOf:
            - type: string
            - type: 'null'
          title: Vector Collection
          description: |2-

                The ID of the vector store resource used to store semantic feature
                embeddings when the semantic storage backend is `vector_store`.
        vector_dimensions:
          anyOf:
            - type: integer
              exclusiveMinimum: 0
            - type: 'null'
          title: Vector Dimensions
          description: |2-

                The vector dimensions used for semantic memory embeddings. If omitted for
                vector store storage, the configured embedder dimensions are used.
        llm_model:
          anyOf:
            - type: string
            - type: 'null'
          title: Llm Model
          description: |2-

                The ID of the language model to use for semantic memory extraction.
                Must reference a language model configured in the resources section.
        embedding_model:
          anyOf:
            - type: string
            - type: 'null'
          title: Embedding Model
          description: |2-

                The ID of the embedder to use for semantic memory vector search.
                Must reference an embedder configured in the resources section.
        ingestion_trigger_messages:
          anyOf:
            - type: integer
              exclusiveMinimum: 0
            - type: 'null'
          title: Ingestion Trigger Messages
          description: |2-

                The number of uningested messages that triggers an ingestion cycle.
        ingestion_trigger_age_seconds:
          anyOf:
            - type: integer
              exclusiveMinimum: 0
            - type: 'null'
          title: Ingestion Trigger Age Seconds
          description: |2-

                The maximum age (in seconds) of uningested messages before
                triggering an ingestion cycle.
      type: object
      title: UpdateSemanticMemorySpec
      description: Partial update for semantic memory configuration.
    UpdateMemoryConfigResponse:
      properties:
        success:
          type: boolean
          title: Success
          description: |2-

                Whether the operation succeeded.
        message:
          type: string
          title: Message
          description: |2-

                Status message describing the result of the operation.
      type: object
      required:
        - success
        - message
      title: UpdateMemoryConfigResponse
      description: Response model for memory configuration update.
    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
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````