liveBook · Manning

Context window

As explained in Designing AI Agents

The bounded sequence of tokens that a language model can attend to during an interaction.

A context window is the finite sequence of tokens a language model can see in a single call. It acts as short-term working memory: instructions, evidence, and tool results compete for limited space. Token counts determine what fits and often influence latency and cost. section 1.1 section 4.1.1

Treat context as a budget, not uniform RAM. Every token admitted consumes capacity, while excluded information is unavailable to the model. Position matters: different parts of the window do not necessarily receive equal treatment. section 3.1 section 1.1

Keep frequently needed working state close to the model, and retrieve durable history or source material when its value justifies the token cost. Paging information into context changes its availability, not its authority. Provenance, ownership, version, permissions, and invalidation remain separate checks. section 4.1.1

Table 4.1 Dimensions of agent memory
Memory category
Example content
 
Scope
 
Function
 
Lifetime and access
 
Owner or authority
 
Active context
 
Current instructions, evidence, tool results
 
Turn or session
 
Working state
 
Immediate and volatile
 
Runtime plus source owners
 
Task or session state
 
Goal, artifacts, receipts, pending decisions
 
Task or session
 
Resumption
 
Durable until task closure
 
Orchestrator or task owner
 
Project or user context
 
Conventions, preferences, profiles
 
Project, user, or team
 
Continuity
 
Durable, versioned, retrieved on demand
 
Human or system owner
 
Admitted lessons
Scoped guidance with admission evidence
Workload, team, or organization
Governed reuse
Versioned, expiring, supersedable
Admission owner
Archival evidence
Raw traces, prior versions, audit records
Task through organization
Audit and later review
Archived under retention policy
Evidence or records owner

Compare active context with longer-lived memory by scope, function, access, and authority. section 4.1.1

How Designing AI Agents covers it

How deep it goes
Defines the window and outlines position sensitivity, memory tiers, and access costs without detailing an implementation.
Examples
Uses instructions, evidence, and tool results as active context, and cites MemGPT’s paging between context and external storage.
What you can do after
Evaluate what to keep in context or retrieve later against token cost, availability, and authority.
How it connects
Connects the context window to perception, working memory, episodic memory, semantic memory, and external storage.

Also explained in

Compare how 38 books explain context window →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Designing AI Agents. The section links point to the parts of the book it draws on.