openclaw-memx-memory-plugin

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

OpenClaw MemX Memory Plugin

OpenClaw MemX 记忆插件

Skill by ara.so — Hermes Skills collection.
OpenClaw MemX is a local-first long-term memory plugin that enables AI agents to maintain working memory across days, projects, and conversations. It provides stable work memory, task state tracking, relationship-aware recall, learned habits, automatic cleanup, and compact evidence injection.
ara.so开发的Skill — 属于Hermes Skills集合。
OpenClaw MemX是一款本地优先的长期记忆插件,可让AI Agent在不同天数、项目和对话中维持工作记忆。它提供稳定的工作记忆、任务状态跟踪、关联感知召回、习得习惯、自动清理以及精简的证据注入功能。

Key Capabilities

核心功能

  • Long-term memory: Remembers project decisions, user preferences, task status, and important events
  • Relationship graphs: Tracks how projects, repos, tools, people, and resources relate to each other
  • Self-learning: Notices stable patterns across repeated work (e.g., user preferences, recurring workflows)
  • Self-maintenance: Consolidates repeated evidence, replaces corrected information, cleans up old task state
  • Smart recall: Searches across facts, events, state, chunks, relationships, and patterns to inject relevant evidence
  • 长期记忆:记录项目决策、用户偏好、任务状态和重要事件
  • 关系图谱:跟踪项目、代码库、工具、人员和资源之间的关联
  • 自学习:识别重复工作中的稳定模式(例如用户偏好、重复工作流)
  • 自维护:整合重复证据、替换修正后的信息、清理旧任务状态
  • 智能召回:在事实、事件、状态、片段、关系和模式中搜索,注入相关证据

Installation

安装

Prerequisites

前置要求

  • OpenClaw 2026.3.25 or later
  • Node.js 22.14+ or Node 24
  • Python 3 (only required for local embeddings)
  • OpenClaw 2026.3.25或更高版本
  • Node.js 22.14+ 或 Node 24
  • Python 3(仅本地嵌入功能需要)

Basic Install

基础安装

bash
undefined
bash
undefined

Clone the repository

Clone the repository

Install plugin

Install plugin

openclaw plugins install .
openclaw plugins install .

Setup with local embeddings (recommended)

Setup with local embeddings (recommended)

openclaw memx setup --local-embedding
openclaw memx setup --local-embedding

Restart gateway

Restart gateway

openclaw gateway restart
openclaw gateway restart

Verify installation

Verify installation

openclaw memx doctor --deep
undefined
openclaw memx doctor --deep
undefined

Development Install with Live Edits

支持实时编辑的开发安装

bash
undefined
bash
undefined

Link plugin for development

Link plugin for development

openclaw plugins install --link .
undefined
openclaw plugins install --link .
undefined

Configuration

配置

Setup with Local Embeddings

本地嵌入配置

The recommended configuration uses local sentence-transformers for embeddings:
bash
undefined
推荐配置使用本地sentence-transformers进行嵌入:
bash
undefined

Create Python virtual environment for embeddings

Create Python virtual environment for embeddings

python3 -m venv "$HOME/.openclaw/memx/.venv" "$HOME/.openclaw/memx/.venv/bin/python" -m pip install -U pip sentence-transformers torch
python3 -m venv "$HOME/.openclaw/memx/.venv" "$HOME/.openclaw/memx/.venv/bin/python" -m pip install -U pip sentence-transformers torch

Setup MemX with local embeddings

Setup MemX with local embeddings

openclaw memx setup
--local-embedding
--embedding-python "$HOME/.openclaw/memx/.venv/bin/python"
undefined
openclaw memx setup
--local-embedding
--embedding-python "$HOME/.openclaw/memx/.venv/bin/python"
undefined

Setup with LLM Provider (DeepSeek Example)

基于LLM提供商的配置(DeepSeek示例)

bash
undefined
bash
undefined

Configure LLM provider (use environment variable for API key)

