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 & Check Before Editing. engrams prime loads active playbooks and focus at session start. Before modifying or creating files, engrams advise <paths> returns matching playbooks, contracts, and pattern rules in ~1ms.
  2. Log decisions as they happen. engrams decision log --contract "..." records choices while the reasoning is fresh—not at session end.
  3. Wire it in. engrams link add connects new items with implements, depends_on, or supersedes so retired decisions step aside automatically.
  4. Track the work. engrams progress log records task state so future sessions know where work stands.
  5. Close & Export. engrams session close tallies guided retrievals and surfaces new playbook prompts for human review, and engrams export writes clean Markdown to engrams_export/ for Git.

Four jobs

It compounds — real numbers

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

23
nodes · day 1
71
nodes · day 26 (v0.9)
318
nodes · v0.17 today

From 1 link on Day 1 to 808 edges and 3 active playbooks in v0.17.0: what started as simple fact lookup now guides edits automatically before a file is even opened.

ConventionsEvery 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.