A memory graph designed for the agent that uses it, not the human who feeds it. Engrama reconstructs context from associations on demand, replacing the "stuff everything into the prompt" reflex with targeted graph traversal. SQLite default, Neo4j optional.
README
Graph-based long-term memory framework for AI agents.
Engrama gives any AI agent persistent, structured memory backed by a knowledge graph. Instead of flat key-value stores or opaque vector databases, Engrama stores entities, observations, and relationships — and lets agents traverse that graph to reason about their accumulated knowledge.
Two backends are first-class:
sqlite-vec (default since 0.9) — single file, zero
external services, pip install engrama and you're running.The data model is identical on both. See docs/backends.md for a full decision guide; the rest of this README assumes the SQLite default.
Since 0.13.0, every node and relation is owned by an
(org_id, user_id) identity and reads are fail-closed: a missing or
partial scope matches nothing rather than falling back to "see all". A
single-process install runs as one stable standalone identity and needs
no configuration; a multi-tenant deployment supplies the identity per
request from an authenticating gateway. Each identity can permanently
erase its own memory through the engrama_gdpr_forget tool
(GDPR right-to-erasure). See
docs/security.md.
Inspired by Karpathy's second-brain concept, but built for agents instead of humans — and with graphs inste