omega-memory

作者 omega-memory已验证

Persistent memory for AI coding agents

205
Stars
26
Forks
Python
语言
2026/8/23
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/omega-memory/omega-memory

快速入门

使用 omega-memory 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

OMEGA

Cross-model memory for AI agents. Local-first. Works with Claude, GPT, Gemini, Cursor, Claw Code, and any MCP client. Your agent's brain shouldn't live on someone else's server, or be locked to one provider.

Python 3.11+ PyPI License Tests


The Problem

AI coding agents are stateless. Every new session starts from zero. The "solutions" either lock you into one model provider or send your codebase context to their cloud.

  • 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.
  • 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.
  • Cloud memory = someone else's database. Services like Mem0 require API keys and send your data to their servers. When they change pricing, get acquired, or go down, your agent's accumulated intelligence disappears.
  • Vendor lock-in. Anthropic's Memory Tool only works with Claude. OpenAI's memory only works with GPT. Switch models, lose your memory.

OMEGA solves this. Memory, coordination, and learning that runs entirely on your machine. Works with every major LLM and coding agent. No cloud. No API keys. No vendor lock-in.

Quick Install

pip install omega-memory[server]    # Full install (memory + MCP server)
omega setup                         # Downloads model, registers MCP, installs hooks
omega doctor                        # Verify everything works

Claude Desktop

pip install omega-memory[server]
omega setup --client claude-desktop

This registers OMEGA as an MCP server in Claude Desktop's config. Restart Claude Desktop to activate.

Cursor, Claw Code, Windsurf, Cline, Codex

pip install omega-memory[server]
omega setup --client cursor      # or: claw-code, windsurf, cline, codex
Library-only install (no MCP server)

If you only need OMEGA as a Python library for scripts, CI/CD, or automation:

pip install omega-memory    # Core only, no MCP server process
from omega import store, query, remember

store("Always use TypeScript strict mode", "user_preference")
results = query("TypeScript preferences")

This gives you the full storage and retrieval API without running an MCP server (~50 MB lighter, no background process). Hooks still work:

omega setup --hooks-only    # Auto-capture + memory surfacing, no MCP server (~600MB RAM saved)

From Source

git clone https://github.com/omega-memory/omega.git
cd omega
pip install -e ".[server,dev]"
omega setup

omega setup will:

  1. Create ~/.omega/ directory
  2. Download the ONNX embedding model (~90 MB) to ~/.cache/omega/models/
  3. Register omega-memory as an MCP server (Claude Code auto-detected, or specify --client)
  4. Install session hooks into ~/.claude/settings.json
  5. Add an OMEGA block to ~/.claude/CLAUDE.md

60-Second Quickstart

OMEGA works through natural language — no API calls, no configuration. Just talk to Claude.

1. Tell Claude to remember something:

"Remember that the auth system uses JWT tokens, not session cookies"

Claude stores this as a permanent memory with semantic embeddings.

2. Close the session. Open a new one.

3. Ask about it:

"What did I decide about authentication?"

OMEGA surfaces the relevant memory automatically:

Found 1 relevant memory:
  [decision] "The auth system uses JWT tokens, not session cookies"
  Stored 2 days ago | accessed 3 times

That's it. Memories persist across sessions, accumulate over time, and are surfaced automatically when relevant — even if you don't explicitly ask.

Key Features

  • Memory & Learning — Stores decisions, lessons, error patterns, and preferences with semantic search. Claude recalls what matters without you re-explaining everything each session. 25 memory tools including compaction, consolidation, timeline, graph traversal, and context virtualization (checkpoint/resume).

  • Multi-Agent Coordination (omega-pro) — File and branch locking, session management, task queues with dependencies, intent broadcasting, and agent-to-agent messaging. 29 coordination tools that prevent agents from overwriting each other's work.

  • Intelligent LLM Routing (omega-pro) — Classifies tasks and routes to the optimal model. Coding → Claude Sonnet. Quick edit → Llama 8b at 1/60th the cost. 1M token context → Gemini Flash. 5 providers, 4 priority modes, sub-2ms intent classification.

  • Knowledge Base (omega-pro) — Ingest PDFs, markdown, web pages, and text files into a searchable knowledge base with semantic chunking.

  • Entity Registry (omega-pro) — Multi-entity corporate memory with relationships, hierarchies, and entity-scoped memories/profiles/documents.

  • Secure Profile (omega-pro) — AES-256 encrypted personal data storage with macOS Keychain integration.