Configure LLM provider (use environment variable for API key)

export DEEPSEEK_API_KEY="your-api-key-here"
openclaw config set models.providers.deepseek '{ "api": "openai-completions", "baseUrl": "https://api.deepseek.com", "apiKey": "${DEEPSEEK_API_KEY}", "models": [ { "id": "deepseek-v4-flash", "name": "DeepSeek V4 Flash", "api": "openai-completions", "reasoning": false, "input": ["text"], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": 64000, "maxTokens": 8192 } ] }' --strict-json
export DEEPSEEK_API_KEY="your-api-key-here"
openclaw config set models.providers.deepseek '{ "api": "openai-completions", "baseUrl": "https://api.deepseek.com", "apiKey": "${DEEPSEEK_API_KEY}", "models": [ { "id": "deepseek-v4-flash", "name": "DeepSeek V4 Flash", "api": "openai-completions", "reasoning": false, "input": ["text"], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": 64000, "maxTokens": 8192 } ] }' --strict-json

Setup MemX with LLM model and local embeddings

Setup MemX with LLM model and local embeddings

openclaw memx setup
--local-embedding
--embedding-python "$HOME/.openclaw/memx/.venv/bin/python"
--llm-model deepseek/deepseek-v4-flash
openclaw gateway restart
undefined
openclaw memx setup
--local-embedding
--embedding-python "$HOME/.openclaw/memx/.venv/bin/python"
--llm-model deepseek/deepseek-v4-flash
openclaw gateway restart
undefined

Alternative Embedding Providers

其他嵌入提供商

OpenAI-compatible embeddings:
bash
export EMBEDDING_API_KEY="your-embedding-key"

openclaw memx setup \
  --embedding-provider openai-compatible \
  --embedding-model text-embedding-3-small

openclaw config set plugins.entries.memory-memx.config.embedding.baseURL https://api.openai.com/v1
openclaw config set plugins.entries.memory-memx.config.embedding.apiKey '${EMBEDDING_API_KEY}'
Ollama embeddings:
bash
openclaw memx setup \
  --embedding-provider ollama \
  --embedding-model nomic-embed-text

openclaw config set plugins.entries.memory-memx.config.embedding.ollamaBaseURL http://127.0.0.1:11434
Custom local model:
bash
python3 -m pip install --user sentence-transformers torch

openclaw memx setup \
  --embedding-provider sentence-transformers-local \
  --embedding-model BAAI/bge-m3 \
  --embedding-device auto
Disable embeddings (lexical fallback only):
bash
openclaw memx setup --embedding-provider off
兼容OpenAI的嵌入:
bash
export EMBEDDING_API_KEY="your-embedding-key"

openclaw memx setup \
  --embedding-provider openai-compatible \
  --embedding-model text-embedding-3-small

openclaw config set plugins.entries.memory-memx.config.embedding.baseURL https://api.openai.com/v1
openclaw config set plugins.entries.memory-memx.config.embedding.apiKey '${EMBEDDING_API_KEY}'
Ollama嵌入:
bash
openclaw memx setup \
  --embedding-provider ollama \
  --embedding-model nomic-embed-text

openclaw config set plugins.entries.memory-memx.config.embedding.ollamaBaseURL http://127.0.0.1:11434
自定义本地模型:
bash
python3 -m pip install --user sentence-transformers torch

openclaw memx setup \
  --embedding-provider sentence-transformers-local \
  --embedding-model BAAI/bge-m3 \
  --embedding-device auto
禁用嵌入(仅使用词汇回退):
bash
openclaw memx setup --embedding-provider off

Reindex After Configuration Changes

配置变更后重新索引

After changing embedding settings, restart the gateway and reindex existing memories:
bash
openclaw gateway restart
openclaw memx reindex
更改嵌入设置后,重启网关并重新索引现有记忆:
bash
openclaw gateway restart
openclaw memx reindex

Key Commands

核心命令

Setup and Maintenance

设置与维护

