Engrava

The memory database for AI agents.

Graph memory, hybrid search, and a tamper-evident audit trail.
Runs on SQLite. No server. No LLM.

$ pip install engrava

Building a serious AI agent means dealing with memory.

Vector databases don’t understand knowledge structure. Graph databases require Neo4j. Memory frameworks LLM-extract everything into noise — 97.8% junk in one production audit (Mem0 issue #4573).

Engrava is different.

Quick start

Two calls: remember to store, recall to search. Auto-embed. No IDs, no vector plumbing.

import asyncio

from engrava import SqliteEngravaCore


async def main():
    # from_config opens and owns the connection (schema + PRAGMAs applied).
    async with await SqliteEngravaCore.from_config("engrava.yaml") as store:
        # Store a memory in one call — no IDs, no record to assemble.
        await store.remember("User prefers concise answers")
        await store.remember("User works in Berlin")

        # Hybrid search: FTS5 + vector + recency + priority + graph.
        result = await store.recall("what does the user prefer?")
        for thought_id, score in result.results:
            print(score, thought_id)


asyncio.run(main())

Full API reference in the docs.

What you get

Twelve primitives. One pip install. No services, no credits, no egress.

Why engrava.

The memory database for AI agents — not a layer over someone else’s store. Engrava ships graph memory, hybrid search, background consolidation, and a tamper-evident audit trail in one pip install. No services to run, no credits to budget, no data leaving your Python process.

Built from two years of cognitive-architecture research. MIT-licensed.

How engrava compares

Graph-first. Self-host. Zero egress. Everything else in one pip install.

Feature Engrava Mem0 Zep / Graphiti ChromaDB
Action Records
MindQL query language Cypher
Tamper-evident audit
Deterministic consolidation ✓ no-LLM LLM-based LLM-based
Graph memory ✓ embedded managed only built-in (Graphiti)
Hybrid search ✓ vector
All-in-one stack memory only memory only vector only
Embedded, no service ✓ single file ✗ (managed SaaS) ✗ (separate server)
Lifecycle mgmt
License MIT Apache Apache Apache
Pricing $0 Hobby free; Starter $19; Growth $79; Pro $249/mo Free 1K credits; Flex $125/mo, Flex Plus $375/mo (credit-based) $0

Pricing verified 2026-06-04 via vendor sites. Subject to change.

Why Engrava over managed alternatives?

  • The bundle is the point. A real query language, a tamper-evident journal, thought→action records, and a typed graph — individually these exist elsewhere, but no other library ships all of them in one pip install, no orchestration, no multi-service wiring.
  • Deterministic, not a black box. Consolidation runs on fixed signals and gates — no LLM silently rewriting your memory, no hallucinated metadata. You can reproduce every decision and audit it after the fact.
  • One file, truly embedded. Mem0's open-source SDK no longer ships a graph — its self-host path is a separate server; Zep's graph runs through Graphiti. Engrava: a typed 7-edge graph in a single SQLite file, no daemon, no model download, no LLM key for the core.
  • Your data stays put. Managed services round-trip every memory op over the network. Engrava runs in your process — no data leaves.

How dreaming works

Every thought in Engrava has a score. Engrava computes it from five signals — recency, staleness, confirmation, confidence, and frequency — then passes them through gates — a minimum-confirmations check, a promotion threshold, and a per-cycle cap — to decide what gets promoted and consolidated.

Runs without LLMs. Deterministic. Configurable in YAML.

Read the full story →

Install & configure

One pip install. Optional extras for embedding backends. One YAML file for the rest.

Install

# Basic
pip install engrava

# With local embeddings (sentence-transformer)
pip install engrava[embeddings-local]

# With OpenAI-compatible embeddings (OpenAI, Azure, Groq, vLLM, LiteLLM)
pip install engrava[embeddings-openai]

# Alt: Ollama (local LLM server) or HuggingFace Inference API
pip install engrava[embeddings-ollama]
pip install engrava[embeddings-hf]

Configure — engrava.yaml

# engrava.yaml
database:
  path: "./agent.db"

embeddings:
  provider: "sentence-transformer"    # or "openai-compatible", "ollama", "huggingface"
  model: "all-MiniLM-L12-v2"
  auto_embed: true

extensions:
  dreaming:
    enabled: true
    promote_threshold: 0.75
    signals:                # name -> weight (sum ~1.0)
      recency: 0.25
      staleness: 0.20
      confirmation: 0.20
      confidence: 0.15
      frequency: 0.20
    gates:
      min_confirmations: 2
      max_promoted_per_run: 20

journal:
  enabled: true   # tamper-evident audit log (SHA-256 hash chain)

Full configuration reference in the docs.

Built from research.

Engrava was extracted from research at Sovantica on cognitive architectures for AI agents — what kinds of memory, attention, and consolidation a long-running agent actually needs to operate beyond a single session. After two years of development — 2,696 tests, 269 source files — the persistence layer proved useful enough to ship standalone.

The dreaming algorithm isn't a metaphor. It's grounded in memory consolidation research. The audit trail isn't a feature. It's how you debug an agent that thinks.

Built on foundations from sleep consolidation, hippocampal pattern separation, and predictive coding. Read the full story →