Anvaya Mind  ·  THE MEMORY LAYER

Memory ThatCompounds AcrossEvery Session.

A daemon that watches your project and builds a graph of what was decided, what broke, and what pattern held. It runs locally, stores everything under .anvaya/mind/, and hands back a packed context sized to whatever budget you give it. It also exposes that memory to Claude Code, Cursor, or any MCP client through mind-mcp — a memory engine for the agent you already use.

The Shape Of It

Not A File. A Graph.

Six node types, each with its own decay constant. A decision about your auth model should outlive the bug fix you shipped last Tuesday — so it does, by roughly fifteen times.

Decision λ 0.002Why a path was chosen. Half-life ≈ 347 days — decisions age slowly.
Synthesis λ 0.001Insight condensed from several nodes. The slowest to decay.
Pattern λ 0.005A recurring shape in the codebase.
Concept λ 0.008A domain idea the project depends on.
BugFix λ 0.015A specific defect and its resolution. Ages faster — code moves.
Approach λ 0.030A tactic tried. Decays fastest; most are superseded.

Retrieval

Six Stages Between Question And Context.

Every query runs the same pipeline. The expensive part isn’t finding related nodes — it’s deciding which ones still deserve your token budget.

01RecallCandidate nodes are pulled by semantic similarity through the HNSW index and by keyword through SQLite FTS.
02Link expansionTyped edges are walked — causal successors, thread continuations, semantic overlap — to pull in what the seed nodes imply.
03GravitasEach node is scored by exponential decay against its type's λ, combined with a confidence term.
04InvalidationContent anchors are measured against current git state. Nodes whose source has drifted are flagged low-confidence.
05UtilityA Beta-Bernoulli posterior per node, updated from whether past injections were actually used, reweights the ranking.
06QuorumA submodular budgeted pack selects the final set — maximum coverage, minimum redundancy, under your token budget.

Compression

Where The 12-25x Comes From.

Compression is measured per node type against the raw material it replaces. A typical session lands between 12x and 25x — roughly 50K tokens of reading reduced to 2-4K of curated context.

20xA file read, replaced by what was learned from it
16xA decision, against the discussion that produced it
24xA bug fix, against the session that found it
25xA thread, against the sessions it spans

Self-Evolving Memory

Memory That Compounds.

Every session feeds the graph. Every fix, decision, and pattern becomes context for the next. Anvaya Mind builds a living knowledge base that gets smarter, not bigger — six node types, each decaying on its own curve.

S1
Blank Slate

Mind is empty. Every query requires full file reads — no different from any other AI tool.

S5
Early Memory

First bug fixes and decisions captured. Mind starts saving re-reads. Context retrieval begins working.

S20
Pattern Recognition

Causal threads form. Mind's inference engine connects related decisions across sessions.

S50+
Senior Engineer Threshold

Mind knows every major decision, every failed approach — and lets stale ones decay automatically. Your AI is project-aware from turn 1.

Storage

Everything Local, Everything Inspectable.

One directory inside your project, gitignored by default. SQLite in WAL mode for nodes, links, sessions and full-text search; a separate file for the Int8-quantized HNSW index. Six background workers keep it consolidated.

.anvaya/mind/mind-daemon
├── mind.db        nodes, links, sessions, FTS
├── mind.vectors   HNSW index (Int8-quantized)
├── mind.sock     JSON-RPC over a Unix socket
├── mind.log      append-only temporal log
└── config.json   your overrides

Stop Starting From Zero.

One binary. Four providers — Ollama, Anthropic, OpenAI, Siemens. Zero API keys required to start. Mind remembers everything after the first session.