christopherkarani/Wax

Single-file memory layer for AI agents, sub mili-second RAG on Apple Silicon. Metal Optimized On-Device. No Server. No API. One File. Pure Swift

What it solves

Wax provides a local, single-file memory layer for AI agents, eliminating the need for cloud-hosted vector databases, complex Docker setups, or API keys. It allows agents to maintain persistent, long-term memory across sessions while keeping all data on the user's device for privacy and speed.

How it works

Wax stores documents, embeddings, and structured knowledge in a proprietary .wax binary file. It uses a hybrid search approach, combining SQLite FTS5 for lexical text search and a Metal-accelerated HNSW index for vector search. To ensure data integrity, it employs a write-ahead log (WAL) and dual header pages for crash resilience. Data is compressed using LZ4 to keep the file size compact.

Who it’s for

  • Swift Developers: Those building iOS or macOS apps that require on-device RAG (Retrieval-Augmented Generation) or persistent AI memory.
  • CLI Power Users: Developers who want a scriptable, command-line memory store.
  • AI Agent Users: People using assistants like Claude Code, Cursor, or Windsurf who want their agents to remember context and decisions across different sessions via the Model Context Protocol (MCP).

Highlights

  • Single-File Storage: All memory is bundled into one .wax file, making it portable and easy to sync via iCloud or AirDrop.
  • Apple Silicon Native: Optimized for M-series hardware, achieving very low recall latency (~6ms p95).
  • Hybrid Search: Supports both semantic (vector) and deterministic (text) retrieval modes.
  • MCP Integration: Includes a first-class Model Context Protocol server to connect local memory to AI coding assistants.
  • Zero Config: No servers or external dependencies required for basic operation.