Package Exports
- @memtensor/memos-local-hermes-plugin
- @memtensor/memos-local-hermes-plugin/index.ts
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@memtensor/memos-local-hermes-plugin) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
MemOS โ Hermes Memory Plugin
Persistent local conversation memory for Hermes Agent. Every conversation is automatically captured, semantically indexed, and instantly recallable โ with task summarization & skill evolution, team sharing, and Memory Viewer.
Full-write | Hybrid Search | Task Summarization & Skill Evolution | Team Sharing | Memory Viewer
๐ฆ NPM ยท ๐ Documentation
Why MemOS
| 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 |
| 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 |
Features
Memory Engine
- Auto-capture โ Stores user, assistant, and tool messages after each agent turn
- Smart deduplication โ Exact content-hash skip; then Top-5 similar chunks (threshold 0.75) with LLM judge: DUPLICATE (skip), UPDATE (merge), or NEW (create)
- 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 + 2-hour idle timeout segments conversations into tasks
- 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
- 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 from real execution records
- Skill upgrading โ When similar tasks appear, existing skills are auto-upgraded
- Version management โ Full version history with changelog and upgrade type tracking
Memory Viewer
- 7 management pages โ Memories, Tasks, Skills, Analytics, Logs, Import, Settings
- Full CRUD โ Create, edit, delete, search memories
- Task browser โ Status filters, chat-bubble chunk view, structured summaries
- Skill browser โ Version history, quality scores, one-click download as ZIP
- Analytics dashboard โ Daily read/write activity, memory breakdown charts
- 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.
Quick Start
1. Install
One command installs the plugin, all dependencies, and build tools automatically.
macOS / Linux:
curl -fsSL https://raw.githubusercontent.com/MemTensor/MemOS/main/apps/memos-local-plugin/install.sh | bashAlternative โ Install via npm:
npm install -g @memtensor/memos-local-hermes-pluginEnvironment variables for install script:
Variable Default Description MEMOS_INSTALL_DIR~/.hermes/memos-pluginOverride install directory MEMOS_STATE_DIRauto Override memory DB location MEMOS_DAEMON_PORT18992Bridge daemon port MEMOS_VIEWER_PORT18901Memory Viewer port MEMOS_EMBEDDING_PROVIDERlocalEmbedding provider
2. Configure
Copy and edit the environment template:
cd ~/.hermes/memos-plugin
cp .env.example .envEdit .env with your API keys (or leave blank for local-only mode):
# Embedding โ leave blank to use local offline model (Xenova/all-MiniLM-L6-v2)
EMBEDDING_PROVIDER=openai_compatible
EMBEDDING_API_KEY=your-embedding-api-key
EMBEDDING_ENDPOINT=https://your-embedding-api.com/v1
EMBEDDING_MODEL=bge-m3
# Summarizer โ leave blank for rule-based fallback
SUMMARIZER_PROVIDER=openai_compatible
SUMMARIZER_API_KEY=your-summarizer-api-key
SUMMARIZER_ENDPOINT=https://api.openai.com/v1
SUMMARIZER_MODEL=gpt-4o-mini
SUMMARIZER_TEMPERATURE=0Embedding Provider Options
| 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 |
Summarizer Provider Options
| 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 |
3. Bridge Modes
The plugin communicates with the Hermes Agent via a JSON-RPC bridge (bridge.cts), supporting two modes:
Stdio mode (default) โ Short-lived, reads JSON-RPC from stdin, responds on stdout:
MEMOS_BRIDGE_CONFIG='...' npx tsx bridge.ctsDaemon mode โ Long-running, listens on a TCP port, also starts the Memory Viewer:
MEMOS_BRIDGE_CONFIG='...' npx tsx bridge.cts --daemon --port 18992 --viewer-port 189014. Verify Installation
After installing and starting the daemon, open the Memory Viewer at http://127.0.0.1:18901.
Adapters
The plugin includes adapters for different agent frameworks:
Hermes Adapter
Located at adapters/hermes/. Python-based adapter for direct integration with the Hermes Agent.
cd adapters/hermes
bash install.shOpenHarness Adapter
Located at adapters/openharness/. For integration via the OpenHarness framework.
cd adapters/openharness
bash install.shHow It Works
Three Intelligent Pipelines
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)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
โ "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 summaryPipeline 3: Skill Evolution (auto after task completion)
Completed task โ Rule filter (min chunks, non-trivial content)
โ Search for related existing skills
โ Related skill found? โ Evaluate upgrade โ Merge โ Version bump
โ No related skill? โ Evaluate create โ Generate SKILL.md + scripts
โ Quality score (0-10) โ Install if score โฅ 6Pipeline 4: Smart Retrieval
Query โ FTS5 + Vector dual recall โ RRF Fusion โ MMR Rerank
โ Recency Decay โ Score Filter โ Top-K
โ LLM relevance filter โ Dedup by excerpt overlap
โ Return excerpts + metadataAgent Tools
| Tool | Purpose |
|---|---|
memory_search |
Search memories with hybrid retrieval (FTS5 + vector + RRF + MMR) |
memory_get |
Get full original text of a memory chunk |
memory_timeline |
Get surrounding conversation context around a chunk |
task_summary |
Get structured summary of a completed task |
skill_get |
Get skill content by skillId or taskId |
skill_install |
Install a skill into the agent workspace |
memory_viewer |
Get the URL of the Memory Viewer web UI |
Search Parameters
| Parameter | Default | Range | Description |
|---|---|---|---|
query |
โ | โ | Natural language search query |
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 |
Memory Viewer
Open http://127.0.0.1:18901 in your browser after starting the daemon.
| Page | Features |
|---|---|
| Memories | Timeline view, pagination, filters, CRUD, semantic search |
| Tasks | Task list with status filters, chat-bubble chunk view, structured summaries |
| Skills | Skill list with version history, quality scores, ZIP download |
| Analytics | Daily write/read activity charts, memory/task/skill totals |
| Logs | Tool call log with input/output and duration |
| Import | Memory migration with real-time progress |
| Settings | Online configuration and team sharing settings |
Forgot password? Click "Forgot password?" on the login page.
Advanced Configuration
All optional โ shown with defaults:
# In .env or environment variables
# Recall tuning
RECALL_MAX_RESULTS=6 # Default search results
RECALL_MIN_SCORE=0.45 # Default min score threshold
RECALL_RRF_K=60 # RRF fusion constant
RECALL_MMR_LAMBDA=0.7 # MMR relevance vs diversity (0-1)
RECALL_RECENCY_HALF_LIFE=14 # Time decay half-life in days
# Deduplication
DEDUP_SIMILARITY_THRESHOLD=0.75 # Cosine similarity for dedup
DEDUP_ENABLE_SMART_MERGE=true # LLM judge: DUPLICATE / UPDATE / NEW
# Skill Evolution
SKILL_EVOLUTION_ENABLED=true # Enable skill evolution
SKILL_AUTO_EVALUATE=true # Auto-evaluate tasks for skill generation
SKILL_AUTO_INSTALL=false # Auto-install generated skills
# Viewer
VIEWER_PORT=18901 # Memory Viewer port
# Telemetry (opt-out)
TELEMETRY_ENABLED=true # Set false to opt-outTelemetry
MemOS collects anonymous usage analytics to help improve the plugin. 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
- 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
Set environment variable:
TELEMETRY_ENABLED=falseProject Structure
apps/memos-local-plugin/
โโโ index.ts # Plugin entry โ hooks, tool registration, lifecycle
โโโ bridge.cts # JSON-RPC bridge (stdio + daemon modes)
โโโ install.sh # One-click installer script
โโโ adapters/
โ โโโ hermes/ # Python adapter for Hermes Agent
โ โ โโโ plugin.yaml # Plugin metadata
โ โ โโโ config.py # Configuration
โ โ โโโ bridge_client.py # JSON-RPC client
โ โ โโโ daemon_manager.py# Daemon lifecycle management
โ โ โโโ install.sh # Adapter installer
โ โโโ openharness/ # OpenHarness adapter
โ โโโ plugin.json # Plugin metadata
โ โโโ scripts/ # Python bridge scripts
โ โโโ install.sh # Adapter installer
โโโ src/
โ โโโ config.ts # Configuration schema & defaults
โ โโโ types.ts # TypeScript type definitions
โ โโโ capture/ # Message capture & filtering
โ โโโ embedding/ # Embedding providers
โ โโโ ingest/ # Ingestion pipeline (chunker, dedup, tasks)
โ โโโ recall/ # Hybrid retrieval engine (FTS5 + Vector + RRF + MMR)
โ โโโ skill/ # Skill evolution pipeline
โ โโโ storage/ # SQLite database layer + vector search
โ โโโ tools/ # Tool implementations
โ โโโ viewer/ # Memory Viewer web server
โ โโโ client/ # Hub client & skill sync
โ โโโ shared/ # Shared utilities (LLM fallback chain)
โ โโโ telemetry.ts # Anonymous usage analytics
โโโ www/docs/ # Documentation pages
โโโ package.json
โโโ tsconfig.jsonDevelopment
Prerequisites
- Node.js >= 18 (
node -v) - npm >= 9 (
npm -v) - C++ build tools (for
better-sqlite3native module):- macOS:
xcode-select --install - Linux:
sudo apt install build-essential python3
- macOS:
Clone & Setup
git clone https://github.com/MemTensor/MemOS.git
cd MemOS/apps/memos-local-plugin
npm installBuild
npm run build # Compile TypeScript
npm run dev # Watch modeFrom Source
git clone https://github.com/MemTensor/MemOS.git
cd MemOS/apps/memos-local-plugin
npm install && npm run buildData Location
| File | Path |
|---|---|
| Database | ~/.hermes/memos-plugin/data/memos.db |
| Plugin code | ~/.hermes/memos-plugin/ |
| Gateway log | ~/.hermes/memos-plugin/logs/ |
Troubleshooting
better-sqlite3 native module error โ
Could not locate the bindings file:cd ~/.hermes/memos-plugin && npm rebuild better-sqlite3
If rebuild fails, install C++ build tools:
- macOS:
xcode-select --install - Linux:
sudo apt install build-essential python3
- macOS:
Viewer won't open โ The viewer starts in daemon mode only. Ensure the daemon is running:
npx tsx bridge.cts --daemon --port 18992 --viewer-port 18901
Node version โ Requires Node.js >= 18 and < 25. Check with
node -v.
License
MIT โ See LICENSE for details.