ML//agent//context engineering
Prompt engineering asks how to phrase an instruction. Context engineering asks what the model should know at this exact inference step.
Prompt engineering asks how to phrase an instruction. Context engineering asks what the model should know at this exact inference step.
For an agent, context may contain system instructions, conversation history, visible tool schemas, retrieved memory, project rules, tool observations, and summaries. These compete inside a finite context window.
The harness performs context assembly:
ct=AH(i,ht,mt,Tt,ot)c_t=A_H(i,h_t,m_t,T_t,o_t)ct=AH(i,ht,mt,Tt,ot)
It decides what to preserve, retrieve, summarize, truncate, or omit before the next generation. This policy can change behavior without changing model weights or the user's request.
The hard part is not maximizing included information. It is preserving causal and decision-relevant evidence while removing material that is stale, redundant, or likely to distract the next action.