Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Knowledge

Knowledge represents reusable patterns and learnings that transcend individual tasks.

CLI Usage

# Create knowledge
engram knowledge create \
  --title "PostgreSQL Connection Pooling" \
  --content "Use r2d2 pool for PostgreSQL connections. Max 10 connections per worker." \
  --type pattern

# Knowledge types: fact, pattern, rule, concept, procedure, heuristic

# List knowledge
engram knowledge list
engram knowledge list --type pattern

# Inspect/update/delete
engram knowledge show <KNOWLEDGE_ID>
engram knowledge update <KNOWLEDGE_ID> --content "Updated guidance"
engram knowledge delete <KNOWLEDGE_ID>

Types

TypeDescription
factVerifiable statements
patternRecurring solutions
ruleConstraints or requirements
conceptDomain definitions
procedureStep-by-step processes
heuristicGuidelines based on experience

Decay, Usage, and Citations

Knowledge entities track freshness and usefulness metadata:

FieldMeaning
usage_countNumber of times the knowledge item has been referenced
citation_countNumber of inbound citations/relationships
last_used_atLast time the knowledge was used
decay_weightOptional exponential decay score, clamped between 0.0 and 1.0

Refresh decay metadata with:

engram health refresh-decay --lambda 0.01

A lower decay weight indicates older or less recently used knowledge. Agents should prefer high-confidence, highly cited, recently used items when multiple knowledge entries conflict.