liveBook · Manning

Context window

As explained in AI Agents in Action

A context window is the maximum amount of tokenized input and related context that a language model can consider in one interaction.

A context window is the maximum amount of tokenized input and related context a language model can consider in one interaction. It determines how much context or memory the model can hold. section 2.4

Choose context capacity according to the task:

  • A window below 4,000 tokens is typically enough for simple tasks. section 2.4
  • A larger window can become essential when multiple agents converse about one task. section 2.4
  • Context-window sizes vary across model architectures and model types. section 2.4

Selecting a model for an agent

For a simple task, a model with a smaller context window may be sufficient. For an agent system in which several agents exchange messages, prioritize a model offering a larger window. section 2.4

Figure 2.11 The important criteria to consider when consuming an LLM
figure

Compare context size with other criteria when selecting an LLM for an agent. section 2.4

How AI Agents in Action covers it

How deep it goes
Defines context capacity and gives practical thresholds, but does not explain tokenization or model internals.
Examples
Uses simple tasks below 4,000 tokens and conversations among multiple agents as contrasting capacity requirements.
What you can do after
Evaluate model options by estimating whether their context capacity fits simple tasks or multi-agent conversations.
How it connects
Connects context windows with model architecture, memory, and multi-agent systems.

Also explained in

Compare how 22 books explain context window →

Related concepts

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