The memory system for AI coding agents. Decisions, lessons, and context that persist across sessions. mcp-name: io.github.omega-memory/omega-memory AI coding agents are stateless. Every new session starts from zero. - Context loss. Agents forget every decision, preference, and architectural choice between sessions. Developers spend 10-30 minutes per session re-explaining context that was already e
Add this skill
npx mdskills install omega-memory/omega-memoryComprehensive memory system with semantic search, auto-capture, and cross-session learning for AI agents
1# OMEGA23**The memory system for AI coding agents.** Decisions, lessons, and context that persist across sessions.45[](https://pypi.org/project/omega-memory/)6[](https://www.python.org/downloads/)7[](LICENSE)8[](https://github.com/omega-memory/omega-memory)9[](https://github.com/omega-memory/omega-memory/actions/workflows/test.yml)10[](https://omegamax.co/benchmarks)11[](https://smithery.ai/server/omegamemory/omega-memory)1213mcp-name: io.github.omega-memory/omega-memory1415## The Problem1617AI coding agents are stateless. Every new session starts from zero.1819- **Context loss.** Agents forget every decision, preference, and architectural choice between sessions. Developers spend 10-30 minutes per session re-explaining context that was already established.20- **Repeated mistakes.** Without learning from past sessions, agents make the same errors over and over. They don't remember what worked, what failed, or why a particular approach was chosen.2122OMEGA gives AI coding agents long-term memory and cross-session learning, all running locally on your machine.23242526---2728## Quick Start2930```bash31pip3 install omega-memory[server] # install from PyPI (includes MCP server)32omega setup # auto-configures Claude Code + hooks33omega doctor # verify everything works34```3536> **Important:** `omega setup` downloads the embedding model and configures your editor. Don't skip it.3738That's it. Start a new Claude Code session and say **"Remember that we always use early returns and never nest more than 2 levels."** Close the session. Open a new one and ask **"What are my code style preferences?"** OMEGA recalls it instantly.3940**Full architecture walkthrough and setup guide:** [omegamax.co/quickstart](https://omegamax.co/quickstart)4142<details>43<summary><strong>Alternative install methods</strong></summary>4445```bash46pipx install omega-memory[server] # recommended for global install (no venv needed)47pip3 install omega-memory[server] # standard (may need a venv)48python3 -m pip install omega-memory[server] # if pip3 is not available49```5051</details>5253<details>54<summary><strong>Library-only install (no MCP server)</strong></summary>5556If you only need OMEGA as a Python library for scripts, CI/CD, or automation, you can skip the MCP server entirely:5758```bash59pip3 install omega-memory # core only, no MCP server process60```6162```python63from omega import store, query, remember6465store("Always use TypeScript strict mode", "user_preference")66results = query("TypeScript preferences")67```6869This gives you the full storage and retrieval API without running an MCP server (~50 MB lighter, no background process). You won't get MCP tools in your editor, but hooks still work:7071```bash72omega setup --hooks-only # auto-capture + memory surfacing, no MCP server (~600MB RAM saved)73```7475</details>7677**Using Cursor, Windsurf, or Zed?** Install with `pip3 install omega-memory[server]`, then:7879```bash80omega setup --client cursor # writes ~/.cursor/mcp.json81omega setup --client windsurf # writes ~/.codeium/windsurf/mcp_config.json82omega setup --client zed # writes ~/.config/zed/settings.json83```8485## What Happens Next8687After `omega setup`, OMEGA works in the background. No commands to learn.8889**Auto-capture** — When you make a decision or debug an issue, OMEGA detects it and stores it automatically.9091**Auto-surface** — When you edit a file or start a session, OMEGA surfaces relevant memories from past sessions — even ones you forgot about.9293**Checkpoint & resume** — Stop mid-task, pick up in a new session exactly where you left off.9495You can also explicitly tell Claude to remember things:9697> "Remember that we use JWT tokens, not session cookies"9899But the real value is what OMEGA does without being asked.100101## Examples102103### Architectural Decisions104105> "Remember: we chose PostgreSQL over MongoDB for the orders service because we need ACID transactions for payment processing."106107Three weeks later, in a new session:108109> "I'm adding a caching layer to the orders service — what should I know?"110111OMEGA surfaces the PostgreSQL decision automatically, so Claude doesn't suggest a MongoDB-style approach.112113### Learning from Mistakes114115You spend 30 minutes debugging a Docker build failure. Claude figures it out:116117> *"The node_modules volume mount was shadowing the container's node_modules. Fixed by adding an anonymous volume."*118119OMEGA auto-captures this as a lesson. Next time anyone hits the same Docker issue, Claude already knows the fix.120121### Code Preferences122123> "Remember: always use early returns. Never nest conditionals more than 2 levels deep. Prefer `const` over `let`."124125Every future session follows these rules without being told again.126127### Task Continuity128129You're mid-refactor when you need to stop:130131> "Checkpoint this — I'm halfway through migrating the auth middleware to the new pattern."132133Next session:134135> "Resume the auth middleware task."136137Claude picks up exactly where you left off — files changed, decisions made, what's left to do.138139### Error Patterns140141Claude encounters the same `ECONNRESET` three sessions in a row. Each time OMEGA surfaces the previous fix:142143```144[error_pattern] ECONNRESET on API calls — caused by connection pool exhaustion.145Fix: set maxSockets to 50 in the http agent config.146Accessed 3 times147```148149No more re-debugging the same issue.150151## Key Features152153- **Auto-Capture & Surfacing** — Hook system automatically captures decisions and lessons, and surfaces relevant memories before edits, at session start, and during work.154155- **Persistent Memory** — Stores decisions, lessons, error patterns, and preferences with semantic search. Your agent recalls what matters without you re-explaining everything each session.156157- **Semantic Search** — bge-small-en-v1.5 embeddings + sqlite-vec for fast, accurate retrieval. Finds relevant memories even when the wording is different.158159- **Cross-Session Learning** — Lessons, preferences, and error patterns accumulate over time. Agents learn from past mistakes and build on previous decisions.160161- **Forgetting Intelligence** — Memories decay naturally over time, conflicts auto-resolve, and every deletion is audited. Preferences and error patterns are exempt from decay.162163- **Graph Relationships** — Memories are linked with typed edges (related, supersedes, contradicts). Traverse the knowledge graph to find connected context.164165- **Encryption at Rest** *(optional)* — AES-256-GCM encrypted storage with macOS Keychain integration. `pip install omega-memory[encrypt]`166167- **Plugin Architecture** — Extensible via entry points. Add custom tools and handlers through the plugin system.168169## How OMEGA Compares170171| Feature | OMEGA | MEMORY.md | Mem0 | Basic MCP Memory |172|---------|:-----:|:---------:|:----:|:----------------:|173| Persistent across sessions | Yes | Yes | Yes | Yes |174| Semantic search | Yes | No (file grep only) | Yes | Varies |175| Auto-capture (no manual effort) | Yes | No (manual edits) | Yes (cloud) | No |176| Contradiction detection | Yes | No | No | No |177| Checkpoint & resume tasks | Yes | No | No | No |178| Graph relationships | Yes | No | No | No |179| Cross-session learning | Yes | Limited | Yes | No |180| Intelligent forgetting | Yes | No (grows forever) | No | No |181| Local-only (no cloud/API keys) | Yes | Yes | No (API key required) | Yes |182| Setup complexity | `pip3 install` + `omega setup` | Zero (built-in) | API key + cloud config | Manual JSON config |183184**MEMORY.md** is Claude Code's built-in markdown file -- great for simple notes, but no search, no auto-capture, and it grows unbounded. **Mem0** offers strong semantic memory but requires cloud API keys and has no checkpoint/resume or contradiction detection. **Basic MCP memory servers** (e.g., simple key-value stores) provide persistence but lack the intelligence layer -- no semantic search, no forgetting, no graph.185186OMEGA gives you the best of all worlds: fully local, zero cloud dependencies, with intelligent features that go far beyond simple storage.187188Full comparison with methodology at [omegamax.co/compare](https://omegamax.co/compare).189190## Benchmark191192OMEGA scores **95.4% task-averaged** on [LongMemEval](https://github.com/xiaowu0162/LongMemEval) (ICLR 2025), an academic benchmark that tests long-term memory across 5 categories: information extraction, multi-session reasoning, temporal reasoning, knowledge updates, and preference tracking. Raw accuracy is 466/500 (93.2%). Task-averaged scoring (mean of per-category accuracies) is the standard methodology used by other systems on the leaderboard. This is the **#1 score on the leaderboard**.193194| System | Score | Notes |195|--------|------:|-------|196| **OMEGA** | **95.4%** | **#1** |197| Mastra | 94.87% | #2 |198| Emergence | 86.0% | — |199| Zep/Graphiti | 71.2% | Published in their paper |200201Details and methodology at [omegamax.co/benchmarks](https://omegamax.co/benchmarks).202203## Compatibility204205| Client | 12 MCP Tools | Auto-Capture Hooks | Setup Command |206|--------|:------------:|:------------------:|---------------|207| Claude Code | Yes | Yes | `omega setup` |208| Cursor | Yes | No | `omega setup --client cursor` |209| Windsurf | Yes | No | `omega setup --client windsurf` |210| Zed | Yes | No | `omega setup --client zed` |211| Any MCP Client | Yes | No | Manual config (see docs) |212213All clients get full access to all 12 core memory tools. Auto-capture hooks (automatic memory surfacing and context capture) require Claude Code.214215Requires Python 3.11+. macOS and Linux supported. Windows via WSL.216217## Remote / SSH Setup218219Claude Code's SSH support lets you run your agent on a remote server from any device. OMEGA makes that server **remember everything** across sessions and reconnections.220221```bash222# On your remote server (any Linux VPS — no GPU needed)223pip3 install omega-memory[server]224omega setup225omega doctor226```227228That's it. Every SSH session — from your laptop, phone, or tablet — now has full memory of every previous session on that server.229230**Why this matters:**231232- **Device-agnostic memory** — SSH in from any device, OMEGA's memory graph is on the server waiting for you233- **Survives disconnects** — SSH drops? Reconnect and `omega_resume_task` picks up exactly where you left off234- **Always-on accumulation** — A cloud VM running 24/7 means your memory graph grows continuously235- **Team-ready** — Multiple developers SSH to the same server? OMEGA tracks who's working on what with file claims, handoff notes, and peer messaging236237**Requirements:** Any VPS with Python 3.11+ (~337 MB RAM after first query). SQLite + CPU-only ONNX embeddings — zero external services.238239## Windows (WSL) Setup240241OMEGA runs on Windows through [WSL 2](https://learn.microsoft.com/en-us/windows/wsl/install) (Windows Subsystem for Linux). WSL 1 works but WSL 2 is recommended for better SQLite performance.242243**1. Install WSL 2 (if you don't have it)**244245```powershell246# In PowerShell (admin)247wsl --install248```249250This installs Ubuntu by default. Restart when prompted.251252**2. Install Python 3.11+ inside WSL**253254```bash255# In your WSL terminal256sudo apt update && sudo apt install -y python3 python3-pip python3-venv257python3 --version # should be 3.11+258```259260If your distro ships an older Python, use the deadsnakes PPA:261262```bash263sudo add-apt-repository ppa:deadsnakes/ppa264sudo apt update && sudo apt install -y python3.12 python3.12-venv265```266267**3. Install and set up OMEGA**268269```bash270pip3 install omega-memory[server]271omega setup272omega doctor273```274275**WSL-specific gotchas:**276277- **Use the Linux filesystem, not `/mnt/c/`.** OMEGA stores data in `~/.omega/` inside WSL. Keep your projects on the Linux side (`~/Projects/`) for best performance. Accessing files on `/mnt/c/` is significantly slower due to filesystem translation.278- **Keyring may not work out of the box.** If you use `omega-memory[encrypt]`, the keyring backend needs configuration. Install `keyrings.alt` for a file-based backend: `pip3 install keyrings.alt`. Alternatively, set the environment variable `OMEGA_ENCRYPTION_KEY` directly.279- **Claude Code runs inside WSL.** Install Claude Code in your WSL terminal, not in Windows PowerShell. Your `~/.claude/` config lives in the WSL filesystem.280- **Model cache path.** The ONNX embedding model downloads to `~/.cache/omega/models/` inside WSL (~90 MB). This is separate from any Windows-side cache.281- **Multiple WSL distros.** Each distro has its own `~/.omega/` directory. If you switch distros, your memories don't carry over. Copy `~/.omega/omega.db` to transfer them.282283<details>284<summary><strong>Architecture & Advanced Details</strong></summary>285286### Architecture287288```289 ┌─────────────────────┐290 │ Claude Code │291 │ (or any MCP host) │292 └──────────┬──────────┘293 │ stdio/MCP294 ┌──────────▼──────────┐295 │ OMEGA MCP Server │296 │ 12 memory tools │297 └──────────┬──────────┘298 │299 ┌──────────▼──────────┐300 │ omega.db (SQLite) │301 │ memories | edges | │302 │ embeddings │303 └──────────────────────┘304```305306Single database, modular handlers. Additional tools available via the plugin system.307308### MCP Tools Reference30931012 core memory tools are available as an MCP server. Full tool reference at [omegamax.co/docs](https://omegamax.co/docs).311312| Tool | What it does |313|------|-------------|314| `omega_store` | Store typed memory (decision, lesson, error, preference, summary) |315| `omega_query` | Semantic or phrase search with tag filters and contextual re-ranking |316| `omega_lessons` | Cross-session lessons ranked by access count |317| `omega_welcome` | Session briefing with recent memories and profile |318| `omega_profile` | Read or update the user profile |319| `omega_checkpoint` | Save task state for cross-session continuity |320| `omega_resume_task` | Resume a previously checkpointed task |321| `omega_similar` | Find memories similar to a given one |322| `omega_traverse` | Walk the relationship graph |323| `omega_compact` | Cluster and summarize related memories |324| `omega_consolidate` | Prune stale memories, cap summaries, clean edges |325| `omega_timeline` | Memories grouped by day |326| `omega_remind` | Set time-based reminders |327| `omega_feedback` | Rate surfaced memories (helpful, unhelpful, outdated) |328329Additional utility tools for health checks, backup/restore, stats, editing, and deletion are also available. See [omegamax.co/docs](https://omegamax.co/docs) for the full reference.330331### CLI332333| Command | Description |334|---------|-------------|335| `omega setup` | Create dirs, download model, register MCP, install hooks (`--hooks-only` to skip MCP) |336| `omega doctor` | Verify installation health |337| `omega status` | Memory count, store size, model status |338| `omega query <text>` | Search memories by semantic similarity |339| `omega store <text>` | Store a memory with a specified type |340| `omega timeline` | Show memory timeline grouped by day |341| `omega activity` | Show recent session activity overview |342| `omega stats` | Memory type distribution and health summary |343| `omega consolidate` | Deduplicate, prune, and optimize memory |344| `omega compact` | Cluster and summarize related memories |345| `omega backup` | Back up omega.db (keeps last 5) |346| `omega validate` | Validate database integrity |347| `omega logs` | Show recent hook errors |348| `omega migrate-db` | Migrate legacy JSON to SQLite |349350### Hooks351352All hooks dispatch via `fast_hook.py` → daemon UDS socket, with fail-open semantics.353354| Hook | Handlers | Purpose |355|------|----------|---------|356| SessionStart | `session_start` | Welcome briefing with recent memories |357| Stop | `session_stop` | Session summary |358| UserPromptSubmit | `auto_capture` | Auto-capture lessons/decisions |359| PostToolUse | `surface_memories` | Surface relevant memories during work |360361### Storage362363| Path | Purpose |364|------|---------|365| `~/.omega/omega.db` | SQLite database (memories, embeddings, edges) |366| `~/.omega/profile.json` | User profile |367| `~/.omega/hooks.log` | Hook error log |368| `~/.cache/omega/models/bge-small-en-v1.5-onnx/` | ONNX embedding model |369370### Search Pipeline3713721. **Vector similarity** via sqlite-vec (cosine distance, 384-dim bge-small-en-v1.5)3732. **Full-text search** via FTS5 (fast keyword matching)3743. **Type-weighted scoring** (decisions/lessons weighted 2x)3754. **Contextual re-ranking** (boosts by tag, project, and content match)3765. **Deduplication** at query time3776. **Time-decay weighting** (old unaccessed memories rank lower)378379### Memory Lifecycle380381- **Dedup**: SHA256 hash (exact) + embedding similarity 0.85+ (semantic) + Jaccard per-type382- **Evolution**: Similar content (55-95%) appends new insights to existing memories383- **TTL**: Session summaries expire after 1 day, lessons/preferences are permanent384- **Auto-relate**: Creates `related` edges (similarity >= 0.45) to top-3 similar memories385- **Compaction**: Clusters and summarizes related memories386- **Decay**: Unaccessed memories lose ranking weight over time (floor 0.35); preferences and errors exempt387- **Conflict detection**: Contradicting memories auto-detected on store; decisions auto-resolve, lessons flagged388389### Memory Footprint390391- Startup: ~31 MB RSS392- After first query (ONNX model loaded): ~337 MB RSS393- Database: ~10.5 MB for ~242 memories394395### Install from Source396397```bash398git clone https://github.com/omega-memory/omega-memory.git399cd omega-memory400pip3 install -e ".[server,dev]"401omega setup402```403404`omega setup` will:4051. Create `~/.omega/` directory4062. Download the ONNX embedding model (~90 MB) to `~/.cache/omega/models/`4073. Register `omega-memory` as an MCP server in `~/.claude.json`4084. Install session hooks in `~/.claude/settings.json`4095. Add a managed `<!-- OMEGA:BEGIN -->` block to `~/.claude/CLAUDE.md`410411All changes are idempotent — running `omega setup` again won't duplicate entries.412413</details>414415## Troubleshooting416417**`omega doctor` shows FAIL on import:**418- Ensure `pip3 install -e ".[server]"` from the repo root419- Check `python3 -c "import omega"` works420421**MCP server fails to start:**422- Run `pip3 install omega-memory[server]` (the `[server]` extra includes the MCP package)423424**MCP server not registered:**425```bash426claude mcp add omega-memory -- python3 -m omega.server.mcp_server427```428429**Hooks not firing:**430- Check `~/.claude/settings.json` has OMEGA hook entries431- Check `~/.omega/hooks.log` for errors432433## Development434435```bash436pip3 install -e ".[server,dev]"437pytest tests/438ruff check src/ # Lint439```440441## Uninstall442443```bash444claude mcp remove omega-memory445rm -rf ~/.omega ~/.cache/omega446pip3 uninstall omega-memory447```448449Manually remove OMEGA entries from `~/.claude/settings.json` and the `<!-- OMEGA:BEGIN -->` block from `~/.claude/CLAUDE.md`.450451## Star History452453[](https://star-history.com/#omega-memory/omega-memory&Date)454455## Contributing456457- [Contributing Guide](CONTRIBUTING.md)458- [Security Policy](SECURITY.md)459- [Changelog](CHANGELOG.md)460- [Report a Bug](https://github.com/omega-memory/omega-memory/issues)461462## License463464Apache-2.0 — see [LICENSE](LICENSE) for details.465
Full transparency — inspect the skill content before installing.