New:Microsoft Teams Notifications Are Now Available in Socket.Learn more โ†’
Get Started

@memtensor/memos-local-openclaw-plugin

Package Overview
Dependencies
Maintainers
7
Versions
106
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@memtensor/memos-local-openclaw-plugin

MemOS Local memory plugin for OpenClaw โ€” full-write, hybrid-recall, progressive retrieval

latest
npmnpm
Version
1.0.10
Version published
Weekly downloads
53
-66.67%
Maintainers
7
Weekly downloads
ย 
Created
Source

๐Ÿง  MemOS โ€” OpenClaw Memory Plugin

npm version License: MIT Node.js >= 22 GitHub

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

Why MemOS

ProblemSolution
Agent forgets everything between sessionsPersistent memory โ€” every conversation auto-captured to local SQLite
Fragmented context, repeated mistakesTask summarization & skill evolution โ€” conversations organized into structured tasks, then distilled into reusable skills that auto-upgrade
Multi-agent teams work in isolationMulti-agent collaboration โ€” memory isolation + public memory + skill sharing enables collective evolution
No visibility into what the agent remembersMemory Viewer โ€” full visualization of all memories, tasks, and skills
Privacy concerns with cloud storage100% local โ€” zero cloud uploads, anonymous opt-out telemetry only, password-protected

Features

Memory Engine

  • Auto-capture โ€” Stores user, assistant, and tool messages after each agent turn via agent_end event (consecutive assistant messages merged into one)
  • Smart deduplication โ€” Exact content-hash skip; then Top-5 similar chunks (threshold 0.75) with LLM judge: DUPLICATE (skip), UPDATE (merge summary + append content), or NEW (create). Evolved chunks track merge history.
  • Semantic chunking โ€” Splits by code blocks, function bodies, paragraphs; never cuts mid-function
  • Hybrid retrieval โ€” FTS5 keyword + vector semantic dual-channel search with RRF fusion
  • MMR diversity โ€” Maximal Marginal Relevance reranking prevents near-duplicate results
  • Recency decay โ€” Configurable time-based decay (half-life: 14 days) biases recent memories
  • Multi-provider embedding โ€” OpenAI-compatible, Gemini, Cohere, Voyage, Mistral, or local offline (Xenova/all-MiniLM-L6-v2)

Task Summarization & Skill Evolution

  • Auto task boundary detection โ€” Per-turn LLM topic judgment (warm-up: 1 user turn) + 2-hour idle timeout segments conversations into tasks. Strongly biased toward SAME to avoid over-splitting related topics
  • Structured summaries โ€” LLM generates Goal, Key Steps, Result, Key Details for each completed task
  • Key detail preservation โ€” Code, commands, URLs, file paths, error messages retained in summaries
  • Quality filtering โ€” Tasks with too few chunks, too few turns, or trivial content are auto-skipped
  • Task status โ€” active (in progress), completed (with LLM summary), skipped (too brief, excluded from search)
  • Task/Skill CRUD โ€” Edit title/summary, delete tasks and skills, retry skill generation from task cards
  • Automatic evaluation โ€” After task completion, rule filter + LLM evaluates if the task is worth distilling into a skill
  • Skill generation โ€” Multi-step LLM pipeline creates SKILL.md + scripts + references + evals from real execution records
  • Skill upgrading โ€” When similar tasks appear, existing skills are auto-upgraded (refine / extend / fix)
  • Quality scoring โ€” 0-10 quality assessment; scores below 6 marked as draft
  • Version management โ€” Full version history with changelog, change summary, and upgrade type tracking
  • Auto-install โ€” Generated skills can be auto-installed into the workspace for immediate use
  • Dedicated model โ€” Optional separate LLM model for skill generation (e.g., Claude 4.6 for higher quality)
  • LLM fallback chain โ€” skillSummarizer โ†’ summarizer โ†’ OpenClaw native model (auto-detected from openclaw.json). If all configured models fail, the next in chain is tried automatically

