AI Glossary

Context engineering

Agentic AIPublished By Simon Budziak

Context engineering is the discipline of deciding exactly what goes into a language model's limited context window on a given call: the system prompt, retrieved documents, conversation history, and tool results, curated deliberately rather than dumped in wholesale, so the model reasons from signal instead of noise.

How is context engineering different from prompt engineering?

Prompt engineering optimizes the instructions you write; context engineering optimizes everything else that lands in the window alongside them, retrieved documents, prior tool results, conversation history. It is the wider discipline that prompt engineering sits inside, not a replacement for it.

Why does it matter more for an agentic system than a single chat turn?

A one-shot chat call builds its context window once. An agentic AI system rebuilds its context on every step of a multi-step run, deciding what to keep, what to summarize, and what to drop before the window fills up, since a window stuffed with irrelevant history degrades reasoning the same way a cluttered desk slows down a person doing real work. Long-running deep agents depend on this discipline directly; our own notes on context engineering inside a deep agent cover the tradeoffs of what to keep in the window versus what belongs in agent memory outside it.

Frequently asked questions

Is context engineering just a rebrand of prompt engineering?

No. Prompt engineering optimizes the instructions you write. Context engineering covers everything else that lands in the window alongside them: retrieved documents, tool results, and conversation history. Prompt engineering is one technique inside the wider discipline, not a synonym for it.

Why does context engineering matter more for an agent than a chatbot?

A single chat turn builds its context once. An agent rebuilds its context on every step of a run, deciding what to keep, summarize, or drop before the window fills, so a poor choice compounds across the whole task rather than costing one bad reply.

Summarize this page with

See how this works in a real workflow