AI Agent Memory & Knowledge

Engram

Knowledge compiler and query engine for AI agent memory

AI agents forget everything between sessions. Engram transforms Markdown files with YAML frontmatter into a BM25-searchable index with multi-tier caching, causal graph traversal, temporal queries, and governance controls. One knowledge base powers all your agents.

513
Integration tests
6
Rust crates
4
Query tiers
19
Frontmatter fields
The Challenge

AI agents have
no persistent memory

When AI agents operate across sessions, projects, and teams, they lose context constantly. Every conversation starts from zero. Institutional knowledge stays trapped in individual interactions, never compounding into organizational intelligence.

No persistent context

Each agent session starts blank. Prior decisions, context, and accumulated knowledge vanish the moment a session ends.

No structured retrieval

Even when context exists in files, agents have no way to search, rank, or retrieve the most relevant knowledge for a given query.

No causal reasoning

Agents cannot trace cause-and-effect chains across knowledge entries. Understanding why something happened requires manual reconstruction.

No access governance

Any agent can access any knowledge. No per-agent, per-domain, or per-operation access controls exist to protect sensitive organizational context.

Capabilities

Six layers of intelligence

Every query flows through a multi-tier pipeline. Each tier adds progressively deeper understanding.

Knowledge Compiler

Parses Markdown with YAML frontmatter, validates 19 structured fields, and compiles into a Tantivy full-text search index. Watch mode enables incremental compilation as knowledge evolves.

Multi-Tier Cache

Exact match cache (MD5, 60s TTL), fuzzy cache (Jaccard similarity at 0.6 threshold), and generation-aware invalidation ensure fast, consistent query responses.

BM25 Search

Multi-field search with configurable boosts — title 3x, tags 2x, domain tags 1.5x. Compound scoring combines BM25, confidence, importance, and recency.

Causal Graph

Traverses cause-and-effect relationships up to 6 hops deep. Triggered automatically by causal signal words like 'caused by', 'leads to', 'why did'.

Temporal Queries

CurrentState, SinceTimestamp, and EventHistory patterns. Automatically triggered by keywords like 'current', 'latest', 'since', and 'history'.

LLM Synthesis

Opt-in Tier 3 that fires when search scores fall below threshold. Synthesizes answers from retrieved knowledge using Claude, with full governance controls.

Architecture

Query pipeline

Every knowledge query flows through a deterministic, cached, and auditable pipeline — from exact match to LLM synthesis.

Query Input
Natural language or structured
Bulwark Policy
Access control & governance
Tier 0: Exact Cache
MD5 fingerprint, 60s TTL
Tier 1: Fuzzy Cache
Jaccard similarity, 0.6 threshold
Tier 2: BM25 Search
Multi-field with boosts
Tier 2.5: Causal + Temporal
Graph traversal & event history
Tier 3: LLM Synthesis
Opt-in, Claude-powered

Each tier short-circuits when a high-confidence result is found — most queries resolve at Tier 0 or 1.

Integration

Three modes, any agent

Engram adapts to your agent workflow. Direct CLI, Claude Code plugin, or existing ByteRover corpora — one knowledge engine handles all.

ModeInterfaceUse Case
CLI Directcompile / query / curateLocal development, CI pipelines
Claude Code PluginHook-based (UserPromptSubmit)Auto-retrieval on every prompt
ByteRover CorpusTransparent field aliasingExisting knowledge bases
Under the hood

Built in Rust, 6 crates

A modular Rust workspace where each concern is its own crate — knowledge compilation, query execution, governance, and agent integration.

engram-core/
Schema, parsing, and validation
engram-bulwark/
Policy engine and audit log
engram-compiler/
Indexing and compilation
engram-query/
Search, caching, causal/temporal
engram-openclaw/
Plugin interface, context formatting
engram-cli/
Binary entry point and commands
Our Approach

How Honto
engineered Engram

Engram represents Honto's commitment to AI systems that compound knowledge over time. Every design decision prioritizes retrieval accuracy, query performance, and governance.

01

Knowledge Modeling

Defined 19 structured frontmatter fields covering fact types, confidence levels, causal links, temporal metadata, and domain tags.

02

Multi-Tier Pipeline

Designed a query pipeline that balances speed and depth — exact cache for repeated queries, BM25 for discovery, causal graphs for understanding.

03

Modular Rust Workspace

6 independent crates, each owning a capability boundary. 513 tests across 16 integration files ensure correctness at every layer.

04

Open-Source Release

Built to be transparent, extensible, and community-driven. Full compatibility with existing ByteRover knowledge corpora.

Need persistent memory
for your AI agents?

Engram is open-source and ready to deploy. For enterprise knowledge systems, custom ontology design, or integration support — Honto's engineering team is here to help.