Concepts

Memory types

Engram models three memory types drawn from cognitive science. Each type has distinct retention characteristics, retrieval priority, and expected content shape. Pass the correct type to ensure the right memories surface at the right time.

type: episodic

Episodic

What happened

A timestamped record of something the agent did, saw, or decided. Episodic memories form the agent's lived history, ordered events that can be replayed or reasoned over.

When to use: Log task outcomes, user interactions, errors encountered, and any event where 'when' and 'what happened' matter.

examples
"Ran payroll reconciliation for March 2026. 47 records matched. 0 exceptions. Duration: 8.2s"
"User rejected the first draft. Requested shorter paragraphs and no jargon."
"API call to CoinGecko failed with 429. Retried twice. Succeeded on third attempt."
type: semantic

Semantic

What's true

Durable facts, preferences, and world-knowledge the agent has accumulated. Unlike episodic memories, semantic memories are atemporal; they represent stable truths rather than events.

When to use: Store user preferences, configuration facts, known entities, and any knowledge the agent should treat as ground truth.

examples
"User's primary wallet: 0x9f...a1. Confirmed twice by user."
"Company timezone: Europe/Berlin. Payroll cutoff: last Friday of the month."
"Base is an L2 blockchain built on the OP Stack, secured by Ethereum."
type: procedural

Procedural

What it learned to do

Learned workflows, refined methods, and skill-like instructions the agent has figured out through experience. Procedural memory lets agents accumulate operational intelligence rather than rediscovering it each session.

When to use: Store step-by-step workflows, prompt templates that worked, and multi-step procedures refined over time.

examples
"To reconcile invoices: (1) fetch from ERP, (2) match by PO number, (3) flag unmatched, (4) post summary to Slack."
"Best way to summarize research: extract claims → verify sources → rank by confidence → write 3-sentence summary."
"When user asks about DeFi: always cite risk. Never recommend specific protocols."