feat: add persistent local memory plugin for OpenClaw (memos-local-openclaw)#1182
Merged
CaralHsi merged 16 commits intoMemTensor:mainfrom Mar 9, 2026
Merged
feat: add persistent local memory plugin for OpenClaw (memos-local-openclaw)#1182CaralHsi merged 16 commits intoMemTensor:mainfrom
CaralHsi merged 16 commits intoMemTensor:mainfrom
Conversation
Reorganize project structure by moving the openwork-memos-integration module under the apps/ directory for consistency. Made-with: Cursor
Move the openwork-memos-integration module to apps/ directory as part of the monorepo restructuring. Made-with: Cursor
- Extract agentId from OpenClaw events, pass owner to captureMessages, ownerFilter to search/recall/dedup across the full pipeline - Task creation now uses per-agent owner instead of hardcoded "agent:main" - Add owner filter to getActiveTask, getAllActiveTasks, getUnassignedChunks, listTasks in sqlite.ts for proper task-level isolation - Dedup (findDuplicate/findTopSimilar) now scopes to agent's own + public embeddings to prevent cross-agent deduplication - Fix cursor key to include agentId, preventing shared session cursor conflicts in multi-agent scenarios - On gateway restart, initialize cursor from last user message instead of zero to avoid re-ingesting entire session history - Add multi-agent isolation tests for task owner filtering - Bump version to 0.3.20 Made-with: Cursor
- Update root .gitignore to whitelist apps/ directory files (json, html, ts, etc.) that were previously excluded by the global *.json rule - Update memos-local-openclaw .gitignore to exclude package-lock.json, www/, docs/, ppt/, .DS_Store, and database files - Remove unnecessary www/docs symlink from tracking - Add missing package.json, tsconfig.json, openclaw.plugin.json to git - Add previously ignored config files for openwork-memos-integration Made-with: Cursor
- Remove video-thumbnail.png (4.6MB), font files (280KB), lock files (258KB), and usecase image assets from git tracking - Add .gitignore for openwork-memos-integration to prevent re-adding binary assets, lock files, and build artifacts - Add comprehensive Development Guide to memos-local-openclaw README covering prerequisites, project structure, build, test, local dev workflow, publishing, and utility scripts Made-with: Cursor
fix(memos-local-openclaw): flush ingest work before shutdown
fix(memos-local-openclaw): honor memory_search maxResults
fix(memos-local-openclaw): sanitize captured metadata and evidence
fix(memos-local-openclaw): enforce owner isolation for memory tools
…l evolution improvements - Add task/skill edit, delete, retry-skill-generation on list cards - Fix task boundary detection: per-turn LLM judgment with warm-up=1 - Fix detectAndProcess to not blindly assign all unassigned chunks - Strengthen topic judge prompt to reduce false NEW splits - Add LLM fallback chain (strongCfg → cfg → OpenClaw native model) - Add skill evolver FK constraint safety checks - Remove redundant edit/delete buttons from detail modals - Add input validation for /api/memory content field - Add /api/search minScore filter (0.64) and keyword fallback - Shared LLM call utility (src/shared/llm-call.ts) Made-with: Cursor
…stall guidance - Add Step 0: proactive C++ build tools install before plugin install - Clarify Windows users usually don't need build tools (prebuilt binaries) - Document per-turn LLM topic judge, warm-up=1, Task/Skill CRUD on cards - Add LLM fallback chain details (skillSummarizer → summarizer → OpenClaw native) - Add viewer search minScore 0.64 and keyword fallback docs - Add agent parallelism (1-8 concurrency) for import - Add shared/llm-call.ts to project structure - Link to better-sqlite3 official troubleshooting in all install sections Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Introduce MemOS (
memos-local-openclaw-plugin), a fully local OpenClaw memory plugin that gives AI agents persistent memory, intelligent task summarization, self-evolving skills, and multi-agent collaboration.Problem: OpenClaw agents have no persistent memory across sessions. Every conversation starts from scratch — the agent forgets previous interactions, repeats mistakes, and cannot learn from past experience. There is no mechanism to organize conversations into structured knowledge, distill successful executions into reusable skills, or share knowledge across multiple agents.
Solution — Four Intelligent Pipelines:
Memory Write Pipeline — Auto-captures every conversation via
agent_endhook → semantic chunking → LLM summarization → vector embedding → smart deduplication (content-hash + Top-5 vector + LLM judge: DUPLICATE/UPDATE/NEW) → SQLite + FTS5 storageTask Summarization Pipeline — Per-turn LLM topic boundary detection (warm-up: 1 user turn, 2h idle timeout) → structured summaries (Goal → Steps → Result → Key Details) → quality filtering → full CRUD from Viewer
Skill Evolution Pipeline — Rule filter → LLM evaluation → SKILL.md generation with scripts + evals → quality scoring (0-10) → auto-upgrade on similar tasks (refine/extend/fix) → version management → 3-level LLM fallback chain (skillSummarizer → summarizer → OpenClaw native model)
Smart Retrieval Pipeline — FTS5 + vector hybrid search → RRF fusion → MMR diversity reranking → recency decay → LLM relevance filter → auto-recall via
before_agent_starthookAdditional capabilities:
ownerfield + public memory + skill sharing/publishingauto_recall,memory_search,memory_get,memory_timeline,memory_write_public,task_summary,skill_get,skill_install,skill_search,skill_publish,skill_unpublish,memory_viewerRelated Issue (Required): Fixes #1181
Type of change
How Has This Been Tested?
Unit tests (
npm testinapps/memos-local-openclaw/):tests/policy.test.ts— Retrieval strategy, search filtering, evidence extractiontests/recall.test.ts— RRF fusion, recency decay correctnesstests/capture.test.ts— Message filtering, evidence block stripping, self-tool exclusiontests/storage.test.ts— SQLite CRUD, FTS5, vector storage, content hash deduptests/chunker.test.ts— Semantic chunking for code blocks, paragraphs, function bodiestests/task-processor.test.ts— Task boundary detection, skip logic, summary generationtests/multi-agent.test.ts— Multi-agent memory isolation, owner filtering, public sharingtests/integration.test.ts— End-to-end ingestion and retrieval pipelineManual testing:
openclaw plugins install .→ start gateway → verify Memory Viewer athttp://127.0.0.1:18799Checklist
Reviewer Checklist