
Company News
Socket Joins New OpenJS Program to Fund Node.js Security Work
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.
@memtensor/memos-local-openclaw-plugin
Advanced tools
MemOS Local memory plugin for OpenClaw โ full-write, hybrid-recall, progressive retrieval
Persistent local conversation memory for OpenClaw AI Agents. Every conversation is automatically captured, semantically indexed, and instantly recallable โ with task summarization & skill evolution, team sharing for memories and skills, and multi-agent collaborative memory.
Full-write | Hybrid Search | Task Summarization & Skill Evolution | Team Sharing | Memory Viewer
๐ Homepage ยท ๐ Documentation ยท ๐ฆ NPM ยท ๐ Troubleshooting
| Problem | Solution |
|---|---|
| Agent forgets everything between sessions | Persistent memory โ every conversation auto-captured to local SQLite |
| Fragmented context, repeated mistakes | Task summarization & skill evolution โ conversations organized into structured tasks, then distilled into reusable skills that auto-upgrade |
| Multi-agent teams work in isolation | Multi-agent collaboration โ memory isolation + public memory + skill sharing enables collective evolution |
| No visibility into what the agent remembers | Memory Viewer โ full visualization of all memories, tasks, and skills |
| Privacy concerns with cloud storage | 100% local โ zero cloud uploads, anonymous opt-out telemetry only, password-protected |
agent_end event (consecutive assistant messages merged into one)active (in progress), completed (with LLM summary), skipped (too brief, excluded from search)skillSummarizer โ summarizer โ OpenClaw native model (auto-detected from openclaw.json). If all configured models fail, the next in chain is tried automaticallygatewayPort + 11) to avoid conflicts in multi-instance setups; automatic port retry on EADDRINUSEmemory_search and skill_search support local, group, and all search scopestask_share / task_unshare push or remove task memories from the team without changing local private storagebefore_agent_start hook (invisible to user). When nothing is recalled (e.g. long or unclear query), the agent is prompted to call memory_search with a self-generated short query. The bundled skill memos-memory-guide documents all tools and when to use them.One command installs the plugin, all dependencies, and build tools automatically. Supports auto-upgrade to the latest version.
macOS / Linux:
curl -fsSL https://cdn.memtensor.com.cn/memos-local-openclaw/install.sh | bash
Windows (PowerShell):
powershell -c "irm https://cdn.memtensor.com.cn/memos-local-openclaw/install.ps1 | iex"
Alternative โ Install via OpenClaw CLI:
openclaw plugins install @memtensor/memos-local-openclaw-plugin
Note: The Memory Viewer starts only when the OpenClaw gateway is running. After install, configure
openclaw.json(step 2) and start the gateway (step 3); the viewer will then be available athttp://127.0.0.1:18799.Installation failed? See the Troubleshooting section, the detailed troubleshooting guide, or the official better-sqlite3 troubleshooting docs. You can also try manually rebuilding the native module:
cd ~/.openclaw/extensions/memos-local-openclaw-plugin && npm rebuild better-sqlite3
From source (development):
git clone https://github.com/MemTensor/MemOS.git
cd MemOS/apps/memos-local-openclaw
npm install && npm run build
openclaw plugins install .
Add the plugin config to ~/.openclaw/openclaw.json:
{
"agents": {
"defaults": {
// IMPORTANT: Disable OpenClaw's built-in memory to avoid conflicts
"memorySearch": {
"enabled": false
}
}
},
"plugins": {
"slots": {
"memory": "memos-local-openclaw-plugin"
},
"entries": {
"memos-local-openclaw-plugin": {
"enabled": true,
"hooks": {
// Required on OpenClaw 2026.4.24+ for automatic memory_add via agent_end
"allowConversationAccess": true
},
"config": {
"embedding": {
"provider": "openai_compatible",
"endpoint": "https://your-api-endpoint/v1",
"apiKey": "sk-โขโขโขโขโขโข",
"model": "bge-m3"
},
"summarizer": {
"provider": "openai_compatible",
"endpoint": "https://your-api-endpoint/v1",
"apiKey": "sk-โขโขโขโขโขโข",
"model": "gpt-4o-mini",
"temperature": 0
}
}
}
}
}
}
Critical: You must set
agents.defaults.memorySearch.enabledtofalse. Otherwise OpenClaw's built-in memory search runs alongside this plugin, causing duplicate retrieval and wasted tokens.
| Provider | provider value | Example model | Notes |
|---|---|---|---|
| OpenAI / compatible | openai_compatible | bge-m3, text-embedding-3-small | Any OpenAI-compatible API |
| Gemini | gemini | text-embedding-004 | Requires apiKey |
| Cohere | cohere | embed-english-v3.0 | Separates document/query embedding |
| Voyage | voyage | voyage-2 | |
| Mistral | mistral | mistral-embed | |
| Local (offline) | local | โ | Uses Xenova/all-MiniLM-L6-v2, no API needed |
No embedding config? In the current sidecar build, the plugin falls back to the local embedding model automatically. If you need deterministic team-wide behavior, configure an explicit provider.
| Provider | provider value | Example model |
|---|---|---|
| OpenAI / compatible | openai_compatible | gpt-4o-mini |
| Anthropic | anthropic | claude-3-haiku-20240307 |
| Gemini | gemini | gemini-1.5-flash |
| AWS Bedrock | bedrock | anthropic.claude-3-haiku-20240307-v1:0 |
No summarizer config? The plugin automatically falls back to the OpenClaw native model (auto-detected from
~/.openclaw/openclaw.json). If that is also unavailable, a rule-based fallback generates summaries from the first sentence + key entities. Good enough to start.
You can optionally configure a dedicated model for skill generation (for higher quality skills):
{
"config": {
"skillSummarizer": {
"provider": "anthropic",
"apiKey": "sk-ant-xxx",
"model": "claude-sonnet-4-20250514",
"temperature": 0
},
"skillEvolution": {
"enabled": true,
"autoEvaluate": true,
"autoInstall": false
}
}
}
LLM fallback chain: skillSummarizer โ summarizer โ OpenClaw native model (auto-detected from ~/.openclaw/openclaw.json). If skillSummarizer is not configured, the plugin tries the regular summarizer, then falls back to the OpenClaw native model. Each step in the chain is tried automatically if the previous one fails.
Use ${ENV_VAR} placeholders in config to avoid hardcoding keys:
{
"apiKey": "${OPENAI_API_KEY}"
}
openclaw gateway stop # if already running
openclaw gateway install # ensure LaunchAgent is installed (macOS)
openclaw gateway start
Once the gateway is up, the plugin loads and starts the Memory Viewer at http://127.0.0.1:18799.
tail -20 ~/.openclaw/logs/gateway.log
You should see:
memos-local: initialized (db: ~/.openclaw/memos-local/memos.db)
memos-local: started (embedding: openai_compatible)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MemOS Memory Viewer โ
โ โ http://127.0.0.1:18799 โ
โ Open in browser to manage memories โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Team Sharing turns multiple OpenClaw instances into a collaborative memory network. One instance serves as the Hub (team server), others connect as Clients. Private data stays local; only explicitly shared tasks, memories, and skills are visible to the team.
| Capability | Description |
|---|---|
| Hub / Client architecture | One Hub stores shared data; clients keep private data local and query the Hub on demand |
| Hub port auto-derivation | Hub port is automatically derived from the gateway port (gatewayPort + 11), avoiding port conflicts in multi-instance setups. Explicit hub.port config overrides this. |
| Port retry on conflict | If the derived/configured Hub port is in use (EADDRINUSE), the server automatically retries up to 3 consecutive ports |
| Admin approval flow | New members submit join requests; admin approves/rejects from the Viewer |
| Self-removal prevention | Admins cannot accidentally remove themselves from the team |
| Role change notifications | When an admin promotes/demotes a member, the affected user receives a notification |
| Resource notifications | Shared/unshared/removed resources trigger localized notifications with resource names |
| Pending withdrawal | Clients can cancel pending join requests when switching roles or disabling sharing |
| Graceful role transitions | Switching from Client to Hub (or vice versa) triggers confirmation prompts, proper cleanup of remote connections, and restart |
| Hub shutdown notification | When a Hub owner disables sharing, all connected clients receive a hub_shutdown notification |
| Leave team | Clients can leave a team with a confirmation dialog; the Hub is notified and the client's data is cleaned up |
| Scoped retrieval | memory_search and skill_search support local, group, and all search scopes |
| Task sharing | Push/remove task memories to/from the team |
| Skill publish/pull | Publish skills to team visibility; pull team skills locally as full bundles for offline use |
Option A โ Start a Hub (team server):
{
"config": {
"sharing": {
"enabled": true,
"role": "hub",
"hub": {
"teamName": "My Team",
"teamToken": "${MEMOS_TEAM_TOKEN}"
// port is auto-derived; set explicitly only if needed
}
}
}
}
Option B โ Join as Client:
{
"config": {
"sharing": {
"enabled": true,
"role": "client",
"client": {
"hubAddress": "192.168.1.100:18800"
}
}
}
}
You can also configure sharing entirely through the Viewer โ Settings โ Team Sharing panel โ no need to edit openclaw.json manually.
When running multiple OpenClaw instances on the same machine (e.g., personal + work):
gatewayPort + 11 (e.g., gateway 18789 โ Hub 18800, gateway 19001 โ Hub 19012)memos.db under its respective state directoryThe Settings โ Team Sharing panel provides a complete management interface:
For the full end-user workflow, see HUB-SHARING-GUIDE.md.
Step A โ Have a conversation with your OpenClaw agent about anything.
Step B โ Open the Memory Viewer at http://127.0.0.1:18799 and check that the conversation appears.
Step C โ In a new conversation, ask the agent to recall what you discussed:
You: ไฝ ่ฟ่ฎฐๅพๆไนๅ่ฎฉไฝ ๅธฎๆๅค็่ฟไปไนไบๆ
ๅ๏ผ
Agent: (calls memory_search) ๆฏ็๏ผๆไปฌไนๅ่ฎจ่ฎบ่ฟ...
MemOS Lite operates through three interconnected pipelines that form a continuous learning loop:
Conversation โ Memory Write Pipeline โ Task Generation Pipeline โ Skill Evolution Pipeline
โ
Smart Retrieval Pipeline โ โ โ โ โ โ โ โ โ
Conversation โ Capture (filter roles, strip system prompts)
โ Semantic chunking (code blocks, paragraphs, error stacks)
โ Content hash dedup โ LLM summarize each chunk
โ Vector embedding โ Store (SQLite + FTS5 + Vector)
[STORED_MEMORY]...[/STORED_MEMORY]) are stripped to prevent feedback loopsNew chunks โ Group into user-turns โ Process one turn at a time
โ Warm-up (first user turn): assign directly
โ Each subsequent user turn: LLM topic judge (context vs new message)
โ "NEW"? โ Finalize current task, create new task
โ "SAME"? โ Assign to current task
โ Time gap > 2h? โ Always split regardless of topic
โ Finalize: Chunks โฅ 4 & turns โฅ 2? โ LLM structured summary โ status = "completed"
โ Otherwise โ status = "skipped" (excluded from search)
Why Tasks matter:
task_summary, not just fragmentsCompleted task โ Rule filter (min chunks, non-trivial content)
โ Search for related existing skills
โ Related skill found (confidence โฅ 0.7)?
โ Evaluate upgrade (refine/extend/fix) โ Merge new experience โ Version bump
โ No related skill (or confidence < 0.3)?
โ Evaluate create โ Generate SKILL.md + scripts + evals
โ Quality score (0-10) โ Install if score โฅ 6
Why Skills matter:
Auto-recall (every turn): The plugin hooks before_agent_start, runs a memory search with the user's message, then uses an LLM to filter which candidates are relevant and whether they are sufficient to answer. The filtered memories are injected into the agent's system context (invisible to the user). If no memories are found or the query is long/unclear, the agent is prompted to call memory_search with a self-generated short query.
On-demand search (memory_search):
Query โ FTS5 + Vector dual recall โ RRF Fusion โ MMR Rerank
โ Recency Decay โ Score Filter โ Top-K (e.g. 20)
โ LLM relevance filter (minimum information) โ Dedup by excerpt overlap
โ Return excerpts + chunkId / task_id (no summaries)
โ sufficient=false โ suggest task_summary(taskId), skill_get(taskId), memory_timeline(chunkId)
before_agent_start). The agent sees this as system context; the user does not.memory_search with a self-generated short query (e.g. key topics or a rephrased question).memos-memory-guide into ~/.openclaw/workspace/skills/memos-memory-guide/ and ~/.openclaw/skills/memos-memory-guide/. This skill documents all memory tools, when to call them, and how to write good search queries. Add skills.load.extraDirs: ["~/.openclaw/skills"] in openclaw.json if you want the skill to appear in the OpenClaw skills dashboard.memory_search returns excerpts (original content snippets) and IDs (chunkId, task_id), not summaries. The agent uses memory_get(chunkId) for full original text, task_summary(taskId) for structured task context, memory_timeline(chunkId) for surrounding conversation, and skill_get(skillId|taskId) for reusable experience guides.The plugin provides local memory tools plus v4 team-sharing tools, and auto-installs the memos-memory-guide skill:
| Tool | Purpose | When to Use |
|---|---|---|
auto_recall | Automatically injects relevant memories into agent context each turn (via before_agent_start hook) | Runs automatically โ no manual call needed |
memory_search | Search memories with `scope: local | group |
memory_get | Get full original text of a local memory chunk | When you need to verify exact details from a local search hit |
memory_timeline | Surrounding conversation around a local chunk | When you need the exact dialogue before/after a local hit |
network_memory_detail | Fetch full content for a team memory hit | When a shared search hit looks relevant and you need full detail |
memory_write_public | Write a memory to the local shared public space (owner="public") | When the agent discovers knowledge all local agents should access |
task_summary | Full structured summary of a completed task | When a hit has task_id and you need the full story |
task_share | Push a local task and its memories to the team | When a task should be searchable by your group or the whole team |
task_unshare | Remove a shared task from the team | When a task should stop being shared |
skill_get | Get local skill content by skillId or taskId | When a hit has a linked task/skill and you want the reusable guide |
skill_install | Install a skill into the agent workspace | When the skill should be permanently available for future turns |
skill_search | Search skills with `scope: local | group |
skill_publish | Publish a skill to team sharing or local public visibility, depending on scope | When a skill should be shared with teammates |
skill_unpublish | Make a previously shared skill private again | When a skill should no longer be shared |
network_skill_pull | Pull a team skill bundle into local storage | When a teammate's shared skill should be usable locally/offline |
network_team_info | Show current team server URL, user, role, and groups | When you need to inspect current team connection state |
memory_viewer | Get the URL of the Memory Viewer web UI | When the user asks where to view or manage their memories |
| Parameter | Default | Range | Description |
|---|---|---|---|
query | โ | โ | Natural language search query (keep it short and focused) |
maxResults | 20 | 1โ20 | Maximum candidates before LLM filter |
minScore | 0.45 | 0.35โ1.0 | Minimum relevance score |
role | โ | user / assistant / tool | Filter by message role (e.g. user to find what the user said) |
Viewer search uses a stricter threshold (
minScore0.64) for vector results. When no semantic matches are found, it falls back to FTS5 keyword search and returns the top 20 keyword-based results.
Open http://127.0.0.1:18799 in your browser after starting the gateway.
Pages:
| Page | Features |
|---|---|
| Memories | Timeline view, pagination, session/role/kind/date filters, CRUD, semantic search; evolution badges and merge history on cards |
| Tasks | Task list with status filters (active/completed/skipped), chat-bubble chunk view, structured summaries, skill generation status |
| Skills | Skill list with status badges, version history with changelogs, quality scores, related tasks, one-click ZIP download |
| Analytics | Daily write/read activity charts, memory/task/skill totals, role breakdown |
| Logs | Tool call log (memory_search, auto_recall, memory_add, etc.) with input/output, duration, and tool filter; auto-refresh |
| Import | ๐ฆ OpenClaw native memory migration โ scan, one-click import with real-time SSE progress, smart dedup, pause/resume; post-processing for task & skill generation |
| Settings | Online configuration plus Team Sharing status, current role, team/groups, and admin pending-user actions |
Viewer won't open?
openclaw gateway start~/.openclaw/openclaw.jsontail -30 ~/.openclaw/logs/gateway.log โ look for MemOS Memory ViewerForgot password? Click "Forgot password?" on the login page and use the reset token:
grep "password reset token:" ~/.openclaw/logs/gateway.log 2>/dev/null | tail -1
Copy the 32-character hex string after password reset token:.
All optional โ shown with defaults:
{
"config": {
"recall": {
"maxResultsDefault": 6, // Default search results
"maxResultsMax": 20, // Max search results
"minScoreDefault": 0.45, // Default min score threshold
"minScoreFloor": 0.35, // Lowest allowed min score
"rrfK": 60, // RRF fusion constant
"mmrLambda": 0.7, // MMR relevance vs diversity (0-1)
"recencyHalfLifeDays": 14, // Time decay half-life
"vectorSearchMaxChunks": 0 // 0 = search all (default). Set 200000โ300000 only if search is slow on huge DBs
},
"dedup": {
"similarityThreshold": 0.75, // Cosine similarity for smart-dedup candidates (Top-5)
"enableSmartMerge": true, // LLM judge: DUPLICATE / UPDATE / NEW
"maxCandidates": 5 // Max similar chunks to send to LLM
},
"skillEvolution": {
"enabled": true, // Enable skill evolution
"autoEvaluate": true, // Auto-evaluate tasks for skill generation
"minChunksForEval": 6, // Min chunks for a task to be evaluated
"minConfidence": 0.7, // Min LLM confidence to create/upgrade skill
"autoInstall": false // Auto-install generated skills
},
"viewerPort": 18799, // Memory Viewer port
"telemetry": {
"enabled": true // Anonymous usage analytics (default: true, set false to opt-out)
}
}
}
MemOS Lite collects anonymous usage analytics to help us understand how the plugin is used and improve it. Telemetry is enabled by default and can be disabled at any time.
Add telemetry to your plugin config in ~/.openclaw/openclaw.json:
{
"plugins": {
"entries": {
"memos-local-openclaw-plugin": {
"enabled": true,
"config": {
"telemetry": {
"enabled": false
}
// ... other config
}
}
}
}
}
Or set the environment variable:
TELEMETRY_ENABLED=false
~/.openclaw/memos-local/.anonymous-id)openclaw plugins update memos-local-openclaw-plugin
The plugin will automatically install dependencies, clean up legacy versions, and rebuild the native SQLite module. After update, restart the gateway:
openclaw gateway stop && openclaw gateway start
Tip: To update all plugins at once:
openclaw plugins update --all
If openclaw plugins update doesn't work (plugin not in install registry), reinstall:
rm -rf ~/.openclaw/extensions/memos-local-openclaw-plugin
openclaw plugins install @memtensor/memos-local-openclaw-plugin
Note:
openclaw plugins installrequires the target directory to not exist. If you seeplugin already exists, delete the directory first. Your memory data is stored separately at~/.openclaw/memos-local/memos.dband will not be affected.
๐ ่ฏฆ็ปๆๆฅๆๅ / Detailed troubleshooting guide: Troubleshooting โ ๅ ๅซ้ๆญฅๆๆฅๆต็จใๆฅๅฟๆฅ็ๆนๆณใๅฎๅ จ้่ฃ ๆญฅ้ชค็ญใ
๐ฆ better-sqlite3 official troubleshooting: better-sqlite3 Troubleshooting โ the upstream guide for native module build issues.
Note the exact error โ e.g. plugin not found, Cannot find module 'xxx', Invalid config.
Check plugin status
openclaw plugins list
~/.openclaw/extensions/memos-local-openclaw-pluginCheck gateway logs
tail -50 ~/.openclaw/logs/gateway.log
Search for memos-local, failed to load, Error, Cannot find module.
Check environment
node -v (requires >= 22)ls ~/.openclaw/extensions/memos-local-openclaw-plugin/package.jsonls ~/.openclaw/extensions/memos-local-openclaw-plugin/node_modules/@sinclair/typebox
If missing: cd ~/.openclaw/extensions/memos-local-openclaw-plugin && npm install --omit=devCheck configuration โ Open ~/.openclaw/openclaw.json and verify:
agents.defaults.memorySearch.enabled = false (disable built-in memory)plugins.slots.memory = "memos-local-openclaw-plugin"plugins.entries.memos-local-openclaw-plugin.enabled = truebetter-sqlite3 native module error โ Could not locate the bindings file means the native SQLite addon was not compiled for your Node.js version.
cd ~/.openclaw/extensions/memos-local-openclaw-plugin
npm rebuild better-sqlite3
If rebuild fails, install C++ build tools first:
xcode-select --install (if you see xcrun: error: invalid active developer path, run this first)sudo apt install build-essential python3better-sqlite3 provides prebuilt binaries for Windows + Node.js LTS. If it still fails, install Visual Studio Build Tools (select "C++ build tools" workload)Then retry npm rebuild better-sqlite3 and restart the gateway.
Still failing? Check the official better-sqlite3 troubleshooting guide for platform-specific solutions. For non-LTS Node.js versions (e.g., v25.x), prebuilt binaries may not be available and compilation from source is required.
Memory conflict with built-in search โ If the agent calls both the built-in memory search and the plugin's memory_search, it means agents.defaults.memorySearch.enabled is not set to false.
Skills not generating โ Check:
skillEvolution.enabled is truejudgeNewTopic failed or SkillEvolver errors)skillSummarizer โ summarizer โ OpenClaw native model. If all fail, skill generation is skippedSkillEvolver output in the gateway logLLM calls failing โ All LLM-dependent features (summarization, topic detection, skill generation) use a fallback chain. If the configured model returns an error, the next model in the chain is tried automatically. Check the gateway log for messages like failed (model), trying next. If all models fail, the operation falls back to rule-based logic or is skipped.
| File | Path |
|---|---|
| Database | ~/.openclaw/memos-local/memos.db |
| Viewer auth | ~/.openclaw/memos-local/viewer-auth.json |
| Gateway log | ~/.openclaw/logs/gateway.log |
| Plugin code | ~/.openclaw/extensions/memos-local-openclaw-plugin/ |
| Memory-guide skill | ~/.openclaw/workspace/skills/memos-memory-guide/SKILL.md (and ~/.openclaw/skills/memos-memory-guide/) |
| Generated skills | ~/.openclaw/memos-local/skills-store/<skill-name>/ |
| Installed skills | ~/.openclaw/workspace/skills/<skill-name>/ |
This section is for contributors who want to develop, test, or modify the plugin from source.
node -v)npm -v)better-sqlite3 native module):
xcode-select --installsudo apt install build-essential python3openclaw --version)
better-sqlite3build issues? This is the most common installation problem on macOS and Linux. Ifnpm installfails, first install the C++ build tools above, then runnpm rebuild better-sqlite3. For detailed platform-specific solutions, see the official better-sqlite3 troubleshooting guide and our installation troubleshooting page.
git clone https://github.com/MemTensor/MemOS.git
cd MemOS/apps/memos-local-openclaw
npm install
npm installtriggers thepostinstallscript which automatically rebuildsbetter-sqlite3for your Node.js version.
apps/memos-local-openclaw/
โโโ index.ts # Plugin entry โ hooks, tool registration, lifecycle
โโโ plugin-impl.ts # OpenClaw plugin SDK implementation
โโโ src/
โ โโโ index.ts # Module re-exports
โ โโโ config.ts # Configuration schema & defaults
โ โโโ types.ts # TypeScript type definitions
โ โโโ capture/index.ts # Message capture & filtering logic
โ โโโ embedding/ # Embedding providers (OpenAI, Gemini, Cohere, etc.)
โ โโโ ingest/
โ โ โโโ chunker.ts # Semantic chunking (code blocks, paragraphs)
โ โ โโโ dedup.ts # Content-hash + vector deduplication
โ โ โโโ worker.ts # Async ingestion pipeline
โ โ โโโ task-processor.ts # Task boundary detection & summarization
โ โ โโโ providers/ # LLM providers for summarization
โ โโโ recall/
โ โ โโโ engine.ts # Hybrid retrieval engine (FTS5 + Vector)
โ โ โโโ rrf.ts # Reciprocal Rank Fusion
โ โ โโโ mmr.ts # Maximal Marginal Relevance
โ โ โโโ recency.ts # Time-decay scoring
โ โโโ shared/
โ โ โโโ llm-call.ts # LLM fallback chain utility (callLLMWithFallback, buildSkillConfigChain)
โ โโโ skill/ # Skill evolution pipeline (evaluator, generator, upgrader)
โ โโโ storage/
โ โ โโโ sqlite.ts # SQLite database layer (chunks, tasks, skills, FTS5)
โ โ โโโ vector.ts # Vector similarity search
โ โโโ tools/ # Tool implementations (memory-search, memory-get, etc.)
โ โโโ viewer/ # Memory Viewer web server & HTML templates
โ โโโ telemetry.ts # Anonymous usage analytics
โโโ tests/ # Test suite (vitest)
โโโ scripts/ # Utility scripts (seed data, smoke test, viewer)
โโโ skill/ # Bundled skill definitions (SKILL.md files)
โโโ openclaw.plugin.json # Plugin metadata for OpenClaw registry
โโโ package.json # Dependencies & scripts
โโโ tsconfig.json # TypeScript configuration
โโโ vitest.config.ts # Test runner configuration
Files NOT in the repository (generated locally, excluded via .gitignore):
| Directory / File | Purpose | How to generate |
|---|---|---|
node_modules/ | npm dependencies | npm install |
dist/ | Compiled JavaScript output | npm run build |
package-lock.json | Dependency lock file | npm install (auto-generated) |
www/ | Memory Viewer static site & documentation pages | Started automatically by the plugin |
ppt/ | Presentation files (internal use) | Not needed for development |
.env | Local environment variables | Copy from .env.example |
npm run build # Compile TypeScript โ dist/
npm run dev # Watch mode โ auto-recompile on save
The build output goes to dist/ (CommonJS modules with declarations and source maps).
cp .env.example .env
.env with your API keys (or leave blank for local-only mode):# Embedding โ leave blank to use local offline model
EMBEDDING_PROVIDER=openai_compatible
EMBEDDING_API_KEY=your-key
EMBEDDING_ENDPOINT=https://your-api.com/v1
EMBEDDING_MODEL=bge-m3
# Summarizer โ leave blank for rule-based fallback
SUMMARIZER_PROVIDER=openai_compatible
SUMMARIZER_API_KEY=your-key
SUMMARIZER_ENDPOINT=https://api.openai.com/v1
SUMMARIZER_MODEL=gpt-4o-mini
npm run build
openclaw plugins install .
Configure OpenClaw โ Add the plugin to ~/.openclaw/openclaw.json (see Configure section above).
Start the gateway:
openclaw gateway stop # stop existing
openclaw gateway start # start with new plugin
Run the full test suite:
npm test # Run all tests once
npm run test:watch # Watch mode โ re-run on file changes
Test coverage includes:
| Test File | Coverage |
|---|---|
tests/policy.test.ts | Retrieval strategy, search filtering, evidence extraction, instruction stripping |
tests/recall.test.ts | RRF fusion, recency decay correctness |
tests/capture.test.ts | Message filtering, evidence block stripping, self-tool exclusion |
tests/storage.test.ts | SQLite CRUD, FTS5, vector storage, content hash dedup |
tests/chunker.test.ts | Semantic chunking for code blocks, paragraphs, function bodies |
tests/task-processor.test.ts | Task boundary detection, skip logic, summary generation |
tests/multi-agent.test.ts | Multi-agent memory isolation, owner filtering, public sharing |
tests/integration.test.ts | End-to-end ingestion and retrieval pipeline |
Tests use an in-memory SQLite database โ no external services or API keys required.
src/ or index.tsnpm testnpm run buildopenclaw plugins install . # re-install from local source
openclaw gateway stop && openclaw gateway start
tail -f ~/.openclaw/logs/gateway.log # watch logs
http://127.0.0.1:18799 to verify UI changesnpm run build # Compile TypeScript
npm publish --access public # Publish to npm registry
After publishing, users can install with:
openclaw plugins install @memtensor/memos-local-openclaw-plugin
| Script | Command | Purpose |
|---|---|---|
| Seed test data | npx tsx scripts/seed-test-data.ts | Populate local DB with sample memories, tasks, and skills |
| Smoke test | npx tsx scripts/smoke-test.ts | Quick end-to-end verification of plugin functionality |
| Start viewer | npx tsx scripts/start-viewer.ts | Start Memory Viewer standalone (without gateway) |
| Refresh skills | npx tsx scripts/refresh-skill.ts | Re-evaluate and regenerate skills from existing tasks |
| Refresh summaries | npx tsx scripts/refresh-summaries.ts | Re-generate task summaries for completed tasks |
| Mock skills | npx tsx scripts/mock-skills.ts | Generate mock skill data for testing |
MIT โ See LICENSE for details.
FAQs
MemOS Local memory plugin for OpenClaw โ full-write, hybrid-recall, progressive retrieval
The npm package @memtensor/memos-local-openclaw-plugin receives a total of 47 weekly downloads. As such, @memtensor/memos-local-openclaw-plugin popularity was classified as not popular.
We found that @memtensor/memos-local-openclaw-plugin demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.ย It has 7 open source maintainers collaborating on the project.

Company News
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.

Research
/Security News
A malicious Firefox extension fetches its payload after installation to evade detection, steal Google session cookies, and automate account takeover.