# Context engineering

The deliberate selection and maintenance of instructions, knowledge, tools, state, examples, and artifacts within a finite model attention budget.

core-concept · Context & knowledge · maturing · Reviewed 2026-08-09

## Definition

The deliberate selection and maintenance of instructions, knowledge, tools, state, examples, and artifacts within a finite model attention budget. The control surface is no longer only the prompt; it is everything the model can see at the moment of decision.

A concrete practice with rapidly evolving techniques and tooling.

## Why it matters

The control surface is no longer only the prompt; it is everything the model can see at the moment of decision.

The operating shift is from “More tokens and larger prompts” to “Smallest sufficient high-signal state.”

## System anatomy

- **Practice 1:** Use progressive disclosure and just-in-time retrieval
- **Practice 2:** Budget and prune model-visible state
- **Practice 3:** Reset context with structured handoff artifacts



## Important distinctions

- **More tokens and larger prompts:** This concept moves the engineering system toward smallest sufficient high-signal state.



## Implementation signals

- Use progressive disclosure and just-in-time retrieval
- Budget and prune model-visible state
- Reset context with structured handoff artifacts

## Failure modes

- Context accumulation that buries the objective
- Untrusted retrieved content silently steering action



## Related knowledge

- [Durable project memory](https://aisdlc.ai/agentic-engineering/durable-memory) — Persistent, attributable project knowledge that carries decisions, outcomes, requirements, failures, and operating state across agent sessions without assuming that every stored item remains true or safe.
- [Harness engineering](https://aisdlc.ai/agentic-engineering/harness-engineering) — Engineering the agent loop, task decomposition, tools, permissions, session state, checks, retries, feedback, checkpoints, and stop conditions that surround a model.
- [Tools, skills & protocols](https://aisdlc.ai/agentic-engineering/tools-and-protocols) — The action and knowledge interfaces through which agents use tools, load procedural skills, access enterprise context, and collaborate with other agents.

## Sources and further study

- [Anthropic — Effective context engineering for AI agents](https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents) — A working model for treating model-visible context as a finite resource that must be selected and maintained. **Use:** First-party case study. **Limitation:** This first-party account documents one organization, product, or implementation context and should not be generalized without local evidence.
- [Anthropic — Effective harnesses for long-running agents](https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents) — Patterns for incremental progress and durable handoffs across context windows and extended execution. **Use:** First-party case study. **Limitation:** This first-party account documents one organization, product, or implementation context and should not be generalized without local evidence.
- [OWASP GenAI Security Project — Memory Is a Feature. It Is Also an Attack Surface](https://genai.owasp.org/2026/05/13/memory-is-a-feature-it-is-also-an-attack-surface/) — A focused account of why persistent agent memory requires integrity, provenance, and poisoning defenses. **Use:** First-party case study. **Limitation:** This first-party account documents one organization, product, or implementation context and should not be generalized without local evidence.

---

This library synthesizes cited research, standards, official documentation, and clearly attributed practitioner perspectives. Maturity describes the state of a concept—not vendor endorsement, production readiness, or permission to deploy. Benchmarks and demonstrations do not replace use-case evaluation, governed controls, independent verification, or named human release authority.