Team Sharing (v4)

  • Hub-Client architecture โ€” One Hub stores shared data; clients keep private data local and query the Hub on demand. Roles can be switched dynamically with proper confirmation and cleanup
  • Hub port auto-derivation โ€” Hub port derived from gateway port (gatewayPort + 11) to avoid conflicts in multi-instance setups; automatic port retry on EADDRINUSE
  • Admin approval flow โ€” Join requests require admin approval; admins can promote, demote, and remove members (with self-removal prevention)
  • Notification system โ€” Role change notifications (promoted/demoted), resource sharing notifications (shared/unshared/removed) with localized messages, Hub shutdown alerts
  • Scoped retrieval โ€” memory_search and skill_search support local, group, and all search scopes
  • Task sharing โ€” task_share / task_unshare push or remove task memories from the team without changing local private storage
  • Skill publish/pull โ€” Skills can be published to team visibility scopes and pulled back locally as full bundles for offline reuse
  • Graceful state transitions โ€” Client-to-Hub switch triggers confirmation, pending request withdrawal, connection cleanup, and automatic restart
  • Multi-instance support โ€” Viewer port, Hub port, sessions, and databases are all isolated per instance; supports running multiple OpenClaw instances on the same machine
  • Viewer integration โ€” Full team management UI: connection state, member management, pending approvals, scoped search, task share controls, skill pull, notification feed, and setup guide

Memory Migration โ€” Reconnect ๐Ÿฆ

  • One-click import โ€” Seamlessly migrate OpenClaw's native built-in memories (SQLite + JSONL) into the MemOS intelligent memory system
  • Smart deduplication โ€” Vector similarity + LLM judgment prevents duplicate imports; similar content auto-merged
  • Resume anytime โ€” Pause and resume at any time; refreshing the page auto-restores progress; already processed items are skipped
  • Post-import processing โ€” Optionally generate task summaries and evolve skills from imported memories; serial processing within each agent, parallel across agents
  • Agent parallelism โ€” Configurable concurrency (1โ€“8) for parallel processing across agents; sessions within each agent are processed serially
  • Source tagging โ€” All migrated memories are tagged with ๐Ÿฆ, visually distinguishing them from conversation-generated memories
  • Real-time progress โ€” Live progress bar, stats (stored/skipped/merged/errors), and scrolling log via SSE

Memory Viewer

  • 7 management pages โ€” Memories, Tasks, Skills, Analytics, Logs, Import, Settings
  • Full CRUD โ€” Create, edit, delete, search memories; evolution badges and merge history on memory cards
  • Task browser โ€” Status filters, chat-bubble chunk view, structured summaries, skill generation status; edit/delete/retry-skill buttons on cards
  • Skill browser โ€” Version history, quality scores, visibility toggle, one-click download as ZIP; edit/delete/publish buttons on cards
  • Analytics dashboard โ€” Daily read/write activity, memory breakdown charts
  • Logs โ€” Tool call log (memory_search, auto_recall, memory_add, etc.) with input/output and duration; filter by tool, auto-refresh
  • Online configuration โ€” Modify embedding, summarizer, skill evolution settings via web UI
  • Security โ€” Password-protected, localhost-only (127.0.0.1), session cookies
  • i18n โ€” Chinese / English toggle
  • Themes โ€” Light / Dark mode

Privacy & Security

  • 100% on-device โ€” All data in local SQLite, no cloud uploads
  • Anonymous telemetry โ€” Enabled by default, opt-out via config. Only sends tool names, latencies, and version info. Never sends memory content, queries, or personal data. See Telemetry section.
  • Viewer security โ€” Binds to 127.0.0.1 only, password-protected with session cookies
  • Auto-recall + Skill โ€” Each turn, relevant memories are injected via before_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.

Quick Start

1. Install

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 at http://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 .

2. Configure

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.enabled to false. Otherwise OpenClaw's built-in memory search runs alongside this plugin, causing duplicate retrieval and wasted tokens.

