Pillar · Persistent Memory

Agents That Remember Every Session.

Decisions, bugfixes, patterns, approaches — captured once, calibrated by outcomes, served in 2–4K tokens instead of 50K raw.

Direct answer

Agents with persistent memory keep what they learn across sessions instead of restarting from zero. Anvaya Mind is a code-native memory engine: a local hybrid graph + vector store (SQLite WAL plus hand-written HNSW) that captures decisions, patterns, bugfixes, and approaches as typed, linked nodes. Six-stage Prism retrieval fuses keyword, semantic, recency, graph, and bug signals; submodular Quorum packing assembles 2–4K tokens under budget; turn outcomes feed a Beta-Bernoulli posterior while per-type decay (Decision λ0.002 → Approach λ0.030) and git drift detection prune the stale. Versus flat CLAUDE.md files (hand-kept, rotting) and generic memory APIs (domain-blind, hosted), Mind is local-first, inspectable under .anvaya/mind/, and served to any agent — Anvaya CLI natively, Claude Code and Cursor over MCP.

How It Works

Capture, Retrieve, Pack, Learn.

Twenty services, one loop: every session makes the next one better.

01Capture — Mnemon ingestionTool calls, edits, test results, and terminal output become typed nodes (Decision, Pattern, BugFix, Approach, Concept, Synthesis) with fingerprints, evidence kinds, and session links. Promotion rules keep noise out: failed tests need files, reverts need corroboration.
02Retrieve — Prism six stagesKeyword FTS plus file and symbol semantic search, recency decay, two-hop graph expansion, and bug-boost on error language — fused with per-node weight and confidence, biased by inferred session intent.
03Pack — Quorum submodularMaximal-marginal-relevance selection under a 2000/4096-token budget across Knowledge/Thread/LowConf sections. Relevance minus redundancy: the top-3 critical nodes plus the best patterns, fixes, and concepts.
04Learn — outcomes calibrateTurn feedback feeds a Beta-Bernoulli posterior per node; Gravitas applies per-type exponential decay (Decision λ0.002 through Approach λ0.030); git drift detection demotes stale nodes. Memory that earns its place stays.

Forgetting on Purpose

Memory That Prunes Itself.

The difference between a knowledge base and a junk drawer is principled forgetting.

01Per-type half-livesDecisions age slowly (≈347 days), approaches decay fastest (30 days). Each type's λ matches how fast that knowledge rots in real codebases.
02Content-anchored driftGit history is the ground truth: when code changes under a node, the node is flagged and demoted — never confidently wrong.
03Outcome calibrationNodes that actually helped get used more; unused ones fade. Corroboration across sessions confirms hypotheses; contradictions supersede without deleting history.

Questions

Asked About Agent Memory.

Q

What are agents with persistent memory?

AI agents whose knowledge survives session boundaries: decisions, bugfixes, patterns, and approaches stored externally and retrieved into future sessions. Without it, every session re-explains the stack; with it, session 50 starts smarter than session 1. Anvaya Mind is a code-native implementation: hybrid graph + vector, local-first, served to any agent over MCP.

Q

How is this different from Mem0 or generic agent memory?

Generic memory APIs store conversation facts for any domain. Anvaya Mind is code-native: LCS dedup of edits, dual file+symbol vector search, git-drift invalidation, test-signal causal threads, and session-outcome calibration. It remembers why a fix worked (with the failing test as evidence), not just that someone said so.

Q

How is this different from CLAUDE.md or MEMORY.md?

Flat files are hand-maintained, grow without bound (MEMORY.md caps ~200 lines/25KB), and assert stale facts until edited. Mind is a weighted, linked, decaying graph: nodes carry confidence and half-lives, contradictions resolve by corroboration, and each query packs only the top few under a token budget — ~1,900 tokens where full replay costs 22K+.

Q

Where is my memory stored?

Locally, under .anvaya/mind/ in your project: SQLite (WAL), a flat HNSW vector index, an append-only temporal log, plain-text config. No cloud sync, no account, gitignored by default. Open the SQLite file directly — no lock-in, documented format.

Q

Which agents can use the memory?

Any MCP client: Anvaya CLI natively (Direct/IPC, sub-millisecond to ~2ms), plus Claude Code, Cursor, Codex CLI, and others via the mind-mcp server's 8 tools (mind_query with 4096-token budget, mind_search, mind_record_change, mind_get_node, mind_stats, session + thread tools).

Stop Starting From Zero.

One binary. 11+9 Rust crates. 545 tests. Hand-written HNSW index. Three transport modes. Four providers, Ollama, Anthropic, OpenAI, Siemens. Zero API keys required to start. Mind remembers everything after the first session.