Overview

3 Perception: What your agent sees determines what it does

Perception is presented as the main bottleneck in agent performance: what matters is not how much information an agent can accept, but how well it selects, prioritizes, and shapes that information before reasoning begins. The chapter opens with a failure case in which an agent was given far too much repository context, causing it to focus on irrelevant material and miss the actual defect. From this, the central idea emerges that a context window is not a neutral storage space but a constrained attention system, so loading the wrong evidence can make an otherwise capable model act confidently on the wrong basis.

The chapter then develops a framework for managing this constraint through four perception patterns. Context triage sorts evidence into priority tiers so the most important material enters first and deferrable material stays out until needed. Semantic compaction reduces accumulated history while preserving decision-critical details, especially failure evidence that would otherwise be lost. Progressive discovery explores unknown environments in stages, starting broad and cheap, then focusing on relevant files or sources, and finally deepening through references. Multi-modal fusion chooses the representation that best preserves the evidence needed for the next decision, whether that means keeping an image, converting structured data into a compact table, or using text. Across all four, the goal is to maximize signal, minimize waste, and avoid iatrogenic context.

To make the ideas operational, the chapter emphasizes observability and gives concrete implementation guidance through the evolving Argus reviewer. It recommends tracking re-read ratio, token spend per successful outcome, and attention-zone coverage to detect when perception policies are helping or hurting. It also shows how these patterns can be composed into a full pipeline that gathers context, filters it, compacts it, and keeps it aligned with the task as the session evolves. By upgrading Argus from a blind prompt wrapper into a context-aware analyst, the chapter argues that strong agent design depends on deliberate perception choices that determine what the system sees, what it can remember within the session, and ultimately what it can do well.

Perception quality as a function of context fill: quality rises with information, peaks, then degrades as attention dilutes. The curve illustrates the concept; the peak’s position varies by task and model.
Context Triage priority tiers. Information flows downward from most critical to most deferrable. Percentages show an example budget and require workload calibration.
Semantic compaction at three levels. Each level preserves more recent turns and compresses everything before them.
Progressive discovery's three-phase strategy applied to a debugging task.
Multi-modal fusion decision flow. Text and structured data are converted to compact text representations.
The perception pipeline.

Summary

  • Perception is a core architectural discipline of agent engineering. A well-chosen context can allow a capable model to outperform a stronger model whose evidence is buried in noise.
  • Context Triage (Perception × Route) classifies information into four priority tiers (P0 through P3) and fills the window from highest priority down. The key design decision is what can be deferred safely, who sets that policy, and when the agent may promote an item for retrieval.
  • Semantic Compaction (Perception × Chain) compresses accumulated context at three levels (tool clearing, conversation summarization, progressive summarization). Preserve decision-critical evidence until the relevant decision is resolved; losing failure evidence can cause the agent to repeat mistakes.
  • Progressive Discovery (Perception × Loop) builds context through a forage-focus-deepen cycle. Place exploration cost deliberately in per-task search, session setup, or maintenance of a persistent index.
  • Multi-Modal Fusion (Perception × Parallel) chooses a token-efficient representation for each input. Keep images when spatial information is the signal; convert symbolic or nonspatial evidence to compact text when the decision does not require the original form.
  • The four patterns can compose into a perception pipeline that shifts from acquisition (early cycles, dominated by Progressive Discovery) to management (late cycles, dominated by Semantic Compaction). A system selects only the stages its evidence and task require.
  • Three metrics help measure perception quality: repeated retrieval, token spend per successful outcome, and reliable use of critical evidence. Establish workload and model baselines, then calibrate thresholds against them.
  • The underlying principle is to aim the context window at decision-relevant evidence.

FAQ

What is perception in an AI agent, and why does it matter?Perception is the process of selecting, prioritizing, and assembling information into the context window before the model reasons. It matters because what the agent sees determines what it can think about and therefore what it will do.
Why can giving an agent more context make it perform worse?Because context windows are not uniform and attention degrades as they fill. Too much irrelevant information creates iatrogenic context: extra tokens that dilute attention, bury important evidence, and reduce reasoning quality.
What is the “dead zone” in a context window?The dead zone is the middle of a long context window, where models are less reliable at retrieving and using information than at the beginning or end. Important evidence buried there is more likely to be missed or used inconsistently.
What is Context Triage?Context Triage is a perception pattern that classifies information into priority tiers and loads the most important items first. It helps the agent fit the right evidence into a limited budget instead of dumping everything into context.
What are the four Context Triage tiers?P0 items are critical and always included; P1 items are important and included if space allows; P2 items are supporting and usually summarized; P3 items are deferrable and loaded only on demand.
When should an agent use Semantic Compaction?Use Semantic Compaction when accumulated history makes a session costly or unreliable. It compresses older context while preserving the evidence needed for the next decision, especially failed actions, traces, and other decision-critical details.
What is the difference between clearing tool results and summarizing conversation history?Clearing tool results is the lighter form of compaction: it replaces verbose outputs with short summaries while keeping the originals recoverable. Summarizing conversation history is more aggressive and should be used only when clearing alone does not free enough space.
What is Progressive Discovery?Progressive Discovery is the pattern of starting with a task boundary, then exploring outward only as needed. The agent forages broadly, focuses on high-value targets, and deepens by following relevant references until it has enough evidence to act.
How does Multi-Modal Fusion help an agent?Multi-Modal Fusion chooses the representation that best preserves the evidence needed for the decision. It keeps images when spatial relationships matter, converts structured data to compact text when appropriate, and logs the choice for auditability.
How does the chapter say these perception patterns work together?The chapter presents them as a pipeline: Progressive Discovery gathers relevant evidence, Multi-Modal Fusion normalizes representations, Context Triage prioritizes what enters the window, and Semantic Compaction manages accumulated history. Together they keep the agent near the “peak” of useful context rather than drowning it in noise.

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Designing AI Agents ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Designing AI Agents ebook for free