Embedding Provider Options

Providerprovider valueExample modelNotes
OpenAI / compatibleopenai_compatiblebge-m3, text-embedding-3-smallAny OpenAI-compatible API
Geminigeminitext-embedding-004Requires apiKey
Coherecohereembed-english-v3.0Separates document/query embedding
Voyagevoyagevoyage-2
Mistralmistralmistral-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.

Summarizer Provider Options

Providerprovider valueExample model
OpenAI / compatibleopenai_compatiblegpt-4o-mini
Anthropicanthropicclaude-3-haiku-20240307
Geminigeminigemini-1.5-flash
AWS Bedrockbedrockanthropic.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.

Skill Evolution Configuration (Optional)

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.

Environment Variable Support

Use ${ENV_VAR} placeholders in config to avoid hardcoding keys:

{
  "apiKey": "${OPENAI_API_KEY}"
}

3. Start or Restart the Gateway

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.

4. Verify Installation

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 (v4)

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.

Key Capabilities

CapabilityDescription
Hub / Client architectureOne Hub stores shared data; clients keep private data local and query the Hub on demand
Hub port auto-derivationHub 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 conflictIf the derived/configured Hub port is in use (EADDRINUSE), the server automatically retries up to 3 consecutive ports
Admin approval flowNew members submit join requests; admin approves/rejects from the Viewer
Self-removal preventionAdmins cannot accidentally remove themselves from the team
Role change notificationsWhen an admin promotes/demotes a member, the affected user receives a notification
Resource notificationsShared/unshared/removed resources trigger localized notifications with resource names
Pending withdrawalClients can cancel pending join requests when switching roles or disabling sharing
Graceful role transitionsSwitching from Client to Hub (or vice versa) triggers confirmation prompts, proper cleanup of remote connections, and restart
Hub shutdown notificationWhen a Hub owner disables sharing, all connected clients receive a hub_shutdown notification
Leave teamClients can leave a team with a confirmation dialog; the Hub is notified and the client's data is cleaned up
Scoped retrievalmemory_search and skill_search support local, group, and all search scopes
Task sharingPush/remove task memories to/from the team
Skill publish/pullPublish skills to team visibility; pull team skills locally as full bundles for offline use

Quick Setup

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.

Multi-Instance Deployment

When running multiple OpenClaw instances on the same machine (e.g., personal + work):

  • Viewer port: Each instance derives its Viewer port from the gateway port, so they won't conflict
  • Hub port: Auto-derived as gatewayPort + 11 (e.g., gateway 18789 โ†’ Hub 18800, gateway 19001 โ†’ Hub 19012)
  • Session isolation: Each instance uses a separate cookie name based on its Viewer port, so multiple Viewers can be logged in simultaneously
  • Database isolation: Each instance uses its own memos.db under its respective state directory

Viewer Team Sharing Panel

The Settings โ†’ Team Sharing panel provides a complete management interface:

  • Hub mode: Team name, member count, active members, pending approvals, admin controls (approve/reject/promote/demote/remove)
  • Client mode: Connection status, team info, leave team button, notification feed
  • Setup guide cards: Always visible โ€” choose "Host a Team" or "Join a Team" with step-by-step instructions
  • Real-time notifications: Role changes, resource sharing events, Hub status changes

For the full end-user workflow, see HUB-SHARING-GUIDE.md.

5. Verify Memory is Working

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) ๆ˜ฏ็š„๏ผŒๆˆ‘ไปฌไน‹ๅ‰่ฎจ่ฎบ่ฟ‡...

How It Works

Three Intelligent Pipelines

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 โ† โ† โ† โ† โ† โ† โ† โ† โ†

Pipeline 1: Memory Write (auto on every agent turn)

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)
  • System messages are skipped; tool results from the plugin's own tools are not re-stored
  • Evidence wrapper blocks ([STORED_MEMORY]...[/STORED_MEMORY]) are stripped to prevent feedback loops
  • Content hash (SHA-256, first 16 hex chars) prevents duplicate chunk ingestion within the same session+role

