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

# Patch Memory

> Upsert the singleton memory row.

First write requires both ``agentFramework`` and ``memory``.
Updates apply only the fields explicitly present in the body.
The reload pipeline reassembles + validates the engine config; a
framework/memory mismatch rolls back with a 422.



## OpenAPI

````yaml /standalone/openapi.json patch /admin/api/v1/memory
openapi: 3.1.0
info:
  title: Idun Agent Engine Server
  description: A production-ready server for conversational AI agents
  version: 0.6.1
servers: []
security: []
tags:
  - name: Runtime
    description: >-
      Public agent run endpoints, engine operations, and chat-channel webhooks.
      SSE streaming via the AG-UI protocol.
  - name: Agent Configuration
    description: >-
      Singleton admin endpoints for the agent, prompts, memory, guardrails, and
      onboarding wizard.
  - name: Auth & SSO
    description: >-
      Login, sessions, password change, SSO config, and the public SSO discovery
      endpoint.
  - name: Integrations & Tools
    description: MCP server registry and external integration credentials.
  - name: Observability
    description: Tracing/logging provider configuration.
  - name: Traces
    description: >-
      Trace and span storage admin endpoints — list, detail, delete, and
      pipeline-health for the standalone trace store.
  - name: Dashboard
    description: >-
      Operator dashboard widgets — KPIs, time-series, top errors, and
      configuration summary.
