Open Source · Apache-2.0 · v0.12.0

The self-sufficient architecture graph
your AI agent actually trusts.

Stop burning 15,000 tokens on defensive file reads. Engrams embeds interface contracts, code topology, and live Git drift into a local knowledge graph — so your AI can plan, verify, and design with architectural precision before opening a single file.

The hidden tax

Stop paying the 15,000-token file reading tax

When agents distrust incomplete context, they open files defensively. Reading 10 source files just to inspect an adapter shape burns 100k+ tokens before writing a single line of code.

Without engrams
With engrams v0.12.0

Agent opens 10+ source files (50k–150k tokens) to inspect behaviors, types, and callback names

engrams brief serves exact interface contracts and symbols in <200 tokens — zero file reads required

Querying system_user_id misses systemUserId in code, prompting a desperate full-table context dump

Cross-convention FTS matches snake_case, camelCase, and kebab-case transparently

Empty search returns [] — agent assumes no architecture exists and creates a duplicate system

Miss-Guidance steers the agent to top tag clusters, recent decisions, and graph hubs instead of a dead end

Agent assumes stale 6-month-old decisions are current and builds on outdated assumptions

Git-backed Staleness Drift detects if anchored files changed at HEAD (stale: true/false)

Unmeasured memory — no way to know if context is helping or how many reads were saved

engrams usage and session close track exact retrieval counts, zero-hit queries, and token ROI

The difference

A database answers. An advisor anticipates.

Query tools wait for you to ask the right question. Engrams builds enough architectural context to guide your agent before it writes code.

It embeds the contract

Decisions don't just state intent — they embed exact callback signatures, struct shapes, and error tuples via --contract. Strategy formation never dead-ends.

It catches code drift

Lightweight Git staleness scoring tells your agent whether anchored source files were committed after a decision was logged. Trust is verified, not assumed.

It guides empty searches

Zero-hit queries don't return dead ends. Engrams analyzes your knowledge graph and returns the nearest tag clusters and graph hubs so agents re-target immediately.

For you

Three commands you'll actually run

Your agent does the remembering. You get the briefing.

$ engrams prime
{"briefing": "3 active threads, 1 blocked…",
 "relevant_decisions": [ … ]}

prime — the morning briefing

One command rehydrates everything relevant to what you're about to touch. Start every session informed, not cold.

Briefing commands →
$ engrams brief "payment adapter"
{"contract": "fn process(amount: u64) -> Result<Receipt, Error>",
 "symbols": ["StripeAdapter", "process", "refund"],
 "drift": {"stale": false, "checked": 2}}

brief — the architectural brief

One-call composite read: contracts, docstrings, symbols, anchors, and Git drift in under 200 tokens.

Strategy retrieval →
$ engrams session close --pr 42
{"closed": true,
 "reads_skipped_estimated": 14,
 "tokens_saved_estimated": 70000,
 "pr_validation": {"gate_ok": true}}

session close — PR gate & token ROI

Close sessions with enforced PR linkage gates and track the reads your knowledge graph made unnecessary.

Session close & ROI →
Proof, not promises

Drag engrams' own memory around

Every node is a real decision or task from building this tool. Gold nodes are decisions; the bright ones are the load-bearing few everything else depends on.

Decision Pattern Progress
Loading graph…
Drag to orbit · scroll to zoom · click a node to inspect it

And this is just the knowledge layer — the full graph, with code topology and git-derived links, spans 1,273 edges across 81 code nodes and 142 memories.

Strategy-First Protocol

The strategy-first loop

  1. 1

    Formulate

    prime and brief assemble the complete architecture strategy in <200 tokens before touching files.

  2. 2

    Verify

    advise and Git drift check rules, constraints, and staleness before editing code.

  3. 3

    Escalate

    Open files only if the graph lacks contracts, and immediately write back what you learned.

  4. 4

    Close

    session close validates PR linkage, connects the graph, and records token ROI. Repeat.

How the advisor works →

Start your graph tonight.
Feel the difference in a week.

cargo install engrams-cli

or brew install stevebrownlee/tap/engrams