bash
undefined
bash
undefined

Initial setup with local embeddings

Initial setup with local embeddings

openclaw memx setup --local-embedding
openclaw memx setup --local-embedding

Setup with specific embedding Python runtime

Setup with specific embedding Python runtime

openclaw memx setup --local-embedding --embedding-python /path/to/.venv/bin/python
openclaw memx setup --local-embedding --embedding-python /path/to/.venv/bin/python

Setup with specific LLM model

Setup with specific LLM model

openclaw memx setup --llm-model provider/model
openclaw memx setup --llm-model provider/model

Verify installation and configuration

Verify installation and configuration

openclaw memx doctor
openclaw memx doctor

Deep verification with embedding and LLM tests

Deep verification with embedding and LLM tests

openclaw memx doctor --deep
openclaw memx doctor --deep

Reindex all memories (after embedding provider change)

Reindex all memories (after embedding provider change)

openclaw memx reindex
openclaw memx reindex

Restart gateway after configuration changes

Restart gateway after configuration changes

openclaw gateway restart
undefined
openclaw gateway restart
undefined

Memory Operations

记忆操作

MemX operates automatically through OpenClaw's memory slot system. The plugin:
  • Automatically stores relevant information from conversations
  • Recalls relevant memories when needed
  • Injects memory context into prompts
  • Maintains and consolidates memory over time
MemX通过OpenClaw的记忆插槽系统自动运行。该插件:
  • 自动存储对话中的相关信息
  • 在需要时召回相关记忆
  • 将记忆上下文注入提示词
  • 长期维护并整合记忆

Compatibility Mode

兼容模式

By default, MemX does not expose legacy
memory_search
and
memory_get
tools. To enable compatibility tools:
bash
openclaw config set plugins.entries.memory-memx.config.advanced.enableCompatibilityMemoryTools true
openclaw gateway restart
默认情况下,MemX不暴露旧版
memory_search
memory_get
工具。如需启用兼容工具:
bash
openclaw config set plugins.entries.memory-memx.config.advanced.enableCompatibilityMemoryTools true
openclaw gateway restart

What
memx setup
Configures

memx setup
命令的配置内容

The
openclaw memx setup
command writes the recommended configuration:
  1. Adds
    memory-memx
    to
    plugins.allow
  2. Sets
    plugins.slots.memory
    to
    memory-memx
    (MemX owns the memory slot)
  3. Enables
    plugins.entries.memory-memx.hooks.allowPromptInjection
    (memory injection)
  4. Enables turn scheduler and LLM semantic compiler
  5. Keeps
    advanced.enableCompatibilityMemoryTools=false
    (no legacy tools by default)
  6. Configures requested embedding provider and model
