Agent Mentor Learn

Glossary

69 terms from “Context Engineering: Spending Finite Attention Where It Counts.” Hover the first occurrence in the lesson for its definition.

TermDefinitionSource
prompt engineeringMethods for writing and organizing LLM instructions for optimal outcomes, focusing on how the instruction itself is written and arranged.Effective context engineering for AI agents — Anthropic Engineering
context engineeringThe set of strategies for curating and maintaining the optimal set of tokens in the window during LLM inference, a tradeoff re-answered on every turn of the loop.Effective context engineering for AI agents — Anthropic Engineering
attention budgetA finite budget that LLMs draw on when parsing large volumes of context, depleted by every new token introduced.Effective context engineering for AI agents — Anthropic Engineering
context rotThe phenomenon where the model's ability to accurately recall information from context decreases as the number of tokens in the window increases.Effective context engineering for AI agents — Anthropic Engineering
performance gradientThe gradual downward performance curve that context rot follows as tokens increase, rather than a sudden failure at some token threshold.Effective context engineering for AI agents — Anthropic Engineering
diminishing marginal returnsViewing context as a finite resource where the thousandth token and the hundred-thousandth occupy equal space but contribute vastly different value.Effective context engineering for AI agents — Anthropic Engineering
harnessThe entire engineering shell that carries an agent loop; the same model with different harnesses produces completely different results.The 2026 Agent Engineering Roadmap — GitHub (codejunkie99/agent-roadmap-2026)
natural progressionAnthropic's positioning of context engineering as the natural evolution of prompt engineering, not a replacement; writing good system prompts remains necessary, just as one of many context components to manage.Effective context engineering for AI agents — Anthropic Engineering
long-horizon tasksAgent tasks spanning multiple turns of inference and extended time, the scenario that compaction, structured notes, and multi-agent architectures collectively address.Effective context engineering for AI agents — Anthropic Engineering
altitudeThe abstraction level of a system prompt, describing whether instructions are too concrete with brittle hardcoded logic at one extreme, or too vague with no behavioral signal at the other.Effective context engineering for AI agents — Anthropic Engineering
Flying too lowA system prompt failure mode: using numerous 'if...then...' rules to hardcode logic into the prompt, where uncovered cases fall into a catch-all branch.Effective context engineering for AI agents — Anthropic Engineering
Floating too highA system prompt failure mode: only providing vague slogans with no concrete guidance, leaving the model with no actionable signal and unpredictable behavior drift.Effective context engineering for AI agents — Anthropic Engineering
right altitudeThe recommended system prompt form: specific enough to guide behavior effectively, yet flexible enough to provide the model with strong heuristics.Effective context engineering for AI agents — Anthropic Engineering
principles plus hard limitsThe practical structure for right-altitude system prompts: a few judgment principles covering general scenarios, plus a small number of must-obey hard limits locking non-negotiable compliance boundaries.Effective context engineering for AI agents — Anthropic Engineering
CLAUDE.mdIn Claude Code, a project-level configuration file loaded into context at the start of every conversation; should contain only broadly applicable, every-session content.Best practices for Claude Code — Claude Code Docs
deletion testA method for auditing resident file content line by line: ask 'would removing this cause mistakes?' If the answer is no, delete it.Best practices for Claude Code — Claude Code Docs
skillsIn Claude Code, packaged specialist capabilities loaded on demand rather than resident in every conversation like CLAUDE.md, preventing every session from becoming bloated.Best practices for Claude Code — Claude Code Docs
minimal overlap in functionalityA tool design requirement: multiple tools should have clear functional boundaries, avoiding zones where both can do the same job.Effective context engineering for AI agents — Anthropic Engineering
token efficientA design standard for tool return values: by default return only key fields, avoiding flooding the message history with large volumes of low-value information that repeatedly consume attention budget.Effective context engineering for AI agents — Anthropic Engineering
canonicalA standard for selecting few-shot examples: one example should represent an entire class of expected behavior, not an isolated specific situation.Effective context engineering for AI agents — Anthropic Engineering
laundry listAdding a line to the example or rule list for every special case that appears in production, eventually accumulating into a long, tedious list—an anti-pattern to avoid.Effective context engineering for AI agents — Anthropic Engineering
preloadingThe strategy of putting all potentially needed material into the initial context before inference begins, making everything visible to the model on turn one without retrieval.Effective context engineering for AI agents — Anthropic Engineering
just-in-time retrievalThe strategy of maintaining lightweight identifiers in the initial context and having the agent load content through tools at runtime, as needed.Effective context engineering for AI agents — Anthropic Engineering
lightweight identifiersPointers to content rather than the content itself—file paths, stored queries, web links—for agents to expand on demand into full content at runtime.Effective context engineering for AI agents — Anthropic Engineering
metadataInformation attached to identifiers like file names, directory structure, timestamps that hints at relevance and purpose without opening the content itself.Effective context engineering for AI agents — Anthropic Engineering
incrementally discoverThe way agents rely on identifiers and retrieval tools to find truly relevant content step by step during exploration, rather than having everything presented at once.Effective context engineering for AI agents — Anthropic Engineering
hybrid strategyThe combined approach of preloading some data for speed and leaving the rest as identifiers for the model to explore autonomously at runtime—the common form in real systems.Effective context engineering for AI agents — Anthropic Engineering
trade-off frameworkA practical method for judging whether to preload or just-in-time retrieve each candidate material: ask 'is it stable' and 'is it used every turn' in sequence.Effective context engineering for AI agents — Anthropic Engineering
list_filesAn example retrieval tool in the course for listing files and subdirectories under a repo directory, the first step in just-in-time retrieval helping agents narrow scope.Effective context engineering for AI agents — Anthropic Engineering
grepAn example retrieval tool in the course for recursively searching text in a directory, returning matching lines with line counts capped to control token consumption.Effective context engineering for AI agents — Anthropic Engineering
read_fileAn example retrieval tool in the course for reading a single file's content, stipulated for use only after list_files or grep has confirmed the file is relevant.Effective context engineering for AI agents — Anthropic Engineering
The essence of search is compressionAnthropic's summary of the search process: every retrieval narrows vast corpora and distills truly useful insights; just-in-time retrieval's every step performs this compression.How we built our multi-agent research system — Anthropic Engineering
REPO_ROOTA constant in the course example code for specifying repo root directory path, with all three retrieval tools' file operations based on it to locate actual paths.Effective context engineering for AI agents — Anthropic Engineering
compactionWhen a conversation nears the context window limit, passing message history to the model for summarization, then reinitiating a new context window from that summary.Effective context engineering for AI agents — Anthropic Engineering
reinitiateThe core action of compaction: opening an entirely new context window with the summary, abandoning the old message history wholesale rather than continuing to accumulate on the original conversation.Effective context engineering for AI agents — Anthropic Engineering
handoff summaryThe summary text generated during compaction for the new window to read at startup, needing to preserve architectural decisions, unresolved problems, and key implementation details for the agent to continue working.Effective context engineering for AI agents — Anthropic Engineering
COMPACT_INSTRUCTIONA constant in the course example code defining compaction summarization instructions, explicitly requiring preservation of architectural decisions, unresolved problems, key implementation details, and discarding redundant tool output.Effective context engineering for AI agents — Anthropic Engineering
compact()The function implementing compaction in the course example: sending message history with summarization instruction to the model, then replacing the entire messages array with the returned summary to reinitiate a new window.Effective context engineering for AI agents — Anthropic Engineering
structured note-takingHaving the agent proactively write key state to a persistent location outside the context window at the moment of making decisions or discovering problems, complementing passive, after-the-fact compaction.Effective context engineering for AI agents — Anthropic Engineering
NOTES.mdThe structured notes file maintained by the agent in the course example, recording finalized decisions, unresolved problems, and next-step plans, existing independently of conversation history in the filesystem.Effective context engineering for AI agents — Anthropic Engineering
to-do listClaude Code's mechanism for maintaining task lists, like custom agents maintaining NOTES.md, both belonging to structured notes practices that externalize key state outside the window.Effective context engineering for AI agents — Anthropic Engineering
/clearA Claude Code command for fully resetting context when switching to an unrelated new task, neither summarizing nor preserving old content.Best practices for Claude Code — Claude Code Docs
Auto-CompactionClaude Code's productized compaction mechanism: automatically triggering when conversation nears context limits, preserving important code and decisions without manual intervention.Best practices for Claude Code — Claude Code Docs
Claude playing PokémonA case Anthropic mentions to illustrate how memory mechanisms can transform agent capabilities in non-coding domains, not exclusive to coding tasks.Effective context engineering for AI agents — Anthropic Engineering
three movesThe three classes of context management techniques for long-horizon tasks—compaction, structured note-taking, and multi-agent architectures—jointly aimed at keeping agents coherent and goal-directed over long action sequences.Effective context engineering for AI agents — Anthropic Engineering
subagentA mechanism handling focused tasks in clean context windows, returning only compressed summaries to the main agent, valuable not just for multi-agent collaboration but for context isolation itself.Effective context engineering for AI agents — Anthropic Engineering
clean windowThe brand-new context window subagents use at startup, carrying none of the main agent's message history, ensuring the attention budget is fully spent on the focused task itself.Effective context engineering for AI agents — Anthropic Engineering
intelligent filtersAnthropic's metaphor for the subagent role: replacing the main agent in condensing the most important tokens from the exploration process, corpus goes in, key points come out.How we built our multi-agent research system — Anthropic Engineering
process-to-conclusion ratioOne criterion for judging whether a task is worth dispatching to a subagent: the volume ratio between intermediate exploration content and final conclusion; the more lopsided, the greater the isolation payoff.Effective context engineering for AI agents — Anthropic Engineering
runSubagentThe function in the course example code for starting the subagent loop: opening with an isolated task description as a brand-new message array, returning only the model's final text conclusion.Effective context engineering for AI agents — Anthropic Engineering
dispatch_researchThe tool on the main agent side in the course example for dispatching research tasks to subagents, returning the subagent's summary conclusion after hooking into the stop_reason loop.Effective context engineering for AI agents — Anthropic Engineering
SUBAGENT_SYSTEMA constant in the course example code for the subagent's dedicated system prompt, requiring the subagent to output conclusions under 1500 tokens and not repeat read original text.Effective context engineering for AI agents — Anthropic Engineering
handoffWhen starting a new clean-window subagent to continue a previous subagent's work in long tasks, the action of maintaining task continuity by passing key points.How we built our multi-agent research system — Anthropic Engineering
multi-agent architecturesAn architectural pattern of dispatching exploration work to independent subagents, recovering only compressed summaries—one of the three moves for long-horizon tasks.Effective context engineering for AI agents — Anthropic Engineering
4× (agent versus chat token usage)Based on Anthropic's measurements of its multi-agent research system, a single agent's token usage is about 4× that of ordinary chat interaction—this system's empirical measurement, not a universal law.How we built our multi-agent research system — Anthropic Engineering
15× (multi-agent versus chat token usage)Based on Anthropic's measurements of its multi-agent research system, the entire multi-agent system's token usage is about 15× that of ordinary chat interaction—also this system's empirical measurement, not a universal law.How we built our multi-agent research system — Anthropic Engineering
80% (token usage explaining performance variance)Based on Anthropic's measurements of its multi-agent research system, token usage alone explains 80% of that system's performance variance—important reference data for judging whether isolation is worthwhile.How we built our multi-agent research system — Anthropic Engineering
CONTEXT_WINDOWA constant in the course example code representing the context window capacity limit, set in engineering judgment according to the actual model used.Effective context engineering for AI agents — Anthropic Engineering
COMPACT_RATIOA constant in the course example code defining the compaction trigger threshold ratio; usage exceeding window capacity times this ratio triggers compaction.Effective context engineering for AI agents — Anthropic Engineering
shouldCompactThe judgment function in the course example code: checking whether current cumulative token usage has reached or exceeded the compaction threshold, deciding whether to trigger compaction.Effective context engineering for AI agents — Anthropic Engineering
tokensUsedThe counter variable in the course example code tracking current window's cumulative token usage; must reset to zero after compaction triggers and completes, representing 'how much this window has used' not historical totals.Effective context engineering for AI agents — Anthropic Engineering
trackUsageThe utility function in the course example code: accumulating each model response's input_tokens and output_tokens into the tokensUsed counter.Effective context engineering for AI agents — Anthropic Engineering
update_notesThe tool in the course example code for the agent to write to NOTES.md, with semantics of each write being complete content wholesale overwrite, no incremental merging needed.Effective context engineering for AI agents — Anthropic Engineering
runAgentThe main function in the course example code combining usage tracking, threshold-triggered compaction, and note reading/writing into the same loop for running tasks exceeding single-window capacity.Effective context engineering for AI agents — Anthropic Engineering
Compaction StormA bug phenomenon where forgetting to reset tokensUsed after compaction causes nearly every subsequent turn to incorrectly trigger compaction, making the task loop in place repeatedly summarizing and restarting.Effective context engineering for AI agents — Anthropic Engineering
threshold-triggered compactionThe mechanism hooking compaction into the loop: proactively triggering compaction and continuing work when usage accumulation reaches the set threshold ratio, not waiting until the window actually blows up.Effective context engineering for AI agents — Anthropic Engineering
readNotesThe function in the course example code: reading current note content from NOTES.md, returning a placeholder prompt text on read failure (file doesn't exist yet).Effective context engineering for AI agents — Anthropic Engineering
writeNotesThe function in the course example code: writing passed-in complete note content to the NOTES.md file, for the update_notes tool to use when called.Effective context engineering for AI agents — Anthropic Engineering
compaction callThe extra model call triggered during compaction for generating the handoff summary; this call's output is directly used to restart the message array, not entering the main loop for continued reasoning.Effective context engineering for AI agents — Anthropic Engineering