Intermediate · Systems
Context Lifecycle
Visual diagram · Math · (in preparation) · Worked example · 3 difficulty levels.
TL;DR. The stages a piece of context passes through: acquisition, validation, injection, use, compaction, persistence, and expiry.
Technical Definition
The stages a piece of context passes through: acquisition, validation, injection, use, compaction, persistence, and expiry.
How it works
Thinking in lifecycle terms turns context from an ad-hoc string concatenation into a managed pipeline. Each segment is acquired from a source, validated and labelled with provenance and trust level, injected under a token budget, used by the model, then either compacted, persisted to memory, or expired. Lifecycle discipline supplies the hooks needed for cost control, reproducibility, and security review — you can answer exactly what the model saw, where it came from, and why it was retained.
Visual Explanation (flowchart)
Acquire → Validate & label provenance → Budget & inject → Use → Compact → Persist or expire
Related Concepts
- Context Evolution — How an agent's context changes over the course of a task as steps, observations, and summaries accumulate and replace one another.
- Context Management — The engineering practice of controlling what goes into a model's context window, in what order, and at what cost.
- Context Compaction — Compressing accumulated history into a smaller, higher-density representation so an agent can keep working within its token budget.
- Context Security — Protecting the integrity and confidentiality of what enters and leaves an agent's context window.