open-source memory layer for ai agents · apache-2.0

Memory that
knows when.

Four retrieval rivers — word, meaning, relation, time — meet in one confluence. Facts are superseded, never deleted. One SQLite file. Zero infrastructure.

how it works ↓
shabda शब्द · word
artha अर्थ · meaning
sambandha सम्बन्ध · relation
kala काल · time
sangama संगम · the confluence
scroll ▾
what you're looking at

Four rivers, one answer

Every query runs four cheap retrieval channels in parallel — BM25 over words, vectors over meaning, an entity-graph hop over relations, date proximity over time — and fuses them with reciprocal rank fusion. The bright stream after the confluence is the fused ranking; the periodic pulse is a recall event. The pairs flickering in the depth are badha — supersession: when a fact changes, the old one is invalidated with a timestamp and a pointer to its successor, never erased. "Where do I live?" and "where did I live before June?" are both answerable from one store.

1 sqlite file · no postgres, no docker, no binary ~2k lines, readable in a sitting 74 offline tests · no keys needed benchmark harness included

laghuलघु · lite

Zero LLM calls at write time. Episodic ingest plus four-channel fusion retrieval. Fully offline, near-zero cost — the default for high-volume agents.

purnaपूर्ण · full

One extraction call per session turns experience into atomic facts; write-time conflict resolution supersedes what changed. Where temporal accuracy comes from.

drishtiदृष्टि · profiles · new in 0.2.0

One store, many ways of looking at it. The four rivers are individually switchable, and named profiles — facts · relations · timeline · deep — shape retrieval per query. Each ships with the A/B evidence that justified it: others ship knobs, SMRITI ships tuned policies with receipts.

mcpplug into any agent

One command: smriti-mcp --db memory.db. Six typed tools give Claude Code, Cursor, or any MCP agent persistent, auditable memory — and the read tools take profile and channels, so agents shape recall per call.

hardenednew in 0.3.0

Production seatbelts, zero new deps. WAL durability · idempotent ingestion (replaying a session is a no-op) · opt-in secret redaction before anything persists · unicode lexical search — Devanagari and CJK reach the index too.

yoursdata ownership · 0.3.0

Owner-initiated erasureerase_session / erase_entity cascade everywhere, distinct from supersession, and deliberately unreachable from agent conversations. Plus entity aliases and lossless export/import: backup, restore, and leave — it's your file.

run it in two minutes

No account. No cloud. No config.

# clone & install
git clone https://github.com/vn-envy/Smriti && cd Smriti && pip install -e .

# 52 offline tests — no network, no keys
python -m pytest tests/

# watch supersession (badha) live
python examples/quickstart.py

# your own benchmark number, fully local
python -m bench.run --bench longmemeval --data data/longmemeval_oracle.json \
  --mode laghu --limit 50
ship log

Three releases in two days

Launch feedback goes in, code ships out — each release gated by the offline suite, every retrieval change by a fixed-judge A/B. Full details: GitHub releases · CHANGELOG.md.

v0.1.0the substrate

Bi-temporal facts with supersession (badha) · four-channel hybrid retrieval fused with RRF · lite and full modes · MCP server · the LongMemEval/LoCoMo harness so you grade us on your data.

v0.2.0drishti · दृष्टि

Agile retrieval. The four rivers become switchable channels; named profiles — facts · relations · timeline · deep — shape recall per query, each shipping with the A/B evidence that justified it. Profile-aware MCP tools.

v0.3.0hardened

Production seatbelts. WAL durability · idempotent ingestion · owner-initiated erasure with full cascade · entity aliases · lossless export/import · opt-in secret redaction · unicode search · 74 offline tests, zero new dependencies.

named by the tradition that invented the theory of memory

anubhava → samskara → smriti

Nyaya's account of memory — experience leaves impressions; recollection arises from them — is this pipeline. And Vedanta's badha (sublation: a later cognition invalidates an earlier one without erasing that it occurred) is the precise, 2,000-year-old name for supersession.

अनुभव anubhava─▸ग्रहण grahana─▸संस्कार samskara─▸बाध badha─▸स्मरण smarana─▸संगम sangama─▸प्रसंग prasanga experience → extraction → fact store → supersession → recollection → confluence → packed context. Full lexicon and the reasoning behind every term: NOMENCLATURE.md.