paths:
  /admin/api/v1/memory:
    patch:
      tags:
        - Agent Configuration
      summary: Patch Memory
      description: |-
        Upsert the singleton memory row.

        First write requires both ``agentFramework`` and ``memory``.
        Updates apply only the fields explicitly present in the body.
        The reload pipeline reassembles + validates the engine config; a
        framework/memory mismatch rolls back with a 422.
      operationId: patch_memory_admin_api_v1_memory_patch
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StandaloneMemoryPatch'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/StandaloneMutationResponse_StandaloneMemoryRead_
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    StandaloneMemoryPatch:
      properties:
        agentFramework:
          anyOf:
            - $ref: '#/components/schemas/AgentFramework'
            - type: 'null'
        memory:
          anyOf:
            - $ref: '#/components/schemas/SqliteCheckpointConfig'
            - $ref: '#/components/schemas/InMemoryCheckpointConfig'
            - $ref: '#/components/schemas/PostgresCheckpointConfig'
            - oneOf:
                - $ref: '#/components/schemas/AdkInMemorySessionConfig'
                - $ref: '#/components/schemas/AdkVertexAiSessionConfig'
                - $ref: '#/components/schemas/AdkDatabaseSessionConfig'
              discriminator:
                propertyName: type
                mapping:
                  database:
                    $ref: '#/components/schemas/AdkDatabaseSessionConfig'
                  in_memory:
                    $ref: '#/components/schemas/AdkInMemorySessionConfig'
                  vertex_ai:
                    $ref: '#/components/schemas/AdkVertexAiSessionConfig'
            - type: 'null'
          title: Memory
      type: object
      title: StandaloneMemoryPatch
      description: Body for PATCH /admin/api/v1/memory. All fields optional.
    StandaloneMutationResponse_StandaloneMemoryRead_:
      properties:
        data:
          $ref: '#/components/schemas/StandaloneMemoryRead'
        reload:
          $ref: '#/components/schemas/StandaloneReloadResult'
      type: object
      required:
        - data
        - reload
      title: StandaloneMutationResponse[StandaloneMemoryRead]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AgentFramework:
      type: string
      enum:
        - LANGGRAPH
        - ADK
        - CREWAI
        - CUSTOM
        - TRANSLATION_AGENT
        - CORRECTION_AGENT
        - DEEP_RESEARCH_AGENT
      title: AgentFramework
      description: Supported agent frameworks for engine.
    SqliteCheckpointConfig:
      properties:
        type:
          type: string
          const: sqlite
          title: Type
        db_url:
          type: string
          title: Db Url
      type: object
      required:
        - type
        - db_url
      title: SqliteCheckpointConfig
      description: Configuration for SQLite checkpointer.
    InMemoryCheckpointConfig:
      properties:
        type:
          type: string
          const: memory
          title: Type
      type: object
      required:
        - type
      title: InMemoryCheckpointConfig
      description: Configuration for In-Memory checkpointer.
    PostgresCheckpointConfig:
      properties:
        type:
          type: string
          const: postgres
          title: Type
        db_url:
          type: string
          title: Db Url
      type: object
      required:
        - type
        - db_url
      title: PostgresCheckpointConfig
      description: Configuration for Postgres checkpointer.
    AdkInMemorySessionConfig:
      properties:
        type:
          type: string
          const: in_memory
          title: Type
          default: in_memory
      type: object
      title: AdkInMemorySessionConfig
      description: Configuration for In-Memory Session Service.
    AdkVertexAiSessionConfig:
      properties:
        type:
          type: string
          const: vertex_ai
          title: Type
          default: vertex_ai
        project_id:
          type: string
          title: Project Id
          description: Google Cloud Project ID
        location:
          type: string
          title: Location
          description: Google Cloud Location (e.g. us-central1)
        reasoning_engine_app_name:
          type: string
          title: Reasoning Engine App Name
          description: Reasoning Engine Application Name or ID
      type: object
      required:
        - project_id
        - location
        - reasoning_engine_app_name
      title: AdkVertexAiSessionConfig
      description: Configuration for Vertex AI Session Service.
    AdkDatabaseSessionConfig:
      properties:
        type:
          type: string
          const: database
          title: Type
          default: database
        db_url:
          type: string
          title: Db Url
          description: Database URL (e.g. postgresql+psycopg://...)
      type: object
      required:
        - db_url
      title: AdkDatabaseSessionConfig
      description: Configuration for Database Session Service.
    StandaloneMemoryRead:
      properties:
        agentFramework:
          $ref: '#/components/schemas/AgentFramework'
        memory:
          anyOf:
            - $ref: '#/components/schemas/SqliteCheckpointConfig'
            - $ref: '#/components/schemas/InMemoryCheckpointConfig'
            - $ref: '#/components/schemas/PostgresCheckpointConfig'
            - oneOf:
                - $ref: '#/components/schemas/AdkInMemorySessionConfig'
                - $ref: '#/components/schemas/AdkVertexAiSessionConfig'
                - $ref: '#/components/schemas/AdkDatabaseSessionConfig'
              discriminator:
                propertyName: type
                mapping:
                  database:
                    $ref: '#/components/schemas/AdkDatabaseSessionConfig'
                  in_memory:
                    $ref: '#/components/schemas/AdkInMemorySessionConfig'
                  vertex_ai:
                    $ref: '#/components/schemas/AdkVertexAiSessionConfig'
          title: Memory
        updatedAt:
          type: string
          format: date-time
          title: Updatedat
      type: object
      required:
        - agentFramework
        - memory
        - updatedAt
      title: StandaloneMemoryRead
      description: GET response and the data payload of PATCH responses.
    StandaloneReloadResult:
      properties:
        status:
          $ref: '#/components/schemas/StandaloneReloadStatus'
        message:
          type: string
          title: Message
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
      type: object
      required:
        - status
        - message
      title: StandaloneReloadResult
      description: |-
        Reload outcome attached to every admin mutation response.

        ``reloaded`` means DB committed and runtime now uses the new config.
        ``restart_required`` means DB committed and process restart is needed.
        ``reload_failed`` means DB rolled back and runtime is unchanged.
    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
    StandaloneReloadStatus:
      type: string
      enum:
        - reloaded
        - restart_required
        - reload_failed
      title: StandaloneReloadStatus
      description: Outcome of a reload triggered by an admin mutation.

````