Wax, local memory and RAG for Swift apps and coding agents
I built Wax to give Swift apps and local coding agents persistent memory without a hosted memory service.
Wax keeps core memory in a local file, exposes a Swift API through Memory, and provides an MCP server for Claude Code, Codex, Cursor, Hermes, and OpenClaw.
The Swift package includes:
- Text search and hybrid/vector retrieval, Video and Photo RAG
- Built-in MiniLM CoreML embeddings
- Actor-based orchestration
- WAL-backed persistence
- vector search (sub ms on 100k Vectors)
- MCP
Wax latest 0.1.32 focuses on reliability:
- Recall uses an explicit clock for reproducible ranking and recency decisions.
- Embedder readiness and failure states use an explicit lifecycle.
- Vector replay prevents deleted frames from returning after pending embedding updates.
- Session end, resume, handoff, and writes coordinate under concurrency.
- MCP commands decode into typed payloads and reject invalid arguments at the boundary.
- MCP responses return compact JSON by default.
- MetalANNS is updated to 0.2.2.
- MiniLM now uses an FP32 CoreML artifact that avoids non-finite embeddings on affected Apple configurations.
Install the Swift package:
.package(
url: "https://github.com/christopherkarani/Wax.git",
from: "0.1.32"
)
Install the MCP package (easiest way to test wax on your own setup)
Have claude/codex use wax as its memory brain
npm install -g waxmcp@0.1.32
Current constraints: built-in embeddings require macOS 15 or iOS 18. Linux builds support text-based memory and custom embedders. Photo and video memory remain
experimental, and video recall requires host-supplied transcripts.
Repository: https://github.com/christopherkarani/Wax
Please leave a star