Skip to main content

Why Memory?

Without memory, every session starts fresh. Your agents forget everything. With memory:
  • Continuity — Pick up where you left off
  • Learning — Build on previous work
  • Coordination — Share context between agents

Memory Structure

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

Querying Memory

# Search across all memory
squads memory query "competitor analysis"

# View specific squad memory
squads memory show research

# List all entries
squads memory list

Memory in Action

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

Writing Good Memory

Memory files are markdown. Keep them structured:
<!-- .agents/memory/research/analyst/state.md -->

# Research Analyst Memory

## Current Focus
Q1 2025 market analysis for enterprise AI agents.

## Recent Work
- Completed competitive analysis (Jan 15)
- Identified 3 new market entrants
- Pricing research in progress

## Key Findings
- Market growing 15% YoY
- Main competitor raised Series B
- Enterprise buyers want transparency

## Blockers
- Need access to Gartner reports
- Waiting on customer interview data

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

Memory Types

Agent Memory

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

Squad Memory

Shared across agents in a squad:
  • Domain knowledge
  • Coordination state
  • Team decisions

Best Practices

Run squads memory update <squad> after significant work.
Stale memory is worse than no memory. Prune outdated info.
Use the same sections across agents for predictability.
Memory isn’t a log file. Store insights, not events.

Next Steps