memory-os

ClaudioDrewsMIT活跃维护

给 Hermes Agent 用的七层持久记忆系统,基于 Qdrant 向量库做结构化事实存储、自动整理 wiki 和精准上下文注入,本地运行且兼容任意 LLM 提供商。

A 7-layer memory operating system for Hermes Agent — persistent memory with Qdrant, structured facts, fabric recall, auto-curated wiki, and surgical context injection. Runs locally, any LLM provider.

暂无版本1,393star132fork同步于 2026-11-07 07:29 UTC

怎么上手

由 README 提炼,执行前请确认
curl -sSL https://raw.githubusercontent.com/ClaudioDrews/memory-os/main/setup.sh | bash
硬件要求按 README 说明

README 未说明显存要求;需本机跑 Docker(Qdrant + Redis + ARQ Worker)和 Python 3.11+,LLM 可用 OpenRouter、OpenAI、Anthropic、Ollama 或本地模型

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

给 Hermes Agent 装一套本地七层记忆系统,让它跨会话记住你的项目和决策

给 Hermes Agent 用的七层持久记忆系统,基于 Qdrant 向量库做结构化事实存储、自动整理 wiki 和精准上下文注入,本地运行且兼容任意 LLM 提供商。

核心能力

  • 七层记忆架构,从工作区文件到向量库逐层注入上下文
  • Qdrant 混合检索配四级回退,检索失败逐级降级
  • 结构化事实库带信任评分和自动反馈训练
  • LLM 自动整理 wiki 知识库并持续灌入向量库
  • Ground Truth 层明确告诉 Agent 注入的记忆可直接采信

容易踩的坑

依赖 Docker 起 Qdrant、Redis 和 ARQ Worker 三个服务,缺一不可;需先装好 Hermes Agent 和 Python 3.11+;内置 Icarus 插件是重度改过的 fork,与上游不兼容,别混用

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

0 个版本