Pipeline 2: Task Generation (auto after memory write)

New 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:

  • Raw memory chunks are fragmented โ€” a single conversation about "deploying Nginx" might span 20 chunks
  • Task summarization organizes these fragments into a structured record: Goal โ†’ Steps โ†’ Result โ†’ Key Details
  • When the agent searches memory, it can quickly locate the complete experience via task_summary, not just fragments
  • Task summaries preserve code, commands, URLs, configs, and error messages

Pipeline 3: Skill Evolution (auto after task completion)

Completed 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:

  • Without skills, agents rediscover solutions every time they encounter similar problems
  • Skills crystallize successful executions into reusable guides with steps, pitfall warnings, and verification checks
  • Skills auto-upgrade when new tasks bring improved approaches โ€” getting faster, more accurate, and more token-efficient
  • The evolution is automatic: task completes โ†’ evaluate โ†’ create/upgrade โ†’ install

Pipeline 4: Smart Retrieval

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)
  • RRF (Reciprocal Rank Fusion): Merges FTS5 and vector search rankings into a unified score
  • MMR (Maximal Marginal Relevance): Re-ranks to balance relevance with diversity
  • Recency Decay: Recent memories get a boost (half-life: 14 days by default)
  • LLM filter: Only memories that are genuinely useful for the query are returned; sufficiency determines whether follow-up tool tips are appended

Retrieval Strategy

  • Auto-recall (hook) โ€” On every turn, the plugin runs a memory search using the user's message and injects LLM-filtered relevant memories into the agent's context (via before_agent_start). The agent sees this as system context; the user does not.
  • When nothing is recalled โ€” If the user's message is long, vague, or no matches are found, the plugin injects a short hint telling the agent to call memory_search with a self-generated short query (e.g. key topics or a rephrased question).
  • Bundled skill โ€” The plugin installs 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.
  • Search results โ€” 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.

Agent Tools

The plugin provides local memory tools plus v4 team-sharing tools, and auto-installs the memos-memory-guide skill:

ToolPurposeWhen to Use
auto_recallAutomatically injects relevant memories into agent context each turn (via before_agent_start hook)Runs automatically โ€” no manual call needed
memory_searchSearch memories with `scope: localgroup
memory_getGet full original text of a local memory chunkWhen you need to verify exact details from a local search hit
memory_timelineSurrounding conversation around a local chunkWhen you need the exact dialogue before/after a local hit
network_memory_detailFetch full content for a team memory hitWhen a shared search hit looks relevant and you need full detail
memory_write_publicWrite a memory to the local shared public space (owner="public")When the agent discovers knowledge all local agents should access
task_summaryFull structured summary of a completed taskWhen a hit has task_id and you need the full story
task_sharePush a local task and its memories to the teamWhen a task should be searchable by your group or the whole team
task_unshareRemove a shared task from the teamWhen a task should stop being shared
skill_getGet local skill content by skillId or taskIdWhen a hit has a linked task/skill and you want the reusable guide
skill_installInstall a skill into the agent workspaceWhen the skill should be permanently available for future turns
skill_searchSearch skills with `scope: localgroup
skill_publishPublish a skill to team sharing or local public visibility, depending on scopeWhen a skill should be shared with teammates
skill_unpublishMake a previously shared skill private againWhen a skill should no longer be shared
network_skill_pullPull a team skill bundle into local storageWhen a teammate's shared skill should be usable locally/offline
network_team_infoShow current team server URL, user, role, and groupsWhen you need to inspect current team connection state
memory_viewerGet the URL of the Memory Viewer web UIWhen the user asks where to view or manage their memories

Search Parameters

ParameterDefaultRangeDescription
queryโ€”โ€”Natural language search query (keep it short and focused)
maxResults201โ€“20Maximum candidates before LLM filter
minScore0.450.35โ€“1.0Minimum relevance score
roleโ€”user / assistant / toolFilter by message role (e.g. user to find what the user said)