How OMEGA Compares

FeatureOMEGAAnthropic MemoryMem0Zep
Works with any LLM/agentYesClaude onlyYesYes
Your data stays on your machineYesPartial*NoNo
No cloud dependencyYesNo (needs API)NoNo
Semantic search + knowledge graphYesNo (file CRUD)$249/moYes
Multi-agent coordinationYes (pro)Research previewNoNo
Works with Claude Code, Cursor, Claw CodeYesClaude onlyPartialNo
Free & open sourceYes (Apache 2.0)NoFreemiumFreemium

Anthropic's Memory Tool stores data client-side but requires Claude API calls for all memory operations. OMEGA runs entirely on-device, including embeddings (ONNX).

Anthropic Memory is for Anthropic. OMEGA is for everyone.

Architecture

     Claude Code  ·  Cursor  ·  Claw Code  ·  Any MCP Client
               │         │         │              │
               └─────────┴─────┬───┴──────────────┘
                               │ stdio/MCP
               ┌───────────────▼─────────────┐
               │   OMEGA MCP Server   │
               │   25 core tools      │
               └──┬──────────────────┘
                  │
         ┌────────▼──────────────┐
         │ Core Memory Engine    │
         │ (semantic search,     │
         │  embeddings, graphs)  │
         └─────┬─────────────────┘
               │
               ▼
         ┌──────────────────────────────────────┐
         │         omega.db (SQLite)             │
         │  memories | edges | embeddings        │
         └──────────────────────────────────────┘

Single database, modular handlers. Optional modules (coordination, router, entity, knowledge, profile) are available via omega-pro and register into the same server process. No separate daemons, no microservices.

MCP Tools Reference

OMEGA runs as an MCP server inside Claude Code. The core package provides 25 memory tools. omega-pro adds coordination, routing, entity, knowledge, and profile tools.

Memory (25 tools)

ToolWhat it does
omega_storeStore typed memory (decision, lesson, error, summary)
omega_querySemantic search with tag filters and contextual re-ranking
omega_welcomeSession briefing with recent memories and profile
omega_profileRead or update user profile
omega_delete_memoryDelete a specific memory by ID
omega_edit_memoryEdit the content of a memory
omega_list_preferencesList all stored user preferences
omega_healthDetailed health check with memory usage and recommendations
omega_backupExport or import memories for backup/restore
omega_lessonsCross-session lessons ranked by access count
omega_feedbackRecord feedback on a surfaced memory
omega_clear_sessionClear all memories for a specific session
omega_similarFind memories similar to a given one
omega_timelineMemories grouped by day
omega_consolidatePrune stale memories, cap summaries, clean edges
omega_traverseWalk the relationship graph
omega_compactCluster and summarize related memories
omega_checkpointSave task state for cross-session continuity
omega_resume_taskResume a previously checkpointed task
omega_remindSet a time-based reminder
omega_remind_listList active reminders
omega_remind_dismissDismiss a reminder
omega_type_statsMemory counts grouped by event type
omega_session_statsMemory counts grouped by session
omega_weekly_digestWeekly knowledge digest with stats and trends

Additional tools with omega-pro

ModuleToolsDescription
Coordination29File/branch locking, sessions, tasks, messaging, audit
Router10LLM routing, intent classification, model switching
Entity8Corporate entities, relationships, hierarchies
Knowledge5Document ingestion, semantic search, RAG
Profile3AES-256 encrypted personal data storage

CLI

