A local-first memory layer for AI agents on the Mac. Conversations, files, and events become a living, bi-temporal knowledge base — extracted, linked, ranked, and gracefully forgotten, all on-device.
Four ideas turn a stream of events into memory an agent can actually reason over.
Facts become entities and edges with validity windows. New information supersedes the old without deleting it — so "as of last March" still answers correctly.
Lexical BM25 and dense vectors run in parallel, fuse with reciprocal-rank fusion, get scaled by recency and importance, then an optional cross-encoder reranks the top set.
Every memory ages HOT → WARM → COLD → ARCHIVE. Stale detail is compressed, not dumped; pinned and reinforced memories stay sharp.
One libSQL file holds relations, full-text, and native vectors. Secrets live in a CryptoKit-encrypted vault behind Touch ID. Nothing leaves the Mac unless you route it out.
LLMs are stateless. The usual workarounds break down the moment an agent needs to remember more than a few turns.
Re-feeding history into every prompt burns tokens, fills the context window, and still forgets what mattered three sessions ago.
Chunk-and-embed keeps every contradiction side by side, so the agent guesses which version of a fact is current — and guesses wrong.
Hosted memory means every recall leaves the device for someone else's database, billing meter, and privacy policy.
Human memory isn't one thing — neither is Mnemos. Each component is modeled for what it holds and how it's recalled, not crammed into a single vector blob.
The live scratchpad for the current task — what the agent is holding in mind right now.
An always-injected profile — who the user is and how they like to work. Edited in place.
Every event in time — messages, actions, observations — each a timestamped episode you can replay.
Entities and bi-temporal edges, extracted by an LLM into a queryable knowledge graph.
How-to knowledge — named, triggered, step-by-step routines the agent can follow.
Files, PDFs, and screenshots — chunked, embedded, and OCR'd with Apple Vision so documents are searchable too.
Secrets and credentials, encrypted per-field with CryptoKit and revealed only behind a Touch ID gate.
Mnemos runs in-process — no daemon, no server. Your app imports one Swift package; everything below lives inside it, coordinating on a single on-device database.
Mnemos embeds in your Swift app as a single package. Add raw events; it stores them instantly and enriches them in the background.
import Mnemos
let mem = try MemoryLayer(config: cfg)
try mem.migrate()
// Stored instantly; entities + facts extracted in the background
let result = try await mem.add(RawEvent(
sourceType: .chat,
summary: "Sarah confirms the Q3 launch slips to May 12",
actors: ["Sarah Chen"]
), infer: .yes, contextID: "proj_q3")
// Hybrid retrieval: lexical + dense, fused, decay-scaled, reranked
let hits = try await mem.search("when is the launch", limit: 10)
// Bi-temporal: ask what was true at a point in the past
let past = try mem.asOf(Date(timeIntervalSinceNow: -90 * 86400)) Events persist the instant they arrive; an LLM distills entities and facts asynchronously, so writes never block the agent.
When a fact changes, the old edge is closed with a validity date and linked to the new one — history stays intact and auditable.
A search fans out across dense vectors, BM25, a k-hop graph traversal, and a parsed time window — then fuses them into one ranked set.
Memory quality is measurable — so we measure it. Mnemos ships with a full evaluation harness, run on every change.
LoCoMo, LongMemEval, and needle-in-a-haystack run against the live engine — scored for recall, exact match, and multi-hop reasoning.
Recall@K, MRR, NDCG, and MAP, with p50 / p95 / p99 latency — the whole curve, not a cherry-picked number.
A vault red-team probes for leaks, a decay A/B proves forgetting helps recall, and temporal tests verify point-in-time history.
Mnemos is the only memory layer that's a true on-device knowledge base — not a hosted API or a bare vector store.
| Mnemos | DIY (vector DB) | No memory | |
|---|---|---|---|
| Runs fully on-device | ✓ | ◐ | ✓ |
| Seven-component memory model | ✓ | ✗ | ✗ |
| Bi-temporal facts (time-travel) | ✓ | ✗ | ✗ |
| Hybrid retrieval + rerank | ✓ | ◐ | ✗ |
| Graceful decay & forgetting | ✓ | ✗ | ✗ |
| Encrypted secret vault | ✓ | ✗ | ✗ |
| Apple-native (Vision, EventKit, Touch ID) | ✓ | ✗ | ✗ |
| Recall latency | in-process | in-process | n/a |
| Cost per recall at scale | $0 | $ | $0 |
Patterns Mnemos is built to make trivial.
Core profile, episodic history, and a semantic graph keep preferences, people, and decisions across sessions — not re-explained every morning.
Context scoping and bi-temporal facts let an agent track a launch from kickoff to ship — and answer "what changed since last week" correctly.
Resource memory chunks, embeds, and OCRs PDFs and screenshots, so the agent recalls what's in your documents alongside the conversation.
Extraction and recall can run entirely on local models, and the vault keeps secrets encrypted — ship memory into health, legal, or finance without a data-exfiltration story.
Working on a Mac agent that needs real, durable memory — not a bolted-on vector store? Talk to us about early access, integration, or partnership.
Talk to the team ↗