🍯 Memory layer for on-device AI Agents. Replace complex RAG pipelines with a serverless, single-file memory layer.
# Add to your Claude Code skills
git clone https://github.com/christopherkarani/Wax<br/><br/>
No server. No cloud. One file.
<br/> </div>Most iOS AI apps lose their memory the moment the user closes them. Wax fixes that — giving your agents persistent, searchable, private memory that lives entirely on-device in a single portable file.
let memory = try WaxMemory(url: .documentsDirectory.appending(path: "agent.wax"))
// Store a memory
try await memory.store("User prefers concise answers and hates bullet points.")
// Retrieve the most relevant context — semantically
let context = try await memory.search("communication preferences", limit: 5)
Building AI agents on Apple platforms means juggling Core Data for persistence, FAISS or Annoy for vector search, and a tokenizer for context budgets — none of which talk to each other. Or you spin up Chroma or Pinecone and suddenly your app has a server dependency, network calls, and a privacy story you can't tell users.
Wax packages all of it into one self-contained file:
| Capability | Without Wax | With Wax | |---|---|---| | Document storage | Core Data / SQLite | ✅ Built-in | | Semantic search | External FAISS / Annoy | ✅ Built-in (HNSW) | | Full-text search | Another index | ✅ Built-in (BM25) | | Token budgeting | Manual | ✅ Automatic | | Crash safety | You figure it out | ✅ WAL + dual headers | | Server required | Often | ✅ Never |
No comments yet. Be the first to share your thoughts!
.wax file. Back it up, sync it, move it.async/await native with Sendable conformances throughout.Swift Package Manager
// Package.swift
dependencies: [
.package(url: "https://github.com/christopherkarani/Wax.git", from: ".1.7")
]
Or in Xcode: File → Add Package Dependencies → paste the repo URL.
import Wax
// 1. Open (or create) a memory store
let...