Master Context Engineering
For engineers whose agents forget, ramble, or blow the window.
The discipline that replaced prompt-tweaking, learned end to end: tokens and budgets, the four operations (write, select, compress, isolate), compaction and memory, cache-aware prompts — threaded through the handbook, labs, tools, papers and system designs.
- Treat the context window as a budget and spend it deliberately
- Apply write / select / compress / isolate to any overflowing agent
- Design compaction, memory and just-in-time retrieval that keep long tasks coherent
- Order prompts so caching slashes latency and cost
The Context Engineering Handbook
The whole discipline in one sitting — read this first, revisit last.
The Tokenizer
What a token actually is — watch BPE build them.
Token Counter
Measure a real prompt: tokens, cost, window fit.
Context Window Visualizer
Watch system prompt, tools, history and RAG fight for one budget.
Context Budget & Cost Planner
Price the window — what every extra segment costs.
Trim History to a Token Budget
Implement the compress operation under a hard budget.
The RAG Handbook
Select: retrieval is how the right knowledge enters the window.
RAG Chunking Playground
Tune chunk size and feel the precision/noise tradeoff.
Design an Agent Memory System
Write: persist state outside the window, recall it on demand.
MemGPT
The OS view — context as RAM, storage as disk, the model as memory manager.
The Agent Skills Handbook
Isolate expertise: progressive disclosure, productized.
The Loop Engineering Handbook
When the loop compacts, spawns sub-agents, and re-reads notes.
Design ChatGPT
Context engineering at planet scale — rebuilt every turn, cached by prefix.
Models stopped being the bottleneck; what you feed them became it. This path takes you from "what is a token" to designing the memory architecture of a long-running agent — the full context-engineering curriculum, in the order the ideas actually build on each other.
You start by making the budget tangible (tokenizer, counter, visualizer), then learn the four operations from the handbook, then go hands-on with each: trimming under a budget, selecting via retrieval and chunking, persisting with memory systems, and isolating with skills and sub-agent patterns. It ends at planet scale — how ChatGPT itself rebuilds context every single turn.