CommandDescription
omega setupCreate dirs, download model, register MCP, install hooks (--hooks-only to skip MCP)
omega doctorVerify installation health
omega statusMemory count, store size, model status
omega query <text>Search memories by semantic similarity
omega store <text>Store a memory with a specified type
omega timelineShow memory timeline grouped by day
omega activityShow recent session activity overview
omega statsMemory type distribution and health summary
omega consolidateDeduplicate, prune, and optimize memory
omega compactCluster and summarize related memories
omega backupBack up omega.db (keeps last 5)
omega validateValidate database integrity
omega logsShow recent hook errors
omega migrate-dbMigrate legacy JSON to SQLite
Advanced Details

Hooks (7 processes, 11 handlers)

All hooks dispatch via fast_hook.py → daemon UDS socket, with fail-open semantics.

HookMatcherHandlersPurpose
SessionStartallsession_startWelcome briefing, session resume
Stopallsession_stopSummary
UserPromptSubmitallauto_captureAuto-capture lessons/decisions
PostToolUseEdit/Write/NotebookEditsurface_memoriesSurface relevant memories
PostToolUseBash/Readsurface_memoriesSurface relevant memories

With omega-pro, additional coordination handlers register automatically: session lifecycle, file/branch claim guards, heartbeat, and git push guards.

Storage

PathPurpose
~/.omega/omega.dbSQLite database (memories, embeddings, edges)
~/.omega/profile.jsonUser profile
~/.omega/hooks.logHook error log
~/.cache/omega/models/bge-small-en-v1.5-onnx/ONNX embedding model

Search Pipeline

  1. Vector similarity via sqlite-vec (cosine distance, 384-dim bge-small-en-v1.5)
  2. Full-text search via FTS5 (fast keyword matching)
  3. Type-weighted scoring (decisions/lessons weighted 2x)
  4. Contextual re-ranking (boosts by tag, project, and content match)
  5. Deduplication at query time

Memory Lifecycle

  • Dedup: SHA256 hash (exact) + embedding similarity 0.85+ (semantic) + Jaccard per-type
  • Evolution: Similar content (55-95%) appends new insights to existing memories
  • TTL: Session summaries expire after 1 day, lessons/preferences are permanent
  • Auto-relate: Creates related edges (similarity >= 0.45) to top-3 similar memories
  • Compaction: Clusters and summarizes related memories

Memory Footprint

  • Startup: ~31 MB RSS
  • After first query (ONNX model loaded): ~337 MB RSS
  • Database: ~10.5 MB for ~242 memories

What Gets Modified

omega setup modifies these files outside ~/.omega/:

  • ~/.claude.json — Adds omega-memory MCP server entry
  • ~/.claude/settings.json — Adds hook entries
  • ~/.claude/CLAUDE.md — Adds a managed <!-- OMEGA:BEGIN --> block

All changes are idempotent.

Troubleshooting

omega doctor shows FAIL on import:

  • Ensure pip install -e ".[server]" from the repo root
  • Check python3 -c "import omega" works

MCP server fails to start:

  • Run pip install omega-memory[server] (the [server] extra includes the MCP package)

MCP server not registered:

claude mcp add omega-memory -- python3 -m omega.server.mcp_server

Hooks not firing:

  • Check ~/.claude/settings.json has OMEGA hook entries
  • Check ~/.omega/hooks.log for errors

Development

pip install -e ".[server,dev]"
pytest tests/                # 2198+ tests
ruff check src/              # Lint

Uninstall

claude mcp remove omega-memory
rm -rf ~/.omega ~/.cache/omega
pip uninstall omega-memory

Manually remove OMEGA entries from ~/.claude/settings.json and the <!-- OMEGA:BEGIN --> block from ~/.claude/CLAUDE.md.

Contributing

License

Apache-2.0. See LICENSE.

常见问题

What is omega-memory?

omega-memory is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by omega-memory. Persistent memory for AI coding agents. It has 205 GitHub stars.

Is omega-memory safe to use?

Yes. omega-memory passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install omega-memory?

Clone the repository with "git clone https://github.com/omega-memory/omega-memory" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is omega-memory written in?

omega-memory is primarily written in Python. It is open-source under omega-memory on GitHub, so you can review or fork the full source.

Are there alternatives to omega-memory?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh omega-memory against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI 智能体
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情