Intermediate · Systems
Agentic Context Strategies
Visual diagram · (in preparation) · Math · (in preparation) · Worked example · 3 difficulty levels.
TL;DR. The repertoire of techniques for filling an agent's window: retrieval, summarization, scratchpads, sub-agents, and offloading to files.
Technical Definition
The repertoire of techniques for filling an agent's window: retrieval, summarization, scratchpads, sub-agents, and offloading to files.
How it works
Common strategies include selective retrieval (fetch only what the current step needs), progressive summarization (compact old turns into durable notes), externalization (keep large artifacts on disk or in a store and pass handles rather than contents), sub-agent isolation (spawn a fresh window for a bounded sub-task and return only its result), structured state (a maintained plan or todo object re-injected each turn), and just-in-time tool schemas (expose only the tools relevant to the current phase). Real systems combine several, chosen by task shape rather than applied uniformly.
Related Concepts
- Agentic Context Management (ACM) — The discipline of deciding what an AI agent knows at each step — assembling, curating, compacting, and securing its working context.
- Context Compaction — Compressing accumulated history into a smaller, higher-density representation so an agent can keep working within its token budget.
- Context Retrieval Strategy — The policy that decides what to fetch into context, from where, how much, and when during an agent's loop.
- Context-Aware Tool Selection — Exposing and choosing tools dynamically based on the current task phase rather than presenting every tool at every step.