暂无 release 数据(可能没有发版,或尚未同步)。

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Memory OS — Hermes Agent Memory Operating System

    Memory OS Banner

    Your agent finally stops forgetting.
    Permanent memory. Local memory infrastructure. API-provider agnostic. Surgically token-efficient.

    Seven memory layers. Automatic, intelligent context injection. Structured facts with trust scoring. A self-curating wiki pipeline. Semantic search across every conversation you've ever had.

    Memory OS turns Hermes Agent into a real long-term collaborator — one that remembers your projects, your decisions, your reasoning, and brings exactly the right context back at exactly the right moment. Like talking to a colleague who was there for every session.

    Memory infrastructure runs entirely on your machine. Works with any LLM provider — OpenRouter, OpenAI, Anthropic, Ollama, or local models. No memory subscription. No vendor lock-in.


    What's New in v0.2.0

    One-command install. curl -sSL https://raw.githubusercontent.com/ClaudioDrews/memory-os/main/setup.sh | bash sets up the entire stack — Docker services, SQLite databases, Icarus plugin, environment — in one shot. The 10-step manual guide is now a fallback for troubleshooting.

    Community infrastructure. Issue templates (bug report + feature request), PR checklist, and contributing guide. Project is ready for external contributors — and already has them.

    20+ fixes from systematic audit. Community-driven review across setup, configuration, performance, and resilience. Highlights: provider-agnostic LLM extraction, O(1) path lookups, FTS5-powered session search, semantic dedup at scale, and idempotent database initialization.

    Installation verified on real hardware. Smoke tests and ingestion tests ship with the repo. The automated installer has been tested end-to-end — including on modest machines where Docker build times exposed UX gaps that are now handled gracefully.


    The problem every serious Hermes user knows

    You spend hours configuring the agent, teaching it your preferences, solving hard problems together — and in the next session it acts like it's meeting you for the first time.

    • Repeating context at the start of every conversation
    • Losing the thread of important decisions made weeks ago
    • Structured facts — your stack, your projects, your patterns — with nowhere to live
    • Every memory solution you've tried is either cloud-locked or too shallow to matter

    After months of hitting these walls in production, I built something that actually works.


    What Memory OS is

    Not just another plugin. A complete memory operating system — 7 layers working in concert, from flat files to a vector database, with surgical context injection, a knowledge pipeline that organizes itself, and an explicit Ground Truth hierarchy that tells the agent to actually use the injected memory.

    Designed and refined by someone who ran headfirst into every limitation of stock Hermes and every existing memory solution.

    Requirements: Hermes Agent + Docker (Qdrant + Redis + ARQ Worker) + Python 3.11+.
    Compatible with any LLM provider Hermes supports — OpenRouter, OpenAI, Anthropic, Ollama, and more.


    Architecture: 7 memory layers

    ┌──────────────────────────────────────────────────────────────────┐
    │  LAYER 1 · WORKSPACE                                              │
    │  MEMORY.md · USER.md · CREATIVE.md                               │
    │  → Injected into the system prompt every single turn             │
    ├──────────────────────────────────────────────────────────────────┤
    │  LAYER 2 · SESSIONS                                               │
    │  state.db (SQLite + FTS5)                                         │
    │  → Full-text search across your entire conversation history       │
    ├──────────────────────────────────────────────────────────────────┤
    │  LAYER 3 · STRUCTURED FACTS                                       │
    │  memory_store.db (SQLite + HRR + FTS5 + trust scoring)            │
    │  → Durable facts with entity resolution and an automatic          │
    │    feedback loop that trains trust scores over time               │
    ├──────────────────────────────────────────────────────────────────┤
    │  LAYER 4 · FABRIC (CROSS-SESSION)                                 │
    │  Icarus Plugin (heavily forked)                                   │
    │  → LLM-powered session extraction + multi-source injection        │
    │  → 16 tools: fabric_recall, fabric_write, fabric_brief, etc.      │
    ├──────────────────────────────────────────────────────────────────┤
    │  LAYER 5 · VECTOR DATABASE                                        │
    │  Qdrant (4096d Cosine + BM25 sparse)                              │
    │  → 4-level fallback: hybrid → dense → lexical → SQLite            │
    │  → Weekly decay scanner + semantic dedup (cosine >0.92 → merge)  │
    ├──────────────────────────────────────────────────────────────────┤
    │  LAYER 6 · LLM WIKI                                               │
    │  Auto-curated vault: concepts/ · entities/ · comparisons/         │
    │  → Continuously ingested into Qdrant via wiki-continuous-ingest   │
    ├──────────────────────────────────────────────────────────────────┤
    │  ⚡ LAYER 7 · GROUND TRUTH HIERARCHY (identity layer)              │
    │  SOUL.md · rulebook.md                                             │
    │  → Tells the agent that injected memory is authoritative           │
    │  → Without this, layers 2-6 deliver context the agent ignores     │
    └──────────────────────────────────────────────────────────────────┘
    

    How it flows:

    pre_llm_call → surgical recall from all four sources (Fabric + Qdrant + Sessions + Facts)

    But recall is not enough. The agent must be explicitly instructed to treat this injected context as authoritative. That's what Layer 7 provides — without it, the agent rediscovers knowledge that's already in the prompt.

    post_llm_call + on_session_end → automatic learning extraction and capture

    Each source is gated by relevance thresholds. Per-session deduplication prevents the same context from appearing twice. A social-closer filter skips trivial messages entirely. No padding. No firehose. The LLM gets exactly what it needs — nothing more.


    Why Layer 7 is the most important layer

    Layers 1-6 ensure memory is captured, stored, and injected. Layer 7 ensures the injected memory is used.

    Without the Ground Truth hierarchy:

    • Qdrant points are injected but the agent calls the Qdrant API to verify them
    • Fabric entries are injected but the agent runs fabric_recall to re-find them
    • Session history is injected but the agent runs session_search to re-discover it
    • Facts are injected but the agent probes fact_store to confirm them

    The result: memory-zero behavior despite perfect injection. Every rediscovery burns tokens, context, and time.

    → Read Layer 7: Ground Truth Hierarchy — the critical fix.


    Memory OS vs. stock Hermes

    AspectStock HermesMemory OS
    Workspace memoryMEMORY.md + USER.md+ CREATIVE.md + intelligent injection
    Session memoryBasic state.db+ FTS5 full-text search + session injection
    Structured factsNot presentFact store + trust scoring + feedback loop
    Cross-session recallLimitedFabric fork + multi-source injection
    Vector searchNot presentQdrant hybrid + 4-level fallback cascade
    Cleanup and deduplicationNot presentDecay scanner + semantic dedup + archival
    Knowledge pipelineNot presentSelf-curating LLM Wiki
    Ground Truth hierarchyNot presentInjected memory ranked as authoritative; agent must use context provided
    Token efficiency—Surgical: gated retrieval + per-session dedup + no wasted rediscovery
    Infrastructure—Local memory stack (Qdrant + Redis + ARQ) + any LLM provider

    Why not mem0, Zep, Letta, or other providers?

    Because almost every modern memory solution is cloud-first. If you want real, private memory infrastructure running on your own machine — with no cloud memory subscription, full provider flexibility, and no data leaving your local stack — none of them deliver what Memory OS delivers.

    Memory OSmem0ZepLetta
    Local memory infrastructure✓✗✗✗
    No memory subscription✓✗✗✗
    Provider agnostic (OpenRouter, Ollama…)✓PartialPartialPartial
    Hermes-native✓✗✗✗
    Structured facts + trust scores✓Partial✗✗
    Self-curating wiki✓✗✗✗
    Intelligent decay + archival✓✗✗✗
    Ground Truth hierarchy✓✗✗✗

    Included components

    • Icarus Plugin (heavily modified fork) — bundled in icarus/
      The upstream esaradev/icarus-plugin is the base, but this fork is not upstream-compatible. Key additions: LLM-powered session extraction (replaces text[:500] truncation), multi-source injection (Qdrant + sessions + facts — upstream is fabric only), CREATIVE.md isolation (fixes § delimiter corruption from dual-writer conflict), backtick sanitization, system injection filter, and social closer detection.

    • Vault Curator v3 — ClaudioDrews/vault-curator
      Frontmatter enrichment, semantic linking, and MOC index generation for the wiki layer.


    Who this is for

    For people who take Hermes Agent seriously.
    For people who want an agent that actually evolves over time — one that doesn't need the world re-explained every session.
    For people who value clean engineering, extreme efficiency, and solutions that hold up in real local production.

    If you're like me — tired of amnesiac agents — Memory OS was built for you.


    Want to see the agent remember for real?
    Clone it, run it, feel the difference.

    → Quick install · Manual guide · Layer deep-dives · Infrastructure docs · Operational skills · License

    MIT License · Built with obsession by someone who runs Hermes every single day.