agents
Glossary ↗Context Engineering
Context engineering is the discipline of deciding exactly what goes into a model's context window at each step of an agent's run — which instructions, retrieved documents, past messages, tool outputs, and examples — and in what form. It's the natural successor to prompt engineering: once an agent runs over many turns, the hard problem shifts from wording one prompt to managing an ever-growing pile of context without blowing the token budget or drowning the model in noise. Techniques include retrieving only relevant chunks, summarizing or compacting old turns, trimming stale tool results, and ordering information so the most important parts sit where the model attends best. For builders, this is where agent quality is won or lost: models degrade when context is bloated or irrelevant, so more context is not better context. Treat the window as scarce, curated memory, and measure how each addition affects output rather than dumping everything in.
Related terms