Memory Layer
The Memory Layer preserves context across sessions, enabling AI agents and humans to resume work without losing track.
Why Memory?
Section titled “Why Memory?”Without memory:
- “What was I working on?”
- “Why did I make this decision?”
- “Where did I leave off?”
With memory:
- Automatic checkpoints capture state
- Session context is recoverable
- Decisions are documented
How It Works
Section titled “How It Works”Session Start ↓mem:ready (check pending work) ↓Work (changes, decisions) ↓mem:checkpoint (periodic save) ↓Session End ↓Next Session: mem:ready (resume)Memory Commands
Section titled “Memory Commands”Initialize
Section titled “Initialize”pnpm mem:initCreates .beacon/memory/ directory for storing checkpoints.
Check Pending Work
Section titled “Check Pending Work”pnpm mem:readyShows what’s in progress and any pending decisions.
Create Checkpoint
Section titled “Create Checkpoint”pnpm mem:checkpointSaves current session state:
- Active WU
- Recent changes
- Decision context
Memory Structure
Section titled “Memory Structure”.beacon/├── memory/│ ├── sessions/│ │ └── 2026-01-18-abc123.json│ ├── checkpoints/│ │ └── WU-042-checkpoint-1.json│ └── decisions/│ └── WU-042-decisions.md├── stamps/│ └── WU-041.done└── locks/ └── core.lockSession Context
Section titled “Session Context”Each session captures:
{ "session_id": "abc123", "started_at": "2026-01-18T10:00:00Z", "active_wu": "WU-042", "lane": "Core", "files_touched": ["src/utils/validation.ts", "src/components/LoginForm.tsx"], "decisions": [ { "question": "Use Zod or custom validation?", "answer": "Zod - better TypeScript integration", "timestamp": "2026-01-18T10:15:00Z" } ]}AI Agent Integration
Section titled “AI Agent Integration”For AI agents, memory is critical:
# Agent starts sessionpnpm mem:start --wu WU-042
# Agent checks what's pendingpnpm mem:ready
# During work, agent signals progresspnpm mem:signal "Completed validation logic, starting tests"
# Agent creates checkpoint before pausepnpm mem:checkpoint
# Later, agent resumespnpm mem:ready# → Shows: "WU-042 in progress, last: 'starting tests'"Decision Logging
Section titled “Decision Logging”Capture why decisions were made:
pnpm mem:decide \ --question "Which validation library?" \ --answer "Zod" \ --reason "Better TypeScript inference, smaller bundle"This creates an audit trail for future reference.
Configuration
Section titled “Configuration”memory: checkpoint_interval: 30 # minutes max_checkpoints: 10 # per WU auto_checkpoint: true # on significant changesBest Practices
Section titled “Best Practices”For Humans
Section titled “For Humans”- Run
mem:readyat session start - Create checkpoints before long breaks
- Log non-obvious decisions
For AI Agents
Section titled “For AI Agents”- Always start with
mem:start - Signal progress frequently
- Checkpoint before context limits
Next Steps
Section titled “Next Steps”- AI Agent Integration – Using memory with agents
- CLI Reference – All memory commands