Skip to main content

๐Ÿง  Antharmaya Memory Bridge

Give your Hermes agent photographic memory of every AI conversation you've ever had.

License: MIT Hermes Plugin

Memory Bridge auto-discovers every AI agent conversation on your machine โ€” Claude Code, Codex, Gemini, Cursor, OpenCode, Goose, and more โ€” and consolidates them into a unified, searchable memory index that Hermes (Antharmaya's own always-on orchestrator โ€” not affiliated with any other project of the same name) can query in real-time.

curl -fsSL https://antharmaya.com/memory-bridge/install.sh | bash

The Problem

You've had thousands of conversations with AI agents. Claude Code knows your architecture decisions. Codex remembers your preferences. Gemini has your project plans. But none of them talk to each other, and Hermes โ€” your always-on agent โ€” knows none of it.

Every new session starts from zero.

The Solution

Memory Bridge scans your machine for ALL agent conversation histories, extracts durable facts/decisions/preferences/lessons, and stores them in a local SQLite+FTS5 index. Hermes queries this index on every turn โ€” so it remembers what you discussed with Claude Code last week, what you decided with Gemini last month, and what Codex knows about your stack.

It's like your agents finally started comparing notes.


Supported Agents

Agent What's Scanned Format
Claude Code Full conversations + MEMORY.md knowledge graph ~/.claude/projects/*/
Codex (OpenAI) Prompt history + MEMORY.md ~/.codex/
Gemini CLI / Anti-Gravity Chat history + brain/task plans ~/.gemini/
OpenCode Prompt history ~/.local/state/opencode/
Cursor Plans + AI tracking data ~/.cursor/
Goose Session transcripts ~/.local/share/goose/
Agent Linux Control Event logs ~/.local/state/agent-linux-control/

More agents added continuously. See CONTRIBUTING.md to contribute a scanner.


What Gets Extracted

Memory Bridge classifies every fact into one of six categories:

  • ๐ŸŽฏ Decisions โ€” "Decided to use Cloudflare Workers over Vercel for cost reasons"
  • โš™๏ธ Preferences โ€” "Prefers direct communication, no motivational filler"
  • ๐Ÿ“š Lessons โ€” "Razorpay OAuth flow breaks when redirect_uri has trailing slash"
  • ๐Ÿ“Š Projects โ€” "Photoselect frontend deployed on Cloudflare Pages, backend on Cloud Run"
  • ๐Ÿ‘ค People โ€” "Design partner: Priya at PixelMemories Studio, Mumbai"
  • ๐Ÿ“ Facts โ€” "Postgres 16 on port 5433, Redis on 6380"

How It Works

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    YOUR MACHINE                              โ”‚
โ”‚                                                              โ”‚
โ”‚  ~/.claude/projects/    ~/.codex/    ~/.gemini/    ...       โ”‚
โ”‚        โ”‚                    โ”‚            โ”‚                   โ”‚
โ”‚        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                   โ”‚
โ”‚                             โ–ผ                                โ”‚
โ”‚                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                       โ”‚
โ”‚                    โ”‚   SCANNER       โ”‚  Auto-discovery       โ”‚
โ”‚                    โ”‚   6+ formats    โ”‚  of all agents        โ”‚
โ”‚                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                       โ”‚
โ”‚                             โ–ผ                                โ”‚
โ”‚                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                       โ”‚
โ”‚                    โ”‚   EXTRACTOR     โ”‚  Rules-based (free)   โ”‚
โ”‚                    โ”‚  + LLM (opt)    โ”‚  via ctx.llm          โ”‚
โ”‚                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                       โ”‚
โ”‚                             โ–ผ                                โ”‚
โ”‚                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                       โ”‚
โ”‚                    โ”‚  SQLite + FTS5  โ”‚  Ultra-fast local     โ”‚
โ”‚                    โ”‚   INDEX         โ”‚  full-text search     โ”‚
โ”‚                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                       โ”‚
โ”‚                             โ–ผ                                โ”‚
โ”‚                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                       โ”‚
โ”‚                    โ”‚  HERMES AGENT   โ”‚  prefetch() on        โ”‚
โ”‚                    โ”‚  MemoryProvider โ”‚  every turn           โ”‚
โ”‚                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
  1. Scan โ€” Discovers all agent histories on disk
  2. Extract โ€” Rules-based extraction (free) catches decisions, preferences, lessons. Optional LLM pass for deep semantic extraction โ€” uses your Hermes model via ctx.llm, no separate API key needed
  3. Index โ€” SQLite with FTS5 full-text search. Sub-millisecond queries. Zero external services
  4. Retrieve โ€” Hermes queries the index on every turn via prefetch(). Relevant memories are injected into context automatically

Use it from any agent (MCP)

Memory Bridge began as a Hermes plugin, but the index it builds is host-neutral. It ships a zero-dependency MCP server (stdio, JSON-RPC) so any MCP client โ€” Claude Desktop, Cursor, Codex, Windsurf โ€” can search, recall, and review the same local index. No SDK, no extra dependency.

// Claude Desktop / Cursor โ€” mcpServers config
{
  "mcpServers": {
    "memory-bridge": { "command": "memory-bridge", "args": ["mcp"] }
  }
}

Exposes four tools to the client: search_memory, recall (time/agent-scoped), list_decisions, and memory_stats. Run it directly with memory-bridge mcp.


Usage

In Hermes (after install)

/memory_bridge_stats                    # See what's been consolidated
/memory_bridge_search "razorpay auth"   # Search all agent memories
/memory_bridge_recall "what did I do with Claude Code last month"  # Agent + time-scoped recall
/memory_bridge_brain "photoselect"      # Explore the entity graph / associative recall
/memory_bridge_brief "photoselect"      # Always-fresh briefing (decisions, outcomes, files)
/memory_bridge_decisions                # Review structured decisions + outcomes
/memory_bridge_scan                     # Re-scan for new conversations

Or use the CLI:

hermes memory-bridge scan               # Scan for new agent histories
hermes memory-bridge search "deploy"    # Search your unified memory
hermes memory-bridge recall "what did I do with codex last week"  # Time/agent recall
hermes memory-bridge brain photoselect  # Entity graph: what's connected to what
hermes memory-bridge brief photoselect  # Always-fresh briefing for a project/entity
hermes memory-bridge verify 7 bad "prod data got corrupted"  # Record an outcome โ†’ becomes a lesson
hermes memory-bridge reflect            # Surface failed decisions as lessons
hermes memory-bridge decisions          # List structured decisions + outcomes
hermes memory-bridge stats              # Show memory statistics

Standalone (without Hermes)

python3 -c "
from src.scanner import discover_all
from src.indexer import MemoryIndex
from pathlib import Path

index = MemoryIndex(Path.home() / '.hermes' / 'antharmaya-memory' / 'index.db')
sessions = discover_all()
print(f'Found {len(sessions)} agent sessions')
stats = index.stats()
print(stats)
"

Installation

Method 1: Curl (Recommended)

curl -fsSL https://antharmaya.com/memory-bridge/install.sh | bash

Clones into ~/.hermes/plugins/memory/antharmaya-bridge/, installs deps, runs initial scan.

Method 2: Manual (git clone)

git clone https://github.com/antharmaya/mem-bridge.git \
  ~/.hermes/plugins/memory/antharmaya-bridge

Memory providers must live in ~/.hermes/plugins/memory/<name>/ โ€” this is the Hermes convention for provider discovery.

Activation

After installation, activate Memory Bridge as your memory provider:

Option A โ€” Interactive (easiest):

hermes memory setup
# Select "antharmaya-bridge" when prompted

Option B โ€” Manual config:

# ~/.hermes/config.yaml
memory:
  provider: antharmaya-bridge

Then restart Hermes. The plugin loads automatically on next session. Verify with:

/memory_bridge_stats

Requirements

  • Python 3.11+
  • Hermes Agent 0.16.0+
  • 10MB disk space (SQLite index)
  • No external services. No API keys. No cloud. No telemetry.

Deep LLM Extraction

Memory Bridge uses ctx.llm โ€” Hermes' own configured model โ€” for deep fact extraction. Zero config, no separate API key. It just works.

If running standalone (without Hermes), set an API key for the fallback DirectEngine:

export MEMORY_BRIDGE_API_KEY="sk-or-v1-..."   # OpenRouter
# or
export OPENROUTER_API_KEY="sk-or-v1-..."       # OpenRouter

Privacy

  • Local by default. Scanning, rules-based extraction, and the index are 100% local โ€” the SQLite index never leaves your machine.
  • You choose where LLM extraction runs. The optional deep-extraction pass sends conversation text to whatever model you've already configured in Hermes via ctx.llm. Point Hermes at a local model and it stays fully offline; point it at a cloud provider and that text goes there โ€” your call. The standalone DirectEngine fallback only activates if you set an API key.
  • No telemetry. No analytics. No phoning home โ€” Memory Bridge makes zero network calls of its own.
  • Read-only. Memory Bridge never modifies your agent histories โ€” only marks them as "processed" in its own index.
  • You own your data. The index is a SQLite file in ~/.hermes/antharmaya-memory/.

Architecture

antharmaya-memory-bridge/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ scanner.py       # Agent history discovery (re-exports from scanners/)
โ”‚   โ”œโ”€โ”€ scanners/        # Individual agent scanners (9 agents)
โ”‚   โ”‚   โ”œโ”€โ”€ base.py      # Session/Message types, scanner registry
โ”‚   โ”‚   โ”œโ”€โ”€ claude_code.py, codex.py, gemini.py, ...
โ”‚   โ”œโ”€โ”€ extractor.py     # Rules-based + LLM fact extraction
โ”‚   โ”œโ”€โ”€ indexer.py       # SQLite+FTS5 storage engine
โ”‚   โ”œโ”€โ”€ provider.py      # Hermes MemoryProvider plugin
โ”‚   โ””โ”€โ”€ cli.py           # Standalone CLI
โ”œโ”€โ”€ plugin.yaml           # Hermes plugin manifest
โ”œโ”€โ”€ install.sh            # One-line curl installer
โ””โ”€โ”€ README.md

### Adding a new agent scanner

1. Create `src/scanners/my_agent.py` with a `@register_scanner("agent-name")` function
2. Import it in `src/scanners/__init__.py`
3. Submit a PR

Example:
```python
# src/scanners/my_agent.py
from .base import Message, Session, register_scanner

@register_scanner("my-agent")
def scan_my_agent(home: Path) -> Iterator[Session]:
    history_file = home / ".my-agent" / "history.jsonl"
    if not history_file.is_file():
        return
    # Parse and yield Session objects

Performance

Operation Cold (first scan) Warm (incremental)
Scan 200+ sessions ~2 seconds ~0.5 seconds
Rules extraction ~0.1s per session โ€”
LLM extraction ~2-5s per session โ€”
FTS5 search <1ms <1ms
prefetch() <5ms <5ms

FTS5 queries are sub-millisecond even with 100K+ entries. The index file grows ~10KB per 100 entries.


FAQ

Q: Does this send my conversations to the cloud? A: No. Everything runs locally. The only optional network call is LLM extraction if you provide an API key.

Q: Can I use this without Hermes? A: Yes. The scanner and indexer work standalone. Use the Python API directly.

Q: What if an agent changes its history format? A: Scanners are modular. If a format breaks, only that scanner fails โ€” everything else keeps working. File an issue and we'll fix it.

Q: Will this slow down my Hermes sessions? A: No. prefetch() runs in <5ms. The index is local SQLite with WAL mode and 64MB cache.

Q: How is this different from Hermes built-in memory? A: Hermes memory only knows what happens IN Hermes sessions. Memory Bridge knows what happened in EVERY agent you've ever used โ€” Claude Code, Codex, Gemini, Cursor, everything. It's the difference between remembering your own thoughts and remembering every conversation you've ever had.


Roadmap

  • Core scanner + indexer
  • Hermes MemoryProvider plugin
  • One-line curl installer
  • Rust rewrite of indexer for sub-microsecond retrieval
  • Vector embeddings for semantic search (all-MiniLM-L6-v2)
  • Aider, Cline scanner support
  • Auto-consolidation cron job
  • Memory health dashboard

Built with ๐Ÿง  by Antharmaya Labs โ€” the substrate layer for AI-native India.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

memory_bridge-0.5.0.tar.gz (79.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

memory_bridge-0.5.0-py3-none-any.whl (75.7 kB view details)

Uploaded Python 3

File details

Details for the file memory_bridge-0.5.0.tar.gz.

File metadata

  • Download URL: memory_bridge-0.5.0.tar.gz
  • Upload date:
  • Size: 79.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for memory_bridge-0.5.0.tar.gz
Algorithm Hash digest
SHA256 7c7116c1489c706b67ca172642a254d735b1fac0fe7616f50338114740afaef0
MD5 1975d13c8b9fae0da7bc3aa7166b2622
BLAKE2b-256 dead46503647d29c02605364a4f467e6369cc981182d31daefd515a56b2459b1

See more details on using hashes here.

File details

Details for the file memory_bridge-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: memory_bridge-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 75.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for memory_bridge-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bef586d18331b82bc07bf18e5a347b398c5b6320e99e81c9ac3ae67fe0dfc646
MD5 801f5d937e0408594681ec1152b23bf8
BLAKE2b-256 f8eaa23bc771dcec22666dc530d03d6e767475268fa51914e4e857db705a5aac

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page