christopherkarani/Wax
A single-file Swift RAG engine for durable, on-device agent memory.
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
Wax is an embedded Swift retrieval engine. One .wax binary contains dual header pages with generation numbers, pointers, and checksums; a write-ahead log (WAL) ring for recovering uncommitted mutations after a crash; LZ4-compressed data frames; search indexes; and a table of contents. SQLite FTS5 handles text search, and CoreML generates local embeddings. Vector search is exact via Accelerate/CPU below 10,000 indexed vectors and uses Metal-accelerated HNSW at or above that threshold.
Swift apps open the store directly through Memory(at:). Agent hosts use MCP, with stdio for a single client or a shared loopback HTTP writer for multiple clients. Identically configured MCP servers share a broker; a second process with a conflicting configuration fails fast. Hermes uses a native memory provider that owns session lifecycle rather than relying on the MCP session loop.
Key Capabilities & Differentiators
remember writes memory without a cloud LLM extraction step; recall retrieves it through hybrid text and vector search, and stats exposes store status. New stores use e5-small-v2 by default; existing stores can reopen with the built-in embedder that wrote them, including MiniLM. Until the embedder attaches, hybrid queries return text results and vectorOnly throws. Foundation Models integration can inject recalled context into prompts, register memory tools, and write conversation turns back.
The March 6, 2026 Apple Silicon sweep measured hybrid recall at 6.1 ms p95 and 6.5 ms p99, with cold store open at 9.2 ms p95. Cold open measures only opening the store, not first embedding or an end-to-end agent turn. The experimental PhotoMemory and VideoMemory interfaces support OCR, keyframes, and host-supplied transcripts; VideoMemory does not store the video bytes.
Trade-offs & Limitations
Wax gives you searchable cross-session memory without hand-curating a Markdown scratchpad. Compared with Pinecone, it removes the hosted vector database from the retrieval path, but leaves you responsible for file backup, access, and the local writer process if you use MCP. The single file is easy to move; portable files and a shared local broker are not substitutes for concurrent multi-machine writes or a managed service.
Flat search avoids approximate nearest-neighbor errors for smaller stores, but its query work grows with the vector count. HNSW changes that cost profile while making vector retrieval approximate. Test ranking quality as well as latency around the 10,000-vector boundary. Wax is not a temporal knowledge graph, and local storage does not mean end-to-end offline operation if the host sends retrieved context to a cloud model.
Hardware & Deployment Guide
On Apple Silicon, npx -y waxmcp@latest install stages the MCP server, local embedders, and operator skill. For multiple clients, point them at http://127.0.0.1:3000/mcp and keep one server running with the provided start script or the ai.wax.mcp-http LaunchAgent. Configure when the host should write and recall memory in its always-loaded rules, then verify the setup with doctor and vector-health.
An iOS or macOS app can embed Wax as a Swift package without a separate process. Automatic on-device embeddings require iOS 18 or macOS 15 and later; Foundation Models integration requires iOS 26 or macOS 26 plus Apple Intelligence and an available system model. Release waxmcp-v0.1.48 fixed socket cleanup when HTTP clients dropped SSE streams; waxmcp-v0.1.51 hardened WAL ring integrity and gated releases on tests with a pinned toolchain and dependencies.
.wax binary holds documents, metadata, an FTS5 index, a vector index, a table of contents, and a crash-recovery WAL ring.remember, recall, and stats; Hermes uses a native provider for handoffs and turn sync.Apple Silicon teams sharing durable memory across local agent hosts, or iOS and macOS apps embedding hybrid retrieval without a hosted database.
You need a managed multi-machine backend, concurrent writes across machines, or a temporal knowledge graph.
Quick Start & Installation
npx -y waxmcp@latest install
Comparison vs. Top RAG, Data & Memory Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| Wax ★ | 816 | — | Swift | Apache-2.0 | A single-file Swift RAG engine for durable, on-device agent memory. |
| qdrant | 35.9k | +135 | Rust | Apache-2.0 | Rust vector database for filtered and hybrid RAG retrieval |
| LightRAG | 41k | +110 | Python | MIT | Graph-backed RAG for cross-document retrieval and multimodal indexing |
| pgvector | 23.9k | +96 | C | — | PostgreSQL extension for exact and approximate vector search alongside relationa |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/christopherkarani/Wax.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about Wax
How should several agents share one Wax store?
http://127.0.0.1:3000/mcp. A single Claude Code client can use stdio; for multiple clients, use the shared endpoint rather than launching separate writers against the same .wax file. Hermes uses its native wax-memory provider instead of also registering Wax as an MCP server.What hardware and memory budget should I plan for?
Can I use and redistribute Wax in a commercial product?
.wax file, and whether retrieved content is sent to a hosted model.Is Wax a replacement for Pinecone?
.wax files does not replace that architecture.Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy