Week 14 · Season 4 · Will
A clean desk
You can keep an agent's context small and sharp, give it a long-term memory that forgets on purpose, gate risky actions behind a person's yes, and grade the whole road it takes.
This week
- Context rot and the attention budget
- Squeeze, fetch, delegate: compaction, pointers, sub-agents
- Long-term memory: events, facts, habits
- Human in the loop: go, ask, never
- Trajectory evals
How you learn
Before you write any memory code, measure context rot yourself: plant a note at five depths, ask twenty times each, and chart the recall.
What you build
FRIDAY gets a long-term memory (events, facts, habits) that survives a restart and forgets on purpose, plus an approval gate for risky actions, both proved with trajectory tests.
Stretch: Add compaction to FRIDAY's long chats: squeeze at a threshold, keep pinned rules and tool pairs, and test that a planted rule survives three squeezes.
What you ship
Project 4: The morning briefing. Every morning FRIDAY gathers your calendar, tasks and notes and briefs you, by itself, within budget.
- MEMORY.md, GATE.md and a diagram of the cabinet and the gate
- memory.py and gate.py with trajectory tests that pass in CI
Lessons
- Context rot
After this deck you can explain context rot in plain words, say why a note in the middle of a long context gets missed, and measure it with a plant-a-note experiment.
- Squeeze, fetch, delegate
After this deck you can keep a long-running agent's context small with compaction, fetching on demand and sub-agents, and choose the right habit for a job on a budget.
- Memory that forgets on purpose
After this deck you can give FRIDAY a long-term memory with three drawers (what happened, what's true, how you like things), and decide what gets stored, what gets fetched and what gets forgotten.
- Ask before you act
After this deck you can sort FRIDAY's tools into go, ask and never, design an approval card a person will actually read, and pause a run safely until they answer.
- Grade the path
After this deck you can write a trajectory eval that checks the tool FRIDAY used first, its number of steps, forbidden actions and cost, not just its final answer.
- Go deeper: context engineering
After this deck you can compact a long context safely (a threshold, recent turns kept word for word, tool request and result pairs kept together, notes kept off the desk), and compare memory stores and how they rank what to fetch.
Labs
Python in the browser, next to the lessons.
Weekend build
- FRIDAY, week 14: a clean desk, a memory, and a pause
FRIDAY remembers you between chats, forgets on purpose, and asks before anything it can't take back.
Skills you prove
- Context
- Design the context for a long-running agent: compaction, memory, sub-agents
Free links for this week
Hand-picked official docs, papers and talks.
- Anthropic: Effective context engineering for AI agents · post
- Lost in the Middle (Liu et al., 2023) · paper
- Claude docs: context editing · docs
- Claude docs: memory tool · docs
- Claude Agent SDK: permissions · docs
- Anthropic: How we built our multi-agent research system · post
- τ-bench and pass^k (Yao et al., 2024) · paper