> ## 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 Memory Config Endpoint

> Update the episodic and/or semantic memory configuration.

    This endpoint allows updating the memory configuration at runtime after
    resources (embedders, language models, rerankers) have been added or
    changed. Without calling this endpoint, newly added resources will not
    be used by the memory systems.

    Both `episodic_memory` and `semantic_memory` are optional. Supply one
    or both depending on which sections need updating. Within each section,
    only the fields you supply are modified; omitted fields retain their
    current values.

    **Typical workflow:**
    1. Add a new resource via `POST /config/resources/embedders` or
       `POST /config/resources/language_models`
    2. Call this endpoint to point the memory configuration at the new resource
    3. The configuration is persisted to the configuration file

    **Example - update episodic long-term memory to use a new embedder:**
    ```json
    {
      "episodic_memory": {
        "long_term_memory": {
          "embedder": "my-new-embedder"
        }
      }
    }
    ```

    **Example - update semantic memory to use a new LLM and embedder:**
    ```json
    {
      "semantic_memory": {
        "llm_model": "my-new-model",
        "embedding_model": "my-new-embedder"
      }
    }
    ```

    Returns 400 if no updates are supplied (both sections are null or empty).



## OpenAPI

````yaml /openapi.json put /api/v2/config/memory
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:
    put:
      tags:
        - Configuration
      summary: Update Memory Config Endpoint
      description: |-
        Update the episodic and/or semantic memory configuration.

            This endpoint allows updating the memory configuration at runtime after
            resources (embedders, language models, rerankers) have been added or
            changed. Without calling this endpoint, newly added resources will not
            be used by the memory systems.

            Both `episodic_memory` and `semantic_memory` are optional. Supply one
            or both depending on which sections need updating. Within each section,
            only the fields you supply are modified; omitted fields retain their
            current values.

            **Typical workflow:**
            1. Add a new resource via `POST /config/resources/embedders` or
               `POST /config/resources/language_models`
            2. Call this endpoint to point the memory configuration at the new resource
            3. The configuration is persisted to the configuration file

            **Example - update episodic long-term memory to use a new embedder:**
            ```json
            {
              "episodic_memory": {
                "long_term_memory": {
                  "embedder": "my-new-embedder"
                }
              }
            }
            ```

            **Example - update semantic memory to use a new LLM and embedder:**
            ```json
            {
              "semantic_memory": {
                "llm_model": "my-new-model",
                "embedding_model": "my-new-embedder"
              }
            }
            ```

            Returns 400 if no updates are supplied (both sections are null or empty).
      operationId: update_memory_config
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateMemoryConfigSpec'
        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:
    UpdateMemoryConfigSpec:
      properties:
        episodic_memory:
          anyOf:
            - $ref: '#/components/schemas/UpdateEpisodicMemorySpec'
            - type: 'null'
          description: |2-

                Partial update for episodic memory configuration. Only supplied
                fields are updated; omitted fields remain unchanged.
        semantic_memory:
          anyOf:
            - $ref: '#/components/schemas/UpdateSemanticMemorySpec'
            - type: 'null'
          description: |2-

                Partial update for semantic memory configuration. Only supplied
                fields are updated; omitted fields remain unchanged.
      type: object
      title: UpdateMemoryConfigSpec
      description: Specification for updating 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
    UpdateEpisodicMemorySpec:
      properties:
        long_term_memory:
          anyOf:
            - $ref: '#/components/schemas/UpdateLongTermMemorySpec'
            - type: 'null'
          description: |2-

                Partial update for long-term memory settings. Only supplied fields
                are updated; omitted fields remain unchanged.
        short_term_memory:
          anyOf:
            - $ref: '#/components/schemas/UpdateShortTermMemorySpec'
            - type: 'null'
          description: |2-

                Partial update for short-term memory settings. Only supplied fields
                are updated; omitted fields remain unchanged.
        long_term_memory_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Long Term Memory Enabled
          description: |2-

                Whether long-term episodic memory is enabled.
        short_term_memory_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Short Term Memory Enabled
          description: |2-

                Whether short-term episodic memory is enabled.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Enabled
          description: |2-

                Whether episodic memory as a whole is enabled.
      type: object
      title: UpdateEpisodicMemorySpec
      description: Partial update for episodic memory configuration.
    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.
    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
    UpdateLongTermMemorySpec:
      properties:
        backend:
          anyOf:
            - type: string
              enum:
                - declarative
                - event
            - type: 'null'
          title: Backend
          description: >-
            Long-term memory backend. Omit/null to keep the existing backend;
            set 'declarative' or 'event' to switch.
        embedder:
          anyOf:
            - type: string
            - type: 'null'
          title: Embedder
          description: |2-

                The ID of the embedder resource to use for long-term memory.
                Must reference an embedder configured in the resources section.
        reranker:
          anyOf:
            - type: string
            - type: 'null'
          title: Reranker
          description: |2-

                The ID of the reranker resource to use for long-term memory search.
                Must reference a reranker configured in the resources section.
        vector_graph_store:
          anyOf:
            - type: string
            - type: 'null'
          title: Vector Graph Store
          description: |2-

                The ID of the vector graph store (database) for storing long-term memories.
                Must reference a database configured in the resources section.
        vector_store:
          anyOf:
            - type: string
            - type: 'null'
          title: Vector Store
          description: VectorStore resource id (event backend only)
        segment_store:
          anyOf:
            - type: string
            - type: 'null'
          title: Segment Store
          description: >-
            SQL engine resource id backing the segment store (event backend
            only)
        properties_schema:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Properties Schema
          description: User-defined filterable properties (event backend only)
      type: object
      title: UpdateLongTermMemorySpec
      description: Partial update for long-term memory configuration.
    UpdateShortTermMemorySpec:
      properties:
        llm_model:
          anyOf:
            - type: string
            - type: 'null'
          title: Llm Model
          description: |2-

                The ID of the language model to use for short-term memory summarization.
                Must reference a language model configured in the resources section.
        message_capacity:
          anyOf:
            - type: integer
              exclusiveMinimum: 0
            - type: 'null'
          title: Message Capacity
          description: |2-

                The maximum message capacity for short-term memory, in characters.
                When exceeded, older messages are summarized.
      type: object
      title: UpdateShortTermMemorySpec
      description: Partial update for short-term memory configuration.

````