Midas
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
The local memory layer for long-horizon AI agents — remembers across sessions, keeps what's current, and won't act on stale memory. No LLM at ingest · $0 per message · fully local · every recall traces to its source.
Your AI assistant forgets everything between sessions. **Midas is the memory that lives next to it, on
your machine.** Your coding agent remembers the decisions, conventions, and bugs from three sessions
ago — without piping every message through an LLM to "extract" facts. It costs **nothing per message**,
**nothing leaves your computer**, every memory **traces back to the exact turn it came from**, and it
**won't let an agent act on memory that's stale or never confirmed**.
Install in your agent
·
See the benchmarks
·
Complete overview
·
Roadmap
---
Why Midas
Most memory tools call an LLM to summarize every session — so you pay in tokens forever, add latency,
ship every turn to a provider, and get back *rewritten* facts you can't audit. Midas makes the opposite
bet, and that bet is what makes it cheap, private, and trustworthy:
- **$0 and private by construction.** No LLM at ingest or query → no API spend, nothing leaves your
machine, fast local ops (~tens of ms, no per-turn network round-trip).
- **You can trust what it recalls.** Recall returns the **verbatim source turn**, not an LLM rewrite —
so there's no extraction step that can silently hallucinate a "fact" you never said.
- **It stays current on its own.** Typed belief revision supersedes the old value instead of piling up
duplicates; selective forgetting keeps it bounded — all with no LLM.
- **It's safe to build on.** A provenance **guard** lets memory inform planning but **blocks
memory-justified external or destructive actions** unless you explicitly confirmed them — and a
*superseded* memory can't authorize an action at all.
- **One file, many tools.** Point Claude Code, Cursor, and your chat app at one SQLite file and they
share one live memory.
- **Proven, not asserted.** Every claim has a reproducible benchmark — *including the experiments that
failed.*
How Midas compares
Every Midas number below is measured and reproducible from this repo; the LLM-at-ingest column
reflects the structural properties of that design class (Mem0, Zep, Hindsight) and the figures
documented in BENCHMARKS.md.
| | **Midas** | LLM-at-ingest systems (Mem0, Zep, Hindsight) |
|---|---|---|
| LLM calls at ingest | **0** | ≥1 per session |
| Cost per message | **$0** | per-token API spend, forever |
| Data egress at ingest | **None** | every turn leaves the box |
| Ingest latency | **~16–116 ms**, local, embed-bound | ~668 ms + API round-trip |
| Recall returns | **verbatim source turn**, traceable | LLM-rewritten facts (source recall@k not computable) |
| Deterministic & reproducible | **yes — every number, one command** | no |
| Works fully offline | **yes** (measured end-to-end with a local Ollama reader) | no |
| LongMemEval-s judged answer (gpt-4o) | **0.84** | 0.84 — Observational Memory, with LLM ingest |
| Whole-conversation aggregation / summarization | ❌ **by design** — top-k retrieval can't cover it (documented) | ✅ their structural edge |
The last row is deliberate: Midas trades whole-conversation abilities for $0, privacy, and
auditability, and publishes the measurements that show exactly where that trade bites.
More than recall: a memory you can govern
Finding a buried fact is table stakes. A long-horizon coding agent needs memory it can **act on
safely** and **resume from cleanly** — which is where similarity search alone falls short:
| You ask… | Midas answers with | Why top-k recall can't |
|---|---|---|
| *"Can I run this destructive migration?"* | **Guard**: allowed only if **you** confirmed it, and only if that confirmation is still current | provenance + currency aren't a similarity match |
| *"What's the current state of project Apollo?"* | **memory_state**: the live, non-superseded decisions / constraints / facts | a broad "current state" query matches no single turn |
| *"What changed since our last session?"* | **memory_diff**: beliefs added, and beliefs revised (old → new) | "what's new" isn't a content query at all |
| *"How do I speed up the transactions list?"* | the **prior fix** resurfaces, so the agent doesn't re-diagnose it | — |