engram-lite
Local memory for AI agents, served by persona, domain, and task. Survives restarts. One machine, many agents.
Most agent memory is a shared pile: every agent gets the same top-k for the same query. In our benchmark (methodology below), an agent fed flat shared memory hallucinated more than an agent given no memory at all. Serving each agent the memory that fits who it is (its persona, its domain, the task in front of it) doubled task success (40% to 80%) and cut hallucination to a third.
And the memory layer never calls an LLM. On LoCoMo — the long-conversation memory benchmark — engram-lite scores J 68.3 with zero LLM calls and $0 to build the memory. The protocol, footnotes, and the full comparison against the leading LLM-based memory systems live in benchmarks/locomo/.
engram-lite is that serving layer, small enough to run on your laptop:
- Conditioned serving. Register a profile per agent (persona / domain / scope). The same question serves your on-call SRE agent the alert, the trace, and the mitigation runbook, and serves your release agent the deploy, the rollback, and the freeze policy. Out-of-lane questions correctly serve nothing.
- Restart-proof. Everything is stored in a single SQLite file. Your agent can restart tomorrow and pick up exactly where it left off.
- Self-cleaning. A salience gate skips junk (code, command output, questions). New facts are de-duplicated, updates supersede old versions, stale facts expire, and the store stays bounded.
- Zero infrastructure. No server, no cloud, no accounts, no telemetry. SQLite plus a local embedding model.
pip install and you are running.
- Explainable forgetting. Every drop, merge, truncation, and abstention is recorded with the rule that fired (
Memory.decisions()). "Why don't you remember X?" has an answer — something an LLM-written memory can't give you, because its keep/drop decisions live inside model weights.
- Deterministic and replayable. Same transcript in, same memory out — byte-identical across rebuilds. Memory failures can be diffed, bisected, and regression-gated like any other bug.
- Plugs into what you build with. A Hermes memory provider, a Claude Code plugin, an OpenClaw plugin, or three lines of Python — all sharing one store, each agent served its own lane.
engram-lite is single-machine by design. A team/hosted edition, engram-core, is in development — reach out if that is what you need.
Install
pip install engram-lite
On a Mac with Homebrew Python (externally-managed-environment error), use pipx install engram-lite or a virtualenv. Installing for a Hermes agent? Skip this — hermes memory setup installs it into Hermes's own environment automatically.
Or Docker (memory persists in the named volume):
docker build -t engram-lite .
docker run -it --rm -v engram-data:/data engram-lite demo
60 seconds: see conditioned memory work
python examples/restart_demo.py # two agents remember
python examples/restart_demo.py # run it AGAIN: memory survived, and the same
# question serves each agent different memory
Use it from Python
from engram import Memory
mem = Memory("~/.engram/memory.db", origin_tool="oncall_sre")
# who is this agent? (this is what makes serving conditioned)
mem.register_profile(
"oncall_sre", persona="on-call SRE", domain="sre-devops",
scope_tags=["alert", "incident", "latency", "trace", "mitigation", "db"],
)
mem.remember("Alert PAGE-99 fired: payments p99 latency at 2.3s") # gated save
# conversational input? pass who said it and when — every extracted fragment
# keeps the anchors, and relative dates resolve to absolute ("last Friday"
# becomes "[= Friday, 5 May 2023]") with calendar math, no LLM:
mem.remember("The pool was resized last Friday. We watch it daily now.",
speaker="Raj", when="8 May, 2023")
hits = mem.search("what is going on with payments?",
agent="oncall_sre", task_tags=["incident", "latency"])
for h in hits:
print(h["value"], h["promotion"]["lane"]) # every result explains WHY it was served
No profile registered? search() is plain hybrid retrieval (keyword + vector + RRF), so you can adopt gradually.
Plug into a Hermes agent
Three steps on any machine with Hermes installed:
# 1. put the engine in Hermes's environment
pip install engram-lite
# 2. install the memory plugin
hermes plugins install engrammemory-labs/engram-lite/hermes-plugin/engram
# 3. activate and configure it
hermes memory setup # choose "engram", answer one question — what is this
# agent? (e.g. "DevOps engineer") — everything else is
# derived; leave it empty for plain memory