Viewer search uses a stricter threshold (minScore 0.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.

Memory Viewer

Open http://127.0.0.1:18799 in your browser after starting the gateway.

Pages:

PageFeatures
MemoriesTimeline view, pagination, session/role/kind/date filters, CRUD, semantic search; evolution badges and merge history on cards
TasksTask list with status filters (active/completed/skipped), chat-bubble chunk view, structured summaries, skill generation status
SkillsSkill list with status badges, version history with changelogs, quality scores, related tasks, one-click ZIP download
AnalyticsDaily write/read activity charts, memory/task/skill totals, role breakdown
LogsTool 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
SettingsOnline configuration plus Team Sharing status, current role, team/groups, and admin pending-user actions

Viewer won't open?

  • The viewer is started by the plugin when the gateway starts. It does not run at install time.
  • Ensure the gateway is running: openclaw gateway start
  • Ensure the plugin is enabled in ~/.openclaw/openclaw.json
  • Check the log: tail -30 ~/.openclaw/logs/gateway.log โ€” look for MemOS Memory Viewer

Forgot 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:.

Advanced Configuration

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)
    }
  }
}

Telemetry

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.

What is collected

  • Plugin version, OS, Node.js version, architecture
  • Tool call names and latencies (e.g. "memory_search took 120ms")
  • Aggregate counts (chunks ingested, skills installed)
  • Daily active ping

What is NEVER collected

  • Memory content, search queries, or conversation text
  • API keys, file paths, or any personally identifiable information
  • Any data stored in your local database

How to disable

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

Technical details

  • Uses Aliyun ARMS RUM for event collection
  • Each installation gets a random anonymous UUID (stored at ~/.openclaw/memos-local/.anonymous-id)
  • Events are batched and sent in the background; failures are silently ignored
  • The anonymous ID is never linked to any personal information

Upgrade

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 install requires the target directory to not exist. If you see plugin already exists, delete the directory first. Your memory data is stored separately at ~/.openclaw/memos-local/memos.db and will not be affected.

Troubleshooting

๐Ÿ“– ่ฏฆ็ป†ๆŽ’ๆŸฅๆŒ‡ๅ— / Detailed troubleshooting guide: Troubleshooting โ€” ๅŒ…ๅซ้€ๆญฅๆŽ’ๆŸฅๆต็จ‹ใ€ๆ—ฅๅฟ—ๆŸฅ็œ‹ๆ–นๆณ•ใ€ๅฎŒๅ…จ้‡่ฃ…ๆญฅ้ชค็ญ‰ใ€‚

๐Ÿ“ฆ better-sqlite3 official troubleshooting: better-sqlite3 Troubleshooting โ€” the upstream guide for native module build issues.

Common Issues

  • Note the exact error โ€” e.g. plugin not found, Cannot find module 'xxx', Invalid config.

  • Check plugin status

    openclaw plugins list
    
    • Status is error โ†’ note the error message
    • Not listed โ†’ not installed or not placed in ~/.openclaw/extensions/memos-local-openclaw-plugin
  • Check gateway logs

    tail -50 ~/.openclaw/logs/gateway.log
    

    Search for memos-local, failed to load, Error, Cannot find module.

  • Check environment

    • Node version: node -v (requires >= 22)
    • Plugin directory exists: ls ~/.openclaw/extensions/memos-local-openclaw-plugin/package.json
    • Dependencies installed: ls ~/.openclaw/extensions/memos-local-openclaw-plugin/node_modules/@sinclair/typebox If missing: cd ~/.openclaw/extensions/memos-local-openclaw-plugin && npm install --omit=dev
  • Check 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 = true
  • better-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:

    • macOS: xcode-select --install (if you see xcrun: error: invalid active developer path, run this first)
    • Linux: sudo apt install build-essential python3
    • Windows: Usually not needed โ€” better-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 true
    • Tasks have enough content (default requires >= 6 chunks)
    • LLM model is accessible (check gateway log for judgeNewTopic failed or SkillEvolver errors)
    • The LLM fallback chain will try: skillSummarizer โ†’ summarizer โ†’ OpenClaw native model. If all fail, skill generation is skipped
    • Look for SkillEvolver output in the gateway log
  • LLM 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.

