{"_id":"@tablestore/openclaw-mem0","_rev":"5634330-69b8d660da10b426ea079d4b","dist-tags":{"latest":"0.8.2"},"name":"@tablestore/openclaw-mem0","time":{"created":"2026-03-17T04:19:44.424Z","modified":"2026-03-17T13:13:01.957Z","0.8.0":"2026-03-15T14:08:47.981Z","0.8.1":"2026-03-17T04:14:26.781Z","0.8.2":"2026-03-17T13:05:03.778Z"},"versions":{"0.8.0":{"name":"@tablestore/openclaw-mem0","version":"0.8.0","keywords":["openclaw","plugin","memory","mem0","long-term-memory","tablestore","vector-store"],"license":"Apache-2.0","_id":"@tablestore/openclaw-mem0@0.8.0","maintainers":[{"name":"nashiluoyuji","email":"nashiluoyuji@gmail.com"}],"dist":{"shasum":"9b487d57e60e82a31cf55bed6fd14cc0dca1cab3","tarball":"https://registry.npmmirror.com/@tablestore/openclaw-mem0/-/openclaw-mem0-0.8.0.tgz","fileCount":7760,"integrity":"sha512-4Y4h2ZVakFKJgPjw1yNC72rsANgVoXFMT8f0mtBUxRP850Afnla8T4jfFS66A5H1/G9F0Jdwnr+i37E9DzoIvg==","signatures":[{"sig":"MEQCIH7Z4W0sORb5MplsRvPhKg0L7ss4+qF+fBUEeVtwj5AEAiBDoCTZ4Ahxu9BjKusWdLzhw1QOU8k+kGO5Wjv6drl6nQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":131852170,"size":21435944},"type":"module","_from":"file:openclaw/tablestore-openclaw-mem0-0.8.0.tgz","scripts":{"pack":"bash build-plugin.sh","test":"vitest run"},"_npmUser":{"name":"nashiluoyuji","email":"nashiluoyuji@gmail.com"},"openclaw":{"extensions":["./index.ts"]},"_resolved":"/root/mem0-tablestore-080-tablestore/openclaw/tablestore-openclaw-mem0-0.8.0.tgz","_integrity":"sha512-4Y4h2ZVakFKJgPjw1yNC72rsANgVoXFMT8f0mtBUxRP850Afnla8T4jfFS66A5H1/G9F0Jdwnr+i37E9DzoIvg==","_npmVersion":"10.9.2","description":"Mem0 memory backend for OpenClaw with Alibaba Cloud Tablestore vector store","directories":{},"_nodeVersion":"22.13.1","dependencies":{"mem0ai":"^2.2.1","tablestore":"^5.6.0","@sinclair/typebox":"0.34.47","@alicloud/tea-util":"^1.4.0","@alicloud/credentials":"^2.4.2","@alicloud/ots20160620":"^1.0.0","@alicloud/openapi-client":"^0.4.0","@alicloud/tablestore20201209":"^1.0.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.18"},"bundleDependencies":["mem0ai","tablestore","@alicloud/tablestore20201209","@alicloud/openapi-client","@alicloud/tea-util","@alicloud/ots20160620","@alicloud/credentials"],"_npmOperationalInternal":{"tmp":"tmp/openclaw-mem0_0.8.0_1773583726782_0.04798103507693541","host":"s3://npm-registry-packages-npm-production"},"_cnpmcore_publish_time":"2026-03-15T14:08:47.981Z","publish_time":1773583727981,"_source_registry_name":"default"},"0.8.1":{"name":"@tablestore/openclaw-mem0","version":"0.8.1","type":"module","description":"Mem0 memory backend for OpenClaw with Alibaba Cloud Tablestore vector store","license":"Apache-2.0","keywords":["openclaw","plugin","memory","mem0","long-term-memory","tablestore","vector-store"],"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"scripts":{"test":"vitest run","pack":"bash ../shell/build-plugin.sh"},"dependencies":{"@sinclair/typebox":"0.34.47","mem0ai":"^2.2.1","tablestore":"^5.6.0","@alicloud/tablestore20201209":"^1.0.0","@alicloud/openapi-client":"^0.4.0","@alicloud/tea-util":"^1.4.0","@alicloud/ots20160620":"^1.0.0","@alicloud/credentials":"^2.4.2"},"openclaw":{"extensions":["./index.ts"]},"devDependencies":{"vitest":"^4.0.18"},"_id":"@tablestore/openclaw-mem0@0.8.1","bundleDependencies":["mem0ai","tablestore","@alicloud/tablestore20201209","@alicloud/openapi-client","@alicloud/tea-util","@alicloud/ots20160620","@alicloud/credentials"],"_integrity":"sha512-d8vsXuwlzmrHDMCleVY5XzPO05oq7vNeqShDg2pljnTr0amRYMeP+Fk5S2JJFKe9Pjbs4sEKxJMBP5KBzKOWeQ==","_resolved":"/root/mem0-tablestore-080-tablestore-new/openclaw/tablestore-openclaw-mem0-0.8.1.tgz","_from":"file:/root/mem0-tablestore-080-tablestore-new/openclaw/tablestore-openclaw-mem0-0.8.1.tgz","_nodeVersion":"22.13.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-d8vsXuwlzmrHDMCleVY5XzPO05oq7vNeqShDg2pljnTr0amRYMeP+Fk5S2JJFKe9Pjbs4sEKxJMBP5KBzKOWeQ==","shasum":"ac491e6a49fd3cb393e5bbc6166e766c1a975cd3","tarball":"https://registry.npmmirror.com/@tablestore/openclaw-mem0/-/openclaw-mem0-0.8.1.tgz","fileCount":7759,"unpackedSize":131849368,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHk80x6xL5PYeYQCk999wlcFkjWGhNg5k9dlAAsaYFXUAiEAlQXHauWKXRWFocY1QMBhUJGMeHUg64/VcwHk3HinGb0="}],"size":21433859},"_npmUser":{"name":"nashiluoyuji","email":"nashiluoyuji@gmail.com"},"directories":{},"maintainers":[{"name":"nashiluoyuji","email":"nashiluoyuji@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/openclaw-mem0_0.8.1_1773720866057_0.32933969319768264"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-03-17T04:14:26.781Z","publish_time":1773720866781,"_source_registry_name":"default"},"0.8.2":{"name":"@tablestore/openclaw-mem0","version":"0.8.2","type":"module","description":"Mem0 memory backend for OpenClaw with Alibaba Cloud Tablestore vector store","license":"Apache-2.0","keywords":["openclaw","plugin","memory","mem0","long-term-memory","tablestore","vector-store"],"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"scripts":{"test":"vitest run","pack":"bash ../shell/build-plugin.sh"},"dependencies":{"@sinclair/typebox":"0.34.47","mem0ai":"^2.2.1","tablestore":"^5.6.0","@alicloud/tablestore20201209":"^1.0.0","@alicloud/openapi-client":"^0.4.0","@alicloud/tea-util":"^1.4.0","@alicloud/ots20160620":"^1.0.0","@alicloud/credentials":"^2.4.2"},"openclaw":{"extensions":["./index.ts"]},"devDependencies":{"vitest":"^4.0.18"},"_id":"@tablestore/openclaw-mem0@0.8.2","bundleDependencies":["mem0ai","tablestore","@alicloud/tablestore20201209","@alicloud/openapi-client","@alicloud/tea-util","@alicloud/ots20160620","@alicloud/credentials"],"_integrity":"sha512-kSAoGEYEaUUX6l94cGXDQXWoua+yAAdNecVJ7BzPTTPGPN3pZebwZyLxKRqQKEpTyV++0xWKDqBXlM9QTb6Tpg==","_resolved":"/root/mem0-tablestore-080-tablestore-new/openclaw/tablestore-openclaw-mem0-0.8.2.tgz","_from":"file:/root/mem0-tablestore-080-tablestore-new/openclaw/tablestore-openclaw-mem0-0.8.2.tgz","_nodeVersion":"22.13.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-kSAoGEYEaUUX6l94cGXDQXWoua+yAAdNecVJ7BzPTTPGPN3pZebwZyLxKRqQKEpTyV++0xWKDqBXlM9QTb6Tpg==","shasum":"c6ede51e8418f5b9f5f821af73f4c4eceb4bd482","tarball":"https://registry.npmmirror.com/@tablestore/openclaw-mem0/-/openclaw-mem0-0.8.2.tgz","fileCount":7759,"unpackedSize":131870440,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIA2slh9wISFuQFnDhgqQ/5Ok+jNjupicD+Rzu8IwRXG3AiAJWIDp6X3rM8KwnPOrZftscyZsm9tP/sqpfQ1ayXc3HQ=="}],"size":21440090},"_npmUser":{"name":"nashiluoyuji","email":"nashiluoyuji@gmail.com"},"directories":{},"maintainers":[{"name":"nashiluoyuji","email":"nashiluoyuji@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/openclaw-mem0_0.8.2_1773752703038_0.7170105177197765"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-03-17T13:05:03.778Z","publish_time":1773752703778,"_source_registry_name":"default"}},"description":"Mem0 memory backend for OpenClaw with Alibaba Cloud Tablestore vector store","keywords":["openclaw","plugin","memory","mem0","long-term-memory","tablestore","vector-store"],"license":"Apache-2.0","maintainers":[{"name":"nashiluoyuji","email":"nashiluoyuji@gmail.com"}],"readme":"# @tablestore/openclaw-mem0\n\nLong-term memory for [OpenClaw](https://github.com/openclaw/openclaw) agents, powered by [Mem0](https://mem0.ai) with Alibaba Cloud Tablestore as the vector store backend.\n\nYour agent forgets everything between sessions. This plugin fixes that. It watches conversations, extracts what matters, and brings it back when relevant — automatically.\n\n## How it works\n\n**Auto-Recall** — Before the agent responds, the plugin searches Mem0 for memories that match the current message and injects them into context.\n\n**Auto-Capture** — After the agent responds, the plugin sends the exchange to Mem0. Mem0 decides what's worth keeping — new facts get stored, stale ones updated, duplicates merged.\n\nBoth run silently. No prompting, no configuration, no manual calls.\n\n### Short-term vs long-term memory\n\nMemories are organized into two scopes:\n\n- **Session (short-term)** — Auto-capture stores memories scoped to the current session via Mem0's `run_id` / `runId` parameter. These are contextual to the ongoing conversation and automatically recalled alongside long-term memories.\n\n- **User (long-term)** — The agent can explicitly store long-term memories using the `memory_store` tool (with `longTerm: true`, the default). These persist across all sessions for the user.\n\nDuring **auto-recall**, the plugin searches both scopes and presents them separately — long-term memories first, then session memories — so the agent has full context.\n\nThe agent tools (`memory_search`, `memory_list`) accept a `scope` parameter (`\"session\"`, `\"long-term\"`, or `\"all\"`) to control which memories are queried. The `memory_store` tool accepts a `longTerm` boolean (default: `true`) to choose where to store.\n\nAll new parameters are optional and backward-compatible — existing configurations work without changes.\n\n### Per-agent memory isolation\n\nIn multi-agent setups, each agent automatically gets its own memory namespace. Session keys following the pattern `agent:<agentId>:<uuid>` are parsed to derive isolated namespaces (`${userId}:agent:${agentId}`). Single-agent deployments are unaffected — plain session keys and `agent:main:*` keys resolve to the configured `userId`.\n\n**How it works:**\n\n- The agent's session key is inspected on every recall/capture cycle\n- If the key matches `agent:<name>:<uuid>`, memories are stored under `userId:agent:<name>`\n- Different agents never see each other's memories unless explicitly queried\n\n**Explicit cross-agent queries:**\n\nAll memory tools (`memory_search`, `memory_store`, `memory_list`, `memory_forget`) accept an optional `agentId` parameter to query another agent's namespace:\n\n```\nmemory_search({ query: \"user's tech stack\", agentId: \"researcher\" })\n```\n\nResolution priority: explicit `agentId` > explicit `userId` > session-derived > configured default.\n\n## Setup\n\n```bash\nopenclaw plugins install @tablestore/openclaw-mem0@0.8.2\n```\n\n### Understanding `userId`\n\nThe `userId` field is a **string you choose** to uniquely identify the user whose memories are being stored. It is **not** something you look up in the Mem0 dashboard — you define it yourself.\n\nPick any stable, unique identifier for the user. Common choices:\n\n- Your application's internal user ID (e.g. `\"user_123\"`, `\"alice@example.com\"`)\n- A UUID (e.g. `\"550e8400-e29b-41d4-a716-446655440000\"`)\n- A simple username (e.g. `\"alice\"`)\n\nAll memories are scoped to this `userId` — different values create separate memory namespaces. If you don't set it, it defaults to `\"default\"`, which means all users share the same memory space.\n\n> **Tip:** In a multi-user application, set `userId` dynamically per user (e.g. from your auth system) rather than hardcoding a single value.\n\n### Platform (Mem0 Cloud)\n\nGet an API key from [app.mem0.ai](https://app.mem0.ai), then add to your `openclaw.json`:\n\n```json5\n// plugins.entries\n\"openclaw-mem0\": {\n  \"enabled\": true,\n  \"config\": {\n    \"apiKey\": \"${MEM0_API_KEY}\",\n    \"userId\": \"alice\"  // any unique identifier you choose for this user\n  }\n}\n```\n\n### Open-Source (Self-hosted)\n\nNo Mem0 key needed. Requires `OPENAI_API_KEY` for default embeddings/LLM.\n\n```json5\n\"openclaw-mem0\": {\n  \"enabled\": true,\n  \"config\": {\n    \"mode\": \"open-source\",\n    \"userId\": \"alice\"  // any unique identifier you choose for this user\n  }\n}\n```\n\nSensible defaults out of the box. To customize the embedder, vector store, or LLM:\n\n```json5\n\"config\": {\n  \"mode\": \"open-source\",\n  \"userId\": \"your-user-id\",\n  \"oss\": {\n    \"embedder\": { \"provider\": \"openai\", \"config\": { \"model\": \"text-embedding-3-small\" } },\n    \"vectorStore\": { \"provider\": \"qdrant\", \"config\": { \"host\": \"localhost\", \"port\": 6333 } },\n    \"llm\": { \"provider\": \"openai\", \"config\": { \"model\": \"gpt-4o\" } }\n  }\n}\n```\n\nAll `oss` fields are optional. See [Mem0 OSS docs](https://docs.mem0.ai/open-source/node-quickstart) for providers.\n\n### Open-Source with Alibaba Cloud Tablestore\n\nUse [Alibaba Cloud Tablestore](https://www.alibabacloud.com/product/table-store) as a persistent, serverless vector store. No external vector database to manage.\n\n#### Minimal configuration (auto-create Tablestore instance)\n\nIf you don't have an existing Tablestore instance, omit `endpoint` and `instanceName` — the plugin will **automatically create** a new Tablestore VCU instance in `cn-hangzhou` on first use:\n\n```json5\n\"openclaw-mem0\": {\n  \"enabled\": true,\n  \"config\": {\n    \"mode\": \"open-source\",\n    \"userId\": \"alice\",\n    \"oss\": {\n      \"vectorStore\": {\n        \"provider\": \"tablestore\",\n        \"config\": {\n          \"accessKeyId\": \"${ALIBABA_CLOUD_ACCESS_KEY_ID}\",\n          \"accessKeySecret\": \"${ALIBABA_CLOUD_ACCESS_KEY_SECRET}\"\n        }\n      }\n    }\n  }\n}\n```\n\n#### Minimal configuration (with existing Tablestore instance)\n\nIf you already have a Tablestore instance, provide `endpoint` and `instanceName`:\n\n```json5\n\"openclaw-mem0\": {\n  \"enabled\": true,\n  \"config\": {\n    \"mode\": \"open-source\",\n    \"userId\": \"alice\",\n    \"oss\": {\n      \"vectorStore\": {\n        \"provider\": \"tablestore\",\n        \"config\": {\n          \"endpoint\": \"https://your-instance.cn-hangzhou.ots.aliyuncs.com\",\n          \"instanceName\": \"your-instance-name\",\n          \"accessKeyId\": \"${ALIBABA_CLOUD_ACCESS_KEY_ID}\",\n          \"accessKeySecret\": \"${ALIBABA_CLOUD_ACCESS_KEY_SECRET}\",\n          \"tableName\": \"mem0_vectors\",       // optional, default: \"mem0_vectors\"\n          \"indexName\": \"mem0_vectors_index\",  // optional, default: \"<tableName>_index\"\n          \"dimension\": 1536                   // optional, must match your embedding model\n        }\n      }\n    }\n  }\n}\n```\n\n#### Full configuration with Alibaba Cloud Bailian (DashScope)\n\nUse Alibaba Cloud Bailian (DashScope) for both embeddings and LLM, eliminating the need for an OpenAI API key:\n\n```json5\n\"openclaw-mem0\": {\n  \"enabled\": true,\n  \"config\": {\n    \"mode\": \"open-source\",\n    \"userId\": \"alice\",\n    \"oss\": {\n      \"embedder\": {\n        \"provider\": \"openai\",\n        \"config\": {\n          \"apiKey\": \"${DASHSCOPE_API_KEY}\",\n          \"model\": \"text-embedding-v3\",\n          \"baseURL\": \"https://dashscope.aliyuncs.com/compatible-mode/v1\",\n          \"embeddingDims\": 1024\n        }\n      },\n      \"vectorStore\": {\n        \"provider\": \"tablestore\",\n        \"config\": {\n          // endpoint and instanceName are optional — omit to auto-create a new instance\n          \"endpoint\": \"https://your-instance.cn-hangzhou.ots.aliyuncs.com\",\n          \"instanceName\": \"your-instance-name\",\n          \"accessKeyId\": \"${ALIBABA_CLOUD_ACCESS_KEY_ID}\",\n          \"accessKeySecret\": \"${ALIBABA_CLOUD_ACCESS_KEY_SECRET}\",\n          \"dimension\": 1024\n        }\n      },\n      \"llm\": {\n        \"provider\": \"openai\",\n        \"config\": {\n          \"apiKey\": \"${DASHSCOPE_API_KEY}\",\n          \"model\": \"qwen-plus\",\n          \"baseURL\": \"https://dashscope.aliyuncs.com/compatible-mode/v1\"\n        }\n      }\n    }\n  }\n}\n```\n\n> **Note:** DashScope's `text-embedding-v3` model outputs 1024-dimensional vectors by default. Make sure the `dimension` in the Tablestore config matches your embedding model's output dimension.\n\nThe Tablestore provider automatically creates the data table and search index on first use. The search index includes a VECTOR field for cosine-similarity KNN search and KEYWORD fields for metadata filtering (`user_id`, `agent_id`, `run_id`, etc.).\n\n#### Building and installing the plugin\n\nSince the Tablestore provider is bundled into a custom build of `mem0ai`, you need to build the plugin from source:\n\n```bash\n# 1. Clone the repo and build the plugin tgz\ncd mem0/openclaw\nbash build-plugin.sh\n\n# 2. Install on any machine (no npm registry needed)\nopenclaw plugins install ./mem0-openclaw-mem0-0.3.0.tgz\n\n# 3. Rebuild native addons (required for better-sqlite3)\ncd ~/.openclaw/extensions/openclaw-mem0\nnpm rebuild better-sqlite3\n\n# 4. Restart the gateway to load the new plugin\nopenclaw gateway restart\n```\n\nThe build script bundles the modified `mem0ai` and the `tablestore` SDK into the plugin package, so end-users do not need to install any extra dependencies.\n\n#### Troubleshooting\n\n| Symptom | Cause | Fix |\n|---------|-------|-----|\n| `Cannot read properties of null (reading 'QueryType')` | Tablestore SDK failed to load in the runtime environment | Check that `tablestore` is in `node_modules`. Run `node -e \"console.log(require('tablestore').QueryType)\"` in the plugin directory to verify. |\n| `401 Incorrect API key provided` | Embedding requests are being sent to OpenAI instead of DashScope | Ensure `baseURL` is set in the embedder config (e.g. `\"baseURL\": \"https://dashscope.aliyuncs.com/compatible-mode/v1\"`). |\n| `Could not locate the bindings file` (better-sqlite3) | Native addon not compiled for the current platform | Run `cd ~/.openclaw/extensions/openclaw-mem0 && npm rebuild better-sqlite3`. |\n| `OTSObjectNotExist` on first use | Normal — the table/index is being created | Wait 5-10 seconds and retry. The provider auto-creates tables on first `initialize()`. |\n| Plugin not loading after install | openclaw config not updated | Ensure `openclaw.json` has `\"openclaw-mem0\"` in `plugins.allow` and `plugins.slots.memory`. Restart gateway after config changes. |\n\n## Agent tools\n\nThe agent gets five tools it can call during conversations:\n\n| Tool | Description |\n|------|-------------|\n| `memory_search` | Search memories by natural language. Optional `agentId` to scope to a specific agent. |\n| `memory_list` | List all stored memories for a user. Optional `agentId` to scope to a specific agent. |\n| `memory_store` | Explicitly save a fact. Optional `agentId` to store under a specific agent's namespace. |\n| `memory_get` | Retrieve a memory by ID |\n| `memory_forget` | Delete by ID or by query. Optional `agentId` to scope deletion to a specific agent. |\n\n## CLI\n\n```bash\n# Search all memories (long-term + session)\nopenclaw mem0 search \"what languages does the user know\"\n\n# Search only long-term memories\nopenclaw mem0 search \"what languages does the user know\" --scope long-term\n\n# Search only session/short-term memories\nopenclaw mem0 search \"what languages does the user know\" --scope session\n\n# Stats\nopenclaw mem0 stats\n\n# Search a specific agent's memories\nopenclaw mem0 search \"user preferences\" --agent researcher\n\n# Stats for a specific agent\nopenclaw mem0 stats --agent researcher\n```\n\n## Options\n\n### General\n\n| Key | Type | Default | |\n|-----|------|---------|---|\n| `mode` | `\"platform\"` \\| `\"open-source\"` | `\"platform\"` | Which backend to use |\n| `userId` | `string` | `\"default\"` | Any unique identifier you choose for the user (e.g. `\"alice\"`, `\"user_123\"`). All memories are scoped to this value. Not found in any dashboard — you define it yourself. |\n| `autoRecall` | `boolean` | `true` | Inject memories before each turn |\n| `autoCapture` | `boolean` | `true` | Store facts after each turn |\n| `topK` | `number` | `5` | Max memories per recall |\n| `searchThreshold` | `number` | `0.3` | Min similarity (0–1) |\n\n### Platform mode\n\n| Key | Type | Default | |\n|-----|------|---------|---|\n| `apiKey` | `string` | — | **Required.** Mem0 API key (supports `${MEM0_API_KEY}`) |\n| `orgId` | `string` | — | Organization ID |\n| `projectId` | `string` | — | Project ID |\n| `enableGraph` | `boolean` | `false` | Entity graph for relationships |\n| `customInstructions` | `string` | *(built-in)* | Extraction rules — what to store, how to format |\n| `customCategories` | `object` | *(12 defaults)* | Category name → description map for tagging |\n\n### Open-source mode\n\nWorks with zero extra config. The `oss` block lets you swap out any component:\n\n| Key | Type | Default | |\n|-----|------|---------|---|\n| `customPrompt` | `string` | *(built-in)* | Extraction prompt for memory processing |\n| `oss.embedder.provider` | `string` | `\"openai\"` | Embedding provider (`\"openai\"`, `\"ollama\"`, etc.) |\n| `oss.embedder.config` | `object` | — | Provider config: `apiKey`, `model`, `baseURL` |\n| `oss.vectorStore.provider` | `string` | `\"memory\"` | Vector store (`\"memory\"`, `\"qdrant\"`, `\"chroma\"`, etc.) |\n| `oss.vectorStore.config` | `object` | — | Provider config: `host`, `port`, `collectionName`, `dimension` |\n| `oss.llm.provider` | `string` | `\"openai\"` | LLM provider (`\"openai\"`, `\"anthropic\"`, `\"ollama\"`, etc.) |\n| `oss.llm.config` | `object` | — | Provider config: `apiKey`, `model`, `baseURL`, `temperature` |\n| `oss.historyDbPath` | `string` | — | SQLite path for memory edit history |\n\nEverything inside `oss` is optional — defaults use OpenAI embeddings (`text-embedding-3-small`), in-memory vector store, and OpenAI LLM. Override only what you need.\n\n### Tablestore vector store config\n\nWhen using `\"provider\": \"tablestore\"` (or `\"aliyun_tablestore\"`), the following config keys are available:\n\n| Key | Type | Default | |\n|-----|------|---------|---|\n| `endpoint` | `string` | — | Optional. Tablestore instance endpoint URL. If omitted, a new instance is auto-created. |\n| `instanceName` | `string` | — | Optional. Tablestore instance name. If omitted, a new instance is auto-created. |\n| `accessKeyId` | `string` | — | Alibaba Cloud AccessKey ID. Required unless `roleName` is set. (supports `${ALIBABA_CLOUD_ACCESS_KEY_ID}`) |\n| `accessKeySecret` | `string` | — | Alibaba Cloud AccessKey Secret. Required unless `roleName` is set. (supports `${ALIBABA_CLOUD_ACCESS_KEY_SECRET}`) |\n| `roleName` | `string` | — | ECS RAM Role name for automatic credential retrieval. When set, `accessKeyId` and `accessKeySecret` are fetched from the ECS metadata service and refreshed automatically before expiration. (supports `${TABLESTORE_ROLE_NAME}`) |\n| `stsToken` | `string` | — | Optional STS token for temporary credentials |\n| `regionId` | `string` | — | Region ID (e.g. `\"cn-hangzhou\"`). Required when auto-provisioning. (supports `${TABLESTORE_REGION_ID}`) |\n| `tableName` | `string` | `\"mem0_vectors\"` | Data table name |\n| `indexName` | `string` | `\"<tableName>_index\"` | Search index name |\n| `dimension` | `number` | `1536` | Vector dimension (must match your embedding model) |\n\n#### Authentication modes\n\nThe plugin supports two authentication modes:\n\n**1. AccessKey (static credentials)**\n\nProvide `accessKeyId` and `accessKeySecret` directly in the config or via environment variables. Suitable for development or non-ECS environments.\n\n**2. ECS RAM Role (automatic, recommended for ECS)**\n\nSet `roleName` to the name of the RAM role attached to your ECS instance. The plugin will automatically fetch temporary STS credentials from the ECS metadata service (`http://100.100.100.200/latest/meta-data/ram/security-credentials/{roleName}`), cache them, and refresh before expiration. No AccessKey needed in the config.\n\n```json5\n\"vectorStore\": {\n  \"provider\": \"tablestore\",\n  \"config\": {\n    \"roleName\": \"EcsRamRoleForTablestore\"\n    // No accessKeyId or accessKeySecret needed\n  }\n}\n```\n\nEnvironment variable: `TABLESTORE_ROLE_NAME`\n\n## License\n\nApache 2.0\n","_source_registry_name":"default"}