Local persistent memory for OpenClaw agents. Captures conversations, extracts structured facts via LLM, and auto-recalls relevant knowledge before each turn....
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install memento或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install memento⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/memento/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: memento description: Local persistent memory for OpenClaw agents. Captures conversations, extracts structured facts via LLM, and auto-recalls relevant knowledge before each turn. Privacy-first, all stored data stays local in SQLite. metadata: version: "0.6.0" author: braibaud license: MIT repository: https://github.com/braibaud/Memento openclaw: emoji: "🧠" kind: plugin requires: node: ">=18.0.0" optionalEnv: - name: ANTHROPIC_API_KEY when: "Using anthropic/* models for extraction" - name: OPENAI_API_KEY when: "Using openai/* models for extraction" - name: MISTRAL_API_KEY when: "Using mistral/* models for extraction" - name: MEMENTO_API_KEY when: "Generic fallback for any provider" - name: CLAUDE_CODE_OAUTH_TOKEN when: "OpenClaw OAuth token for model routing (auto-used when running inside OpenClaw)" - name: MEMENTO_WORKSPACE_MAIN when: "Migration only: path to agent workspace for bootstrapping" - name: MEMENTO_AGENT_PATHS when: "Deep consolidation CLI: explicit agent:path mappings" dataFiles: - path: "~/.engram/conversations.sqlite" purpose: "Main database — conversations, facts, embeddings (local only, never uploaded)" - path: "~/.engram/segments/*.jsonl" purpose: "Human-readable conversation backups (local only)" - path: "~/.engram/migration-config.json" purpose: "Optional: agent workspace paths for one-time migration bootstrap" install: - id: npm kind: node package: "@openclaw/memento" label: "Install Memento plugin (npm)" extensions: - "./src/index.ts" keywords: - memory - knowledge-base - recall - conversation - extraction - embeddings - sqlite - privacy - local - cross-agent ---
Memento gives your agents long-term memory. It captures conversations, extracts structured facts using an LLM, and auto-injects relevant knowledge before each AI turn.
All stored data stays on your machine — no cloud sync, no subscriptions. Extraction uses your configured LLM provider; use a local model (Ollama) for fully air-gapped operation.
> ⚠️ Privacy note: When autoExtract is enabled, conversation segments are sent to your configured LLM provider for fact extraction. If you use a cloud provider (Anthropic, OpenAI, Mistral), that text leaves your machine. For fully local operation, set extractionModel to ollama/ and keep Ollama running locally.
shared, private, or secret based on content, with hard overrides for sensitive categories (medical, financial, credentials)Install the plugin, restart your gateway, and Memento starts capturing automatically. Extraction is off by default — enable it explicitly when ready.
Download a local embedding model for richer recall:
mkdir -p ~/.node-llama-cpp/models
curl -L -o ~/.node-llama-cpp/models/bge-m3-Q8_0.gguf \
"https://huggingface.co/gpustack/bge-m3-GGUF/resolve/main/bge-m3-Q8_0.gguf"
All environment variables are optional — you only need the one matching your chosen LLM provider:
| Variable | When Needed | |----------|-------------| | ANTHROPIC_API_KEY | Using anthropic/* models for extraction | | OPENAI_API_KEY | Using openai/* models for extraction | | MISTRAL_API_KEY | Using mistral/* models for extraction | | MEMENTO_API_KEY | Generic fallback for any provider | | MEMENTO_WORKSPACE_MAIN | Migration only: path to agent workspace for bootstrapping |
No API key needed for ollama/* models (local inference).
Add to your openclaw.json under plugins.entries.memento.config:
{
"memento": {
"autoCapture": true,
"extractionModel": "anthropic/claude-sonnet-4-6",
"extraction": {
"autoExtract": true,
"minTurnsForExtraction": 3
},
"recall": {
"autoRecall": true,
"maxFacts": 20,
"crossAgentRecall": true,
"autoQueryPlanning": false
}
}
}
> autoExtract: true is an explicit opt-in (default: false). When enabled, conversation segments are sent to the configured extractionModel for LLM-based fact extraction. Omit or set to false to keep everything local.
> autoQueryPlanning: true is an explicit opt-in (default: false). When enabled, a fast LLM call runs before each recall search to expand the query with synonyms and identify relevant categories — improving precision at the cost of one extra LLM call per turn.
Memento stores all data locally:
| Path | Contents | |------|----------| | ~/.engram/conversations.sqlite | Main database: conversations, facts, embeddings | | ~/.engram/segments/*.jsonl | Human-readable conversation backups | | ~/.engram/migration-config.json | Optional: migration workspace paths (only for bootstrapping) |
| Feature | Data leaves machine? | Details | |---------|---------------------|---------| | autoCapture (default: true) | ❌ No | Writes to local SQLite + JSONL only | | autoExtract (default: false) | ⚠️ Yes, if cloud LLM | Sends conversation text to configured provider. Use ollama/* for local. | | autoRecall (default: true) | ❌ No | Reads from local SQLite only | | Secret facts | ❌ Never | Filtered from extraction context — never sent to any LLM | | Migration | ❌ No | Reads local workspace files, writes to local SQLite |
Migration is an optional, one-time process to seed Memento from existing agent memory/markdown files. It is user-initiated only — never runs automatically.
Migration reads only the files you explicitly list in the config. It does not scan your filesystem, read arbitrary files, or access anything outside the configured paths.
~/.engram/migration-config.json or set MEMENTO_WORKSPACE_MAIN:{
"agents": [
{
"agentId": "main",
"workspace": "/path/to/your-workspace",
"paths": ["MEMORY.md", "memory/*.md"]
}
]
}
npx tsx src/extraction/migrate.ts --all --dry-run
The dry-run prints every file path it would read — review this before proceeding.
npx tsx src/extraction/migrate.ts --all
...
安装 Memento 后,可以对 AI 说这些话来触发它
Help me get started with Memento
Explains what Memento does, walks through the setup, and runs a quick demo based on your current project
Use Memento to local persistent memory for OpenClaw agents
Invokes Memento with the right parameters and returns the result directly in the conversation
What can I do with Memento in my ai agent & automation workflow?
Lists the top use cases for Memento, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/memento/ 目录(个人级,所有项目可用),或 .claude/skills/memento/(项目级)。重启 AI 客户端后,用 /memento 主动调用,或让 AI 根据上下文自动发现并使用。
Memento 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Memento 可免费安装使用。请查阅仓库了解许可证信息。
Local persistent memory for OpenClaw agents. Captures conversations, extracts structured facts via LLM, and auto-recalls relevant knowledge before each turn....
Memento 属于「AI Agent & Automation」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my ai agent & automation tasks using Memento
Identifies repetitive steps in your workflow and sets up Memento to handle them automatically