Documents, embeddings, BM25 and HNSW indexes in a single file. No Docker. No network calls. No cloud dependency.
import Wax
// Hybrid search with on-device embeddings (MiniLM, 384-dim)
let brain = try await MemoryOrchestrator.openMiniLM(
at: URL(fileURLWithPath: "brain.wax")
)
// Remember something
try await brain.remember(
"User prefers dark mode and gets headaches from bright screens",
metadata: ["source": "onboarding"]
)
// Recall with RAG
let context = try await brain.recall(query: "user preferences")
10,000 × 384-dim documents on Apple Silicon
Wax vs. the alternatives for iOS/macOS.
| Feature | Wax | Chroma | Core Data + FAISS | Pinecone |
|---|---|---|---|---|
| Single file | ✓ | ✕ | ✕ | ✕ |
| Works offline | ✓ | partial | ✓ | ✕ |
| Crash-safe | ✓ | ✕ | partial | N/A |
| GPU vector search | ✓ | ✕ | ✕ | ✕ |
| No server required | ✓ | ✓ | ✓ | ✕ |
| Swift-native | ✓ | ✕ | ✓ | ✕ |
| Deterministic RAG | ✓ | ✕ | ✕ | ✕ |