itechmeat/open-second-brain

Local-first 🧠 memory for Hermes Agent that lives in your Obsidian vault and remembers project context. Nightly 😴 dream passes turn repeat corrections into confirmed preferences with measurable confidence. Adapters ship for Claude Code, Codex, and OpenClaw, with an MCP server for anything else.

What it solves

It provides a persistent memory layer for AI agents, allowing them to learn from interactions and store knowledge in a way that is human-readable, editable, and version-controlled. Instead of relying solely on short-term context windows, agents can maintain a long-term "brain" that evolves over time.

How it works

The system integrates with an Obsidian vault, where the agent's memories are stored as Markdown files in a Brain/ directory. Agents interact with this memory layer via MCP (Model Context Protocol) servers, lifecycle hooks, or a dedicated CLI (o2b).

A key feature is the "dream pass," a deterministic algorithm that processes repeated signals (feedback) into stable rules and preferences, which are then rendered into an active.md file that the agent reads at the start of every session. The system also maintains a rebuildable SQLite search index for efficient retrieval.

Who it’s for

Developers and users of AI agents (such as Claude Code, Cursor, Aider, and others) who want their agents to have a persistent, transparent memory that they can manually inspect or edit using standard note-taking tools.

Highlights

  • Human-Readable Memory: All agent knowledge is stored as Markdown files, making it easy to grep, edit, and version.
  • Learning Loop: Automatically converts interaction signals into rules and retires unused ones through a deterministic dream pass.
  • Broad Integration: Supports a wide array of clients including Claude Code, Cursor, Copilot CLI, and any MCP host.
  • Memory Management: Includes tools for snapshots, rollbacks, hash-chained logs for write verification, and hygiene scans to remove stale memories.
  • Search Capabilities: Offers keyword search with optional semantic search via embedding providers.

Related

  • Project
  • Project
  • Project
  • Project
  • Project