Skip to main content

Why Memory Matters

Without memory, every session starts fresh. With memory, agents build on previous work. Memory enables:
  • Continuity — Pick up where you left off
  • Learning — Accumulate knowledge over time
  • Coordination — Share context between agents

Memory Structure

The Context Cascade

Memory isn’t a flat key-value store — it’s a layered cascade loaded before every agent execution, in strict priority order. When the token budget runs out, lower layers drop first, so an agent never loses its identity or mission, only the less-critical context underneath it: Not every role loads every layer — scanners get strategy, goals, and their own state (they discover, don’t decide); workers add feedback and active work; leads and evaluators get all seven layers, since they need the full picture to coordinate or judge output quality.

Memory Types

Agent State

Private to each agent ({squad}/{agent}/state.md):
  • Task history
  • Learned preferences
  • Work in progress

Squad Memory

Shared across agents in a squad (goals.md, active-work.md, feedback.md):
  • Measurable targets
  • What’s already in flight
  • The last cycle’s evaluation — what was valuable, what was noise

Managing Memory

Memory in Practice

When an agent runs:
  1. Load — Retrieve relevant memory
  2. Inject — Add to agent context
  3. Execute — Agent works with full context
  4. Update — Store new learnings