Context and Its Ingredients

Working with an agent can feel like gambling. You press Enter. Sometimes you get exactly what you wanted. Sometimes you get something generic, confused, or confidently wrong. You do not know which agent you are going to get.

It is tempting to blame the model or search for a magic prompt. Often, the real problem is the information the agent received. Something important may be missing, stale, contradictory, or buried under information that does not matter.

The agent’s view of the world is its context: all the text available to the language model inside the agent. This is literally all it can see. Once you understand context, an agent’s failures become easier to explain and correct. You can give it the information it needs, remove noise, and help it stay on track.

Starting Points

  1. Start with Philipp Schmid’s Context Engineering. It introduces context, the context window, and why the information given to an agent matters. Pair it with Matt Pocock’s definitions of context and the context window.

  2. Use Matt Pocock’s dictionary to name the main parts of the context window: the system prompt, the current user request and conversation history stored in the session, AGENTS.md, tools and tool results, skills, and contextual knowledge retrieved from files, webpages, and other sources.

  3. Continue with fuller explanations of those parts:

Deep Dive