All work
AIFeatured2026-11

0x1-ai-memory

Local-first, anti-drain cross-agent persistent memory engine shipped as a single Rust binary with SQLite FTS5, sqlite-vec, and an embedded Web UI.

  • Rust
  • SQLite FTS5
  • sqlite-vec
  • ONNX
  • MCP
  • React
npx 0x1-ai-memory

Project brief (5W + 1H)

Why I built it
Switching between Claude Code, Codex, and Antigravity on the same repository trapped architectural decisions and bugfixes in isolated session histories, while existing memory plugins drained LLM quotas by distilling every tool call or silently falling back onto coding subscriptions.
What it is
A single-binary local-first cross-agent persistent memory engine combining SQLite WAL, FTS5, sqlite-vec, local ONNX embeddings, a 5-tool MCP server, and an embedded React console.
Who it is for
Developers and engineering teams running multiple AI coding agents on shared codebases who need cross-session continuity without runaway API spend.
Where it runs
Runs locally on macOS, Linux, and Windows at 127.0.0.1:10101, integrating via lifecycle hooks and Streamable HTTP or stdio MCP with Claude Code, Codex CLI and App, and Antigravity.
When it shipped
Started November 2026; published as 0x1-ai-memory v0.4.4 on npm (MIT).
How it works
Sub-10 ms lifecycle hooks scrub secrets and store raw events in SQLite WAL at zero LLM tokens; stateless distillation runs once per turn under hard daily token and USD caps, powering hybrid FTS5 plus vector Reciprocal Rank Fusion recall and cross-agent Handoff briefings.

Problem

Running multiple coding agents (Claude Code, Codex CLI, and Antigravity) across the same repository leaves architectural decisions and bugfixes trapped in isolated histories. Existing plugin-based memory systems also drain LLM quotas by re-running distillation on every tool call or silently falling back to coding subscriptions on API errors.

0x1-ai-memory unifies all clients against one local SQLite store in a single Rust binary, with deterministic per-turn distillation and strict cost caps.

Approach & Architecture

  • Single binary, zero sidecars. One Rust executable (0x1-memory) hosts the background daemon (axum), Streamable HTTP and stdio MCP server (5 tools under ~550 tokens), hook CLI shims (<5 ms), SQLite WAL + FTS5 + sqlite-vec (fastembed ONNX), and the embedded React Web UI (rust-embed).
  • Hybrid per-turn anti-drain capture. Lifecycle hooks record raw events locally at 0 LLM tokens after deterministic secret scrubbing. Stateless distillation runs once per completed turn (Stop, idle timeout, or PreCompact).
  • Zero silent fallback and privacy boundaries. Daily token and USD caps gate every distillation or embedding request in usage_ledger. Per-project privacy_mode (full, local_only, paused) keeps sensitive repositories strictly on device.
flowchart TD A["Claude Code / Codex / Antigravity"] -->|hooks under 5 ms| B["Secret Scrub and SQLite WAL"] A -->|MCP 5 tools| C["Hybrid Search\nFTS5 + sqlite-vec"] B --> D["Per-Turn Distill Worker"] D -->|Budget Guardrail| E["OpenRouter / Gemini\nOllama / None"] D --> C B --> F["Embedded React UI at 127.0.0.1:10101"]

Quick start

Start the local daemon via npm (downloads and SHA-256 verifies the prebuilt native Rust binary into ~/.0x1-memory/bin/) and open http://127.0.0.1:10101.

npx 0x1-ai-memory

MIT licensed. Supports macOS, Linux, and Windows, plus any universal MCP client over Streamable HTTP or 0x1-memory mcp-stdio.

Quick commands

⌘K

Navigate

Quick actions

Install CLI