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

.agents/memory/
├── research/
│   ├── analyst/
│   │   └── state.md
│   └── writer/
│       └── state.md
└── customer/
    └── outreach/
        └── state.md

Memory Types

Agent Memory

Private to each agent. Stores:
  • Task history
  • Learned preferences
  • Work in progress

Squad Memory

Shared across agents in a squad. Stores:
  • Domain knowledge
  • Shared context
  • Coordination state

Managing Memory

# Search all memory
squads memory query "competitor analysis"

# View squad memory
squads memory show research

# List all memory entries
squads memory list

# Update squad memory
squads memory update research

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
<!-- .agents/memory/research/analyst/state.md -->

# Research Analyst Memory

## Recent Work
- Completed competitive analysis on 2024-01-15
- Identified 3 new market entrants

## Key Findings
- Market growing 15% YoY
- Main competitor raised Series B

## Next Steps
- Deep dive on pricing strategies
- Interview customer segment