Data Location

FilePath
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>/

Development Guide

This section is for contributors who want to develop, test, or modify the plugin from source.

Prerequisites

  • Node.js >= 22 (node -v)
  • npm >= 9 (npm -v)
  • C++ build tools (for better-sqlite3 native module):
    • macOS: xcode-select --install
    • Linux: sudo apt install build-essential python3
    • Windows: usually not needed (prebuilt binaries available for LTS Node.js); if build fails, install Visual Studio Build Tools
  • OpenClaw CLI installed and available in PATH (openclaw --version)

better-sqlite3 build issues? This is the most common installation problem on macOS and Linux. If npm install fails, first install the C++ build tools above, then run npm rebuild better-sqlite3. For detailed platform-specific solutions, see the official better-sqlite3 troubleshooting guide and our installation troubleshooting page.

Clone & Setup

git clone https://github.com/MemTensor/MemOS.git
cd MemOS/apps/memos-local-openclaw
npm install

npm install triggers the postinstall script which automatically rebuilds better-sqlite3 for your Node.js version.

Project Structure

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 / FilePurposeHow to generate
node_modules/npm dependenciesnpm install
dist/Compiled JavaScript outputnpm run build
package-lock.jsonDependency lock filenpm install (auto-generated)
www/Memory Viewer static site & documentation pagesStarted automatically by the plugin
ppt/Presentation files (internal use)Not needed for development
.envLocal environment variablesCopy from .env.example

Build

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).

Configure for Local Development

  • Copy the environment template:
cp .env.example .env
  • Edit .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
  • Install the plugin locally into OpenClaw:
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

Testing

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 FileCoverage
tests/policy.test.tsRetrieval strategy, search filtering, evidence extraction, instruction stripping
tests/recall.test.tsRRF fusion, recency decay correctness
tests/capture.test.tsMessage filtering, evidence block stripping, self-tool exclusion
tests/storage.test.tsSQLite CRUD, FTS5, vector storage, content hash dedup
tests/chunker.test.tsSemantic chunking for code blocks, paragraphs, function bodies
tests/task-processor.test.tsTask boundary detection, skip logic, summary generation
tests/multi-agent.test.tsMulti-agent memory isolation, owner filtering, public sharing
tests/integration.test.tsEnd-to-end ingestion and retrieval pipeline

Tests use an in-memory SQLite database โ€” no external services or API keys required.

Development Workflow

  • Make changes to files in src/ or index.ts
  • Run tests to verify: npm test
  • Build to check TypeScript compilation: npm run build
  • Test with OpenClaw locally:
    openclaw plugins install .   # re-install from local source
    openclaw gateway stop && openclaw gateway start
    tail -f ~/.openclaw/logs/gateway.log   # watch logs
    
  • Open Memory Viewer at http://127.0.0.1:18799 to verify UI changes

Publishing to npm

npm 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

Utility Scripts

ScriptCommandPurpose
Seed test datanpx tsx scripts/seed-test-data.tsPopulate local DB with sample memories, tasks, and skills
Smoke testnpx tsx scripts/smoke-test.tsQuick end-to-end verification of plugin functionality
Start viewernpx tsx scripts/start-viewer.tsStart Memory Viewer standalone (without gateway)
Refresh skillsnpx tsx scripts/refresh-skill.tsRe-evaluate and regenerate skills from existing tasks
Refresh summariesnpx tsx scripts/refresh-summaries.tsRe-generate task summaries for completed tasks
Mock skillsnpx tsx scripts/mock-skills.tsGenerate mock skill data for testing

License

MIT โ€” See LICENSE for details.

Keywords

openclaw

FAQs

Package last updated on 29 Apr 2026

Related posts