Note:
memx setup
does not delete or migrate existing
MEMORY.md
files. MemX's recall context tells the agent not to treat
MEMORY.md
or
memory/*.md
as the active memory backend unless explicitly asked.
openclaw memx setup
命令会写入推荐配置:
  1. memory-memx
    添加至
    plugins.allow
  2. plugins.slots.memory
    设置为
    memory-memx
    (MemX占用记忆插槽)
  3. 启用
    plugins.entries.memory-memx.hooks.allowPromptInjection
    (记忆注入)
  4. 启用轮次调度器和LLM语义编译器
  5. 保持
    advanced.enableCompatibilityMemoryTools=false
    (默认不启用旧版工具)
  6. 配置指定的嵌入提供商和模型
注意:
memx setup
不会删除或迁移现有
MEMORY.md
文件。MemX的召回上下文会告知Agent,除非明确要求,否则不要将
MEMORY.md
memory/*.md
视为活跃记忆后端。

Architecture Overview

架构概述

MemX maintains several types of memory:
  • Facts: Stable information about preferences, decisions, and learned patterns
  • Events: Time-stamped occurrences tied to specific contexts
  • Task State: Current status of ongoing work
  • Chunks: Segmented conversation turns for precise recall
  • Relationships: Connections between entities (projects, repos, tools, people)
  • Resources: References to files, documentation, links
All memories are tied to supporting evidence and are automatically maintained over time.
MemX维护多种类型的记忆:
  • 事实:关于偏好、决策和习得模式的稳定信息
  • 事件:与特定上下文关联的时间戳事件
  • 任务状态:进行中工作的当前状态
  • 片段:用于精准召回的分段对话轮次
  • 关系:实体(项目、代码库、工具、人员)之间的关联
  • 资源:文件、文档、链接的引用
所有记忆都关联支持证据,并会随时间自动维护。

TypeScript Integration Examples

TypeScript集成示例

Checking MemX Installation Status

检查MemX安装状态

typescript
import { execSync } from 'child_process';

function checkMemXInstallation(): boolean {
  try {
    const result = execSync('openclaw memx doctor', { encoding: 'utf-8' });
    return result.includes('MemX is ready');
  } catch (error) {
    console.error('MemX not properly installed:', error);
    return false;
  }
}
typescript
import { execSync } from 'child_process';

function checkMemXInstallation(): boolean {
  try {
    const result = execSync('openclaw memx doctor', { encoding: 'utf-8' });
    return result.includes('MemX is ready');
  } catch (error) {
    console.error('MemX not properly installed:', error);
    return false;
  }
}

Verifying Memory Configuration

验证记忆配置

typescript
import { execSync } from 'child_process';

function verifyMemXConfig(): void {
  try {
    // Check if memory slot is assigned to MemX
    const config = execSync('openclaw config get plugins.slots.memory', { encoding: 'utf-8' });
    
    if (config.trim() === 'memory-memx') {
      console.log('✓ MemX is active memory provider');
    } else {
      console.warn('⚠ MemX is not the active memory provider');
    }
  } catch (error) {
    console.error('Failed to check MemX configuration:', error);
  }
}
typescript
import { execSync } from 'child_process';

function verifyMemXConfig(): void {
  try {
    // Check if memory slot is assigned to MemX
    const config = execSync('openclaw config get plugins.slots.memory', { encoding: 'utf-8' });
    
    if (config.trim() === 'memory-memx') {
      console.log('✓ MemX is active memory provider');
    } else {
      console.warn('⚠ MemX is not the active memory provider');
    }
  } catch (error) {
    console.error('Failed to check MemX configuration:', error);
  }
}

Programmatic Setup Script

程序化设置脚本

typescript
import { execSync } from 'child_process';
import * as fs from 'fs';
import * as path from 'path';

interface MemXSetupOptions {
  embeddingProvider?: 'local' | 'openai' | 'ollama' | 'off';
  llmModel?: string;
  embeddingPython?: string;
}

function setupMemX(options: MemXSetupOptions = {}): void {
  const {
    embeddingProvider = 'local',
    llmModel,
    embeddingPython
  } = options;

  try {
    // Install Python dependencies for local embeddings
    if (embeddingProvider === 'local') {
      console.log('Installing Python dependencies...');
      const pythonBin = embeddingPython || 'python3';
      execSync(`${pythonBin} -m pip install --user sentence-transformers torch`, {
        stdio: 'inherit'
      });
    }

    // Build setup command
    let setupCmd = 'openclaw memx setup';
    
    if (embeddingProvider === 'local') {
      setupCmd += ' --local-embedding';
      if (embeddingPython) {
        setupCmd += ` --embedding-python ${embeddingPython}`;
      }
    } else if (embeddingProvider === 'off') {
      setupCmd += ' --embedding-provider off';
    }
    
    if (llmModel) {
      setupCmd += ` --llm-model ${llmModel}`;
    }

    console.log(`Running: ${setupCmd}`);
    execSync(setupCmd, { stdio: 'inherit' });

    // Restart gateway
    console.log('Restarting OpenClaw gateway...');
    execSync('openclaw gateway restart', { stdio: 'inherit' });

    // Verify installation
    console.log('Verifying installation...');
    execSync('openclaw memx doctor --deep', { stdio: 'inherit' });

    console.log('✓ MemX setup complete');
  } catch (error) {
    console.error('MemX setup failed:', error);
    throw error;
  }
}

// Usage
setupMemX({
  embeddingProvider: 'local',
  llmModel: 'deepseek/deepseek-v4-flash',
  embeddingPython: `${process.env.HOME}/.openclaw/memx/.venv/bin/python`
});
typescript
import { execSync } from 'child_process';
import * as fs from 'fs';
import * as path from 'path';

interface MemXSetupOptions {
  embeddingProvider?: 'local' | 'openai' | 'ollama' | 'off';
  llmModel?: string;
  embeddingPython?: string;
}

function setupMemX(options: MemXSetupOptions = {}): void {
  const {
    embeddingProvider = 'local',
    llmModel,
    embeddingPython
  } = options;

  try {
    // Install Python dependencies for local embeddings
    if (embeddingProvider === 'local') {
      console.log('Installing Python dependencies...');
      const pythonBin = embeddingPython || 'python3';
      execSync(`${pythonBin} -m pip install --user sentence-transformers torch`, {
        stdio: 'inherit'
      });
    }

    // Build setup command
    let setupCmd = 'openclaw memx setup';
    
    if (embeddingProvider === 'local') {
      setupCmd += ' --local-embedding';
      if (embeddingPython) {
        setupCmd += ` --embedding-python ${embeddingPython}`;
      }
    } else if (embeddingProvider === 'off') {
      setupCmd += ' --embedding-provider off';
    }
    
    if (llmModel) {
      setupCmd += ` --llm-model ${llmModel}`;
    }

    console.log(`Running: ${setupCmd}`);
    execSync(setupCmd, { stdio: 'inherit' });

    // Restart gateway
    console.log('Restarting OpenClaw gateway...');
    execSync('openclaw gateway restart', { stdio: 'inherit' });

    // Verify installation
    console.log('Verifying installation...');
    execSync('openclaw memx doctor --deep', { stdio: 'inherit' });

    console.log('✓ MemX setup complete');
  } catch (error) {
    console.error('MemX setup failed:', error);
    throw error;
  }
}

// Usage
setupMemX({
  embeddingProvider: 'local',
  llmModel: 'deepseek/deepseek-v4-flash',
  embeddingPython: `${process.env.HOME}/.openclaw/memx/.venv/bin/python`
});

Common Patterns

常见模式

Initial Setup for New OpenClaw Installation

新OpenClaw安装的初始设置

bash
undefined
bash
undefined

1. Install OpenClaw (if not already installed)

1. Install OpenClaw (if not already installed)

2. Configure an LLM provider

2. Configure an LLM provider

export LLM_API_KEY="your-api-key"
openclaw config set models.providers.yourprovider '{ "api": "openai-completions", "baseUrl": "https://api.provider.com", "apiKey": "${LLM_API_KEY}", "models": [ { "id": "model-id", "name": "Model Name", "api": "openai-completions", "reasoning": false, "input": ["text"], "cost": { "input": 0, "output": 0 }, "contextWindow": 32000, "maxTokens": 4096 } ] }' --strict-json
export LLM_API_KEY="your-api-key"
openclaw config set models.providers.yourprovider '{ "api": "openai-completions", "baseUrl": "https://api.provider.com", "apiKey": "${LLM_API_KEY}", "models": [ { "id": "model-id", "name": "Model Name", "api": "openai-completions", "reasoning": false, "input": ["text"], "cost": { "input": 0, "output": 0 }, "contextWindow": 32000, "maxTokens": 4096 } ] }' --strict-json

3. Install and setup MemX

3. Install and setup MemX

git clone https://github.com/NeoLi00/openclaw-memx.git cd openclaw-memx openclaw plugins install .
python3 -m venv "$HOME/.openclaw/memx/.venv" "$HOME/.openclaw/memx/.venv/bin/python" -m pip install -U pip sentence-transformers torch
openclaw memx setup
--local-embedding
--embedding-python "$HOME/.openclaw/memx/.venv/bin/python"
--llm-model yourprovider/model-id
openclaw gateway restart openclaw memx doctor --deep
undefined
git clone https://github.com/NeoLi00/openclaw-memx.git cd openclaw-memx openclaw plugins install .
python3 -m venv "$HOME/.openclaw/memx/.venv" "$HOME/.openclaw/memx/.venv/bin/python" -m pip install -U pip sentence-transformers torch
openclaw memx setup
--local-embedding
--embedding-python "$HOME/.openclaw/memx/.venv/bin/python"
--llm-model yourprovider/model-id
openclaw gateway restart openclaw memx doctor --deep
undefined

Switching Embedding Providers

切换嵌入提供商

bash
undefined
bash
undefined

Switch from local to OpenAI embeddings

Switch from local to OpenAI embeddings

export EMBEDDING_API_KEY="your-key"
openclaw memx setup
--embedding-provider openai-compatible
--embedding-model text-embedding-3-small
openclaw config set plugins.entries.memory-memx.config.embedding.apiKey '${EMBEDDING_API_KEY}' openclaw gateway restart openclaw memx reindex
undefined
export EMBEDDING_API_KEY="your-key"
openclaw memx setup
--embedding-provider openai-compatible
--embedding-model text-embedding-3-small
openclaw config set plugins.entries.memory-memx.config.embedding.apiKey '${EMBEDDING_API_KEY}' openclaw gateway restart openclaw memx reindex
undefined

Migrating from Legacy Memory

从旧版记忆迁移

bash
undefined
bash
undefined

1. MemX does not auto-migrate MEMORY.md

1. MemX does not auto-migrate MEMORY.md

2. Manually review and convert important content:

2. Manually review and convert important content:

- Have a conversation with the agent about the content

- Have a conversation with the agent about the content

- Important facts will be automatically stored by MemX

- Important facts will be automatically stored by MemX

3. Archive old memory files

3. Archive old memory files

mkdir -p legacy-memory mv MEMORY.md memory/*.md legacy-memory/ 2>/dev/null || true
undefined
mkdir -p legacy-memory mv MEMORY.md memory/*.md legacy-memory/ 2>/dev/null || true
undefined

Troubleshooting

故障排除

MemX Doctor Reports Issues

MemX Doctor报告问题

bash
undefined
bash
undefined

Run deep diagnostics

Run deep diagnostics

openclaw memx doctor --deep
openclaw memx doctor --deep

Common issues and fixes:

Common issues and fixes:

Issue: Memory slot not assigned to MemX

Issue: Memory slot not assigned to MemX

openclaw memx setup --local-embedding openclaw gateway restart
openclaw memx setup --local-embedding openclaw gateway restart

Issue: Embedding model not available

Issue: Embedding model not available

python3 -m pip install --user sentence-transformers torch
python3 -m pip install --user sentence-transformers torch

Issue: LLM model not configured

Issue: LLM model not configured

openclaw config set plugins.entries.memory-memx.config.advanced.llmClassifierModel provider/model openclaw gateway restart
openclaw config set plugins.entries.memory-memx.config.advanced.llmClassifierModel provider/model openclaw gateway restart

Issue: Plugin not in allow list

Issue: Plugin not in allow list

openclaw config set plugins.allow '["memory-memx"]' --json openclaw gateway restart
undefined
openclaw config set plugins.allow '["memory-memx"]' --json openclaw gateway restart
undefined

Embedding Errors

嵌入错误

bash
undefined
bash
undefined

Check Python dependencies

Check Python dependencies

python3 -c "import sentence_transformers; print(sentence_transformers.version)"
python3 -c "import sentence_transformers; print(sentence_transformers.version)"

Reinstall dependencies

Reinstall dependencies

python3 -m pip install --user --force-reinstall sentence-transformers torch
python3 -m pip install --user --force-reinstall sentence-transformers torch

Use specific Python runtime

Use specific Python runtime

openclaw memx setup --local-embedding --embedding-python /path/to/python
openclaw memx setup --local-embedding --embedding-python /path/to/python

Switch to different provider if local embeddings fail

Switch to different provider if local embeddings fail

openclaw memx setup --embedding-provider ollama --embedding-model nomic-embed-text openclaw gateway restart
undefined
openclaw memx setup --embedding-provider ollama --embedding-model nomic-embed-text openclaw gateway restart
undefined

Memory Not Being Recalled

记忆无法被召回

bash
undefined
bash
undefined

Verify memory slot ownership

Verify memory slot ownership

openclaw config get plugins.slots.memory
openclaw config get plugins.slots.memory

Should return: memory-memx

Should return: memory-memx

Verify prompt injection is enabled

Verify prompt injection is enabled

openclaw config get plugins.entries.memory-memx.hooks.allowPromptInjection
openclaw config get plugins.entries.memory-memx.hooks.allowPromptInjection

Should return: true

Should return: true

Check if memories exist

Check if memories exist

openclaw memx doctor --deep
openclaw memx doctor --deep

Look for "stored memories" count

Look for "stored memories" count

Force reindex

Force reindex

openclaw memx reindex
undefined
openclaw memx reindex
undefined

Gateway Restart Issues

网关重启问题

bash
undefined
bash
undefined

Stop and restart cleanly

Stop and restart cleanly

openclaw gateway stop sleep 2 openclaw gateway start
openclaw gateway stop sleep 2 openclaw gateway start

Check gateway logs

Check gateway logs

openclaw gateway logs
openclaw gateway logs

Verify plugin loaded

Verify plugin loaded

openclaw plugins list
openclaw plugins list

Should show memory-memx as active

Should show memory-memx as active

undefined
undefined

High Memory Usage

高内存占用

bash
undefined
bash
undefined

MemX automatically maintains memory

MemX automatically maintains memory

To manually trigger maintenance (advanced):

To manually trigger maintenance (advanced):

Contact: neoliriven@gmail.com for maintenance configuration

Contact: neoliriven@gmail.com for maintenance configuration

Check memory database size

Check memory database size

ls -lh ~/.openclaw/memory-memx/
ls -lh ~/.openclaw/memory-memx/

Typical size varies with usage

Typical size varies with usage

undefined
undefined

Best Practices

最佳实践

  1. Use local embeddings for cost efficiency and privacy (
    intfloat/multilingual-e5-small
    recommended)
  2. Run
    memx doctor --deep
    after any configuration change
  3. Always restart the gateway after
    memx setup
    or config changes
  4. Use environment variables for API keys, not hardcoded values
  5. Reindex after changing embedding providers
  6. Let MemX maintain itself — avoid manual memory file editing
  7. Archive
    MEMORY.md
    files after migration to avoid confusion
  1. 使用本地嵌入以提升成本效率和隐私性(推荐使用
    intfloat/multilingual-e5-small
  2. 配置变更后运行
    memx doctor --deep
  3. memx setup
    或配置变更后务必重启网关
  4. 使用环境变量存储API密钥,不要硬编码
  5. 切换嵌入提供商后重新索引
  6. 让MemX自动维护记忆 — 避免手动编辑记忆文件
  7. 迁移后归档
    MEMORY.md
    文件
    以避免混淆

Memory Storage Location

记忆存储位置

MemX stores memory data locally in:
~/.openclaw/memory-memx/
This includes:
  • SQLite database with memories and relationships
  • Vector embeddings index
  • Configuration snapshots
MemX将记忆数据本地存储于:
~/.openclaw/memory-memx/
包含以下内容:
  • 存储记忆和关系的SQLite数据库
  • 向量嵌入索引
  • 配置快照

Further Information

更多信息