The model has no memory. Everything it knows on any turn is something you put in the request. The API is stateless — there is no conversation on the server, no "it remembers."
This has a liberating consequence: whoever controls the context controls the agent. A mediocre model with excellent context beats a brilliant model fed garbage. Context engineering is the highest-leverage skill in this entire field, and it is almost entirely under your control.
Context = system prompt (who the agent is + project rules) + history (what has happened) + fetched material (files, search results) — assembled fresh for every request, within a fixed token budget. Your job is to spend that budget well.
The walkthrough
Each part adds one capability to the same growing codebase, and each is a runnable checkpoint.
- 01Assembling the system promptStatic identity plus dynamic facts, composed per request.
- 02Owning the whole context windowWhy representation is a design choice, not a detail.
- 03AGENTS.mdRules the agent reads itself — walk up the tree, nearest wins.
- 04Token budgetsDecide in advance what each part of the context is allowed to cost.
- 05CompactionSummarize old turns without losing the decision the next step depends on.
After this week you can
- Assemble context deliberately instead of appending blindly
- Give an agent project-specific rules it discovers on its own
- Compact long sessions without breaking continuity