Agent Memory - Stores

Update memory store

Changed on

Update the configuration of the Agent Memory store identified by store Id. The request is accepted and processed asynchronously: errors reported by the Agent Memory service are returned in the task status (see GET /tasks/{taskId}), not in this response

patch/v1/memory-stores/{storeId}

Request

  • Base URL
    https://api.redislabs.com
  • URL
    https://api.redislabs.com/v1/memory-stores/{storeId}
  • Auth
    API key in header x-api-key and API key in header x-api-secret-key and API key in header x-auth-token

Path parameters

storeIdstring required

Memory store ID.

Request body

namestring

Optional. New memory store name (1-64 characters)

commandTypestring

Example request

{
  "name": "my-memory-store",
  "shortMemory": {
    "ttlSeconds": 86400
  },
  "longTermMemory": {
    "ttlSeconds": 31536000,
    "embedding": {
      "provider": "openai",
      "model": "gpt-4o-mini",
      "credentials": {
        "type": "apiKey"
      }
    }
  },
  "llm": {
    "provider": "openai",
    "model": "gpt-4o-mini",
    "credentials": {
      "type": "apiKey"
    }
  },
  "summarization": {
    "enabled": true,
    "triggerStrategy": "event_count",
    "eventCount": {
      "threshold": 50,
      "retainCount": 10
    }
  },
  "longTermMemoryExclusions": {
    "enabled": true,
    "semantic": {
      "enabled": true,
      "prompt": "Do not remember payment card numbers or home addresses"
    },
    "builtInDetectors": {
      "enabled": true,
      "detectors": [
        {
          "id": "credit-card",
          "enabled": true,
          "action": "redact"
        }
      ]
    },
    "customDetectors": {
      "enabled": true,
      "detectors": [
        {
          "name": "internal-ticket-id",
          "enabled": true,
          "action": "redact",
          "matcher": {
            "kind": "regex",
            "regex": {
              "pattern": "\\b\\d{3}-\\d{2}-\\d{4}\\b"
            }
          }
        }
      ]
    }
  },
  "addCustomMemoryTypes": [
    {
      "name": "travel_preference",
      "description": "Preferences the user expressed about travel",
      "fields": [
        {
          "name": "preferred_airline",
          "description": "Airline the user prefers to fly with",
          "type": "str"
        }
      ],
      "extractionStrategy": {
        "prompt": "Extract the user's travel preferences",
        "enabled": true
      }
    }
  ],
  "updateCustomMemoryTypeStrategies": [
    {
      "typeName": "travel_preference",
      "enabled": true
    }
  ],
  "extractionCadence": {
    "activeIntervalSeconds": 120
  }
}

Response

Accepted

taskIdstring uuid
commandTypestring
status'initialized' | 'received' | 'processing-in-progress' | 'processing-completed' | 'processing-error'
descriptionstring
timestampstring date-time
linksobject[]

Changes