Decide what goes into the model's limited window: instructions, memory, tools and retrieved facts.
- BudgetThe window is finite; every token competes.
- SelectPull in only the relevant docs and history.
- CompressSummarise old turns, keep the decisions.
- MemoryStore facts outside and recall them when needed.
Explain 1/5
Source: Anthropic: Effective context engineering for AI agents