Skip to main content
Glama
README.md
<div align="center">

<img src="assets/banner.jpg" alt="OmniRecall — Unified Memory & Reasoning Bridge for AI Coding Agents" width="100%" />

<br />

[![License: MIT](https://img.shields.io/badge/License-MIT-0ea5e9?style=for-the-badge)](LICENSE)
[![Python 3.11+](https://img.shields.io/badge/Python-3.11%2B-38bdf8?style=for-the-badge&logo=python&logoColor=white)](pyproject.toml)
[![MCP Server + App](https://img.shields.io/badge/MCP-Server%20%2B%20App-8b5cf6?style=for-the-badge)](ARCHITECTURE.md)
[![Zero API Keys](https://img.shields.io/badge/API%20Keys-Zero%20Required-10b981?style=for-the-badge)](#why-omnirecall)

**Local-First, Zero-API-Key Unified Memory, Reasoning History & File Decision Graph for AI Coding Agents**

*Unify **OpenAI Codex (Desktop & CLI)**, **Google Antigravity**, and **Claude Code** into one searchable brain — preserving every conversation, thinking step, plan, and file edit.*

[English](README.md) · [简体中文](README_CN.md) · [Architecture](ARCHITECTURE.md) · [Contributing](CONTRIBUTING.md)

</div>

---

## Visual Preview

<div align="center">
  <img src="assets/ui-preview.png" alt="OmniRecall Interactive UI — Multi-Agent Thread Browser, Thinking Cards, Plan Blueprint & 1-Click Import Dock" width="100%" />
  <p><em>Dual-mode UI running natively inside the Antigravity Side Pane / Sidebar (MCP App) and as a standalone Web Hub (<code>localhost:8765</code>).</em></p>
</div>

---

## Why OmniRecall?

When you switch between **Codex**, **Antigravity**, and **Claude Code**, your hardest-earned context — architectural decisions, debugging trails, reasoning steps, and file edits — gets trapped in incompatible SQLite databases and JSONL logs.

Existing tools leave major gaps:
- Most Codex tools only read `~/.codex/sessions/*.jsonl`, silently missing **hundreds of Codex Desktop threads** stored in `state_5.sqlite` + `thread_history_1.sqlite`.
- Session-format converters (`session-migrate`) **strip all thinking/reasoning steps** and lock onto narrow OS/binary hashes.
- Vector memory tools (`code-session-memory`) require paid cloud embedding API keys (`OPENAI_API_KEY`) and lack a visual picker for selective handoff.

**OmniRecall solves all of these at once — 100% locally, with zero API keys and zero risk to native agent databases.**

### Feature Comparison

| Capability | `code-session-memory` | `session-migrate` | `episodic-memory` | `cc-sessions-viewer` | **OmniRecall** |
| --- | :---: | :---: | :---: | :---: | :---: |
| **Codex Desktop SQLite (`state_5` + `thread_history_1`) + JSONL** | ❌ | ❌ | ❌ | ⚠️ Partial | **✅ Full** |
| **Google Antigravity (App / IDE / CLI) + Thinking** | ✅ | ⚠️ Linux 2 pinned CLIs | ❌ | ⚠️ CLI only | **✅ Full + Native MCP App** |
| **Claude Code (`~/.claude/projects`) + Thinking** | ✅ | ✅ | ✅ | ✅ | **✅ Full** |
| **Preserves Reasoning / Thinking & Plans** | ❌ | ❌ Stripped | ⚠️ Limited | ✅ | **✅ Full + Handoff Injection** |
| **Zero-API-Key Bilingual Hybrid Search (CJK + English RRF)** | ❌ Needs OpenAI Key | ❌ | ⚠️ External | ⚠️ Keyword only | **✅ FTS5 Trigram + Local Semantic RRF** |
| **File-to-Thread Decision Graph ("git blame for AI reasoning")** | ❌ | ❌ | ❌ | ❌ | **✅ Cross-agent file edit + reasoning lookup** |
| **Interactive Side Pane Picker + 1-Click Import into Chat** | ❌ | ❌ | ❌ | ❌ | **✅ Native Antigravity MCP App + Web Hub** |
| **Strict Read-Only Ingestion (Zero DB Corruption Risk)** | ✅ | ❌ Writes native DB | ✅ | ✅ | **✅ `mode=ro` SQLite** |

---

## Architecture

```mermaid
flowchart LR
  C["Codex Desktop & CLI\n(state_5 + thread_history_1 + JSONL)"] --> AD["Pluggable Adapters"]
  A["Google Antigravity\n(summaries.db + transcript*.jsonl)"] --> AD
  L["Claude Code\n(~/.claude/projects/*.jsonl)"] --> AD
  AD --> DB["Local SQLite Index (WAL)\nFTS5 Trigram · Sparse TF-IDF · File Graph"]
  DB --> MCP["Bidirectional MCP Server\n(Antigravity · Codex · Claude · Cursor)"]
  DB --> APP["Native Antigravity MCP App\n(Side Pane & Sidebar · 1-Click Handoff)"]
  DB --> WEB["Standalone Web Hub\n(FastAPI · localhost:8765)"]
```

See [ARCHITECTURE.md](ARCHITECTURE.md) for deep technical details.

---

## Measured Local Benchmarks

Measured on a real developer workstation corpus (**778 threads**, **107,961 items**, **17,419 reasoning steps**, **4,276 unique files / 8,509 file edits**, 100% local, zero cloud APIs):

| Operation | Median Latency |
| --- | ---: |
| **Lexical Search (FTS5 Trigram BM25, CJK + English)** | **17.6 ms** |
| **Local Semantic Search (Bilingual TF-IDF Cosine)** | **41.9 ms** |
| **Hybrid Search (FTS5 + Semantic Reciprocal Rank Fusion)** | **54.3 ms** |
| **File-to-Thread Decision Graph (`app.js` → threads + reasoning)** | **44.7 ms** |
| **Incremental Cross-Agent Sync (3 agents, 778 threads)** | **155.9 ms** |

Reproduce on your own machine with: `python scripts/benchmark.py`.

---

## 30-Second Quickstart

### 1. Clone & Install

```bash
git clone https://github.com/kremefkaped/omni-recall.git
cd omni-recall

# Python 3.11+ virtual environment
python -m venv .venv
# Windows: .venv\Scripts\activate   |   macOS/Linux: source .venv/bin/activate
pip install -e .

# Optional: rebuild single-file UI bundle (pre-built ui-dist/app.html is included)
cd ui-src && npm install && npm run build && cd ..
```

### 2. One-Command Bidirectional Setup (Antigravity + Codex)

```bash
# 1. Index all local Codex, Antigravity, and Claude Code history (read-only)
omni-recall sync

# 2. Install Antigravity native MCP App plugin, safe Stop hook, and Codex MCP entry
#    (Never overwrites existing Codex Desktop `notify` hooks; creates .bak backups)
omni-recall install

# 3. Verify environment health
omni-recall doctor
```

### 3. Use Everywhere

1. **Inside Antigravity (Native Side Pane & Sidebar)**:
   - Open **`+` → `Codex 记忆库`** in the side pane (or left sidebar) to browse all multi-agent conversations like a chat app, search via Hybrid RRF or File Decision Graph, check multiple threads, and click **Attach Context / Send to Current Chat / Start New Conversation**.
   - Or just ask in natural language: *"Find how we designed the WebGL force field in Codex and continue from there."*
2. **Inside Codex**:
   - Ask Codex to recall anything from Antigravity or Claude Code via the installed `omni-recall` MCP server!
3. **Standalone Local Web Hub**:
   ```bash
   omni-recall serve --port 8765
   # Windows users can also double-click start_web.bat
   ```
4. **CLI Power Tools**:
   ```bash
   omni-recall search "concurrency token refresh lock" --mode hybrid
   omni-recall files auth_refresh.py
   omni-recall stats
   omni-recall export --source codex --out ./my-obsidian-vault
   omni-recall watch --interval 10
   ```

---

## MCP Tools Reference

| Tool | Purpose |
| --- | --- |
| `codex_open_browser` | Launches the native **MCP App** visual browser (`aux_pane` & `global` entrypoints) |
| `codex_search_history` | Zero-API-key **Hybrid / Lexical / Semantic** search across all agents |
| `codex_file_history` | **File-to-Thread Decision Graph**: lookup every edit & reasoning behind a file |
| `codex_list_projects` | List workspaces across all agents with thread, thinking & file-edit counts |
| `codex_list_threads` | Filter threads by `source_agent`, `cwd`, or query |
| `codex_get_thread` | Paginated reader (`mode="compact"` or `"full"`) preserving reasoning & plans |
| `codex_build_handoff` | Compile 1+ threads into a budget-aware Markdown handoff dossier |
| `codex_export_markdown` | Bulk export clean Markdown archives organized by agent & project |
| `codex_create_agy_conversation` | Spawn a new Antigravity conversation pre-loaded with selected threads |
| `codex_sync` / `codex_stats` | On-demand incremental sync & per-agent corpus statistics |

---

## Privacy & Safety

- **100% Local**: Zero telemetry, zero external API calls, zero cloud uploads.
- **Read-Only Ingestion**: Native agent databases are opened with SQLite `mode=ro`.
- **Reversible Install**: `omni-recall uninstall` cleanly removes managed hooks and TOML blocks while preserving your original configurations.

## License

[MIT](LICENSE)