For Your Agent

Engrams only becomes an advisor if the agent keeps the graph fed. This section documents the agent's side of the partnership: the commands it runs to store what it learns, connect what it knows, retrieve context before acting, and keep the graph healthy over time.

Day 1, engrams can only fetch — the graph is nearly empty. Every decision logged, every link asserted, every progress entry compounds. As the graph densifies, prime, relevant, and doctor shift from retrieval to advice. That maturation story is told in The Advisor Loop; this pillar is the machinery that drives it.

The operating loop

The agent runs the same loop every session. Consult first, log as you work, hand off at the end.

  1. Orient. engrams prime loads a token-budgeted briefing at session start. Before editing files, engrams relevant <paths> surfaces every decision and pattern anchored to them.
  2. Log decisions as they happen. engrams decision log the moment a design choice is made — not at session end, when the rationale is already gone.
  3. Wire it in. engrams link add connects the new item to what it implements, depends on, or supersedes. Links are what turn a list into a reasoning web.
  4. Track the work. engrams progress log records task state so the next session knows exactly where things stand.
  5. Hand off. engrams active-context update --patch merges the session's outcome into the named workstream track, then engrams export dumps Markdown for git. Commit engrams_export/ with the code.

Four jobs

It compounds — real numbers

This repository dogfoods engrams. Its own knowledge graph — the one rendered on the landing page — grew from a fetches-only database into a reasoning web in under a month:

23
nodes · day 1
43
nodes · week 1
71
nodes · month 1

29 reasoning links across 26 days of real feature work — policy engine, ontology, schema, search. Day 1 the agent could fetch one fact. By week 4 it could traverse depends_on chains and answer "what breaks if I revisit this?"

Conventions Every command returns JSON. Global flags --db <path> and --workspace <path> go before the subcommand; --compact and --fields <a,b> work on most subcommands to trim output tokens. Entity types use hyphens: decision, progress-entry, system-pattern, custom-data.