A
AgentDefinitions
Configuration objects that define specialized subagents within a multi-agent system, including their descriptions, prompts, and tool restrictions. They are used by the coordinator to know which subagents are available and how to invoke them.
The coordinator agent has AgentDefinitions configured for all four specialized subagents, each with appropriate descriptions and tool restrictions.
Agentic Loop
The iterative execution cycle in which an agent receives tool results, re-evaluates the current state, and decides on the next action to take. Tool outputs are fed back into the model's context to drive dynamic decision-making.
In the agentic loop, the result of lookup_order is added to the conversation and the model reasons about whether to call process_refund or escalate_to_human next.
B
Batch API
An Anthropic API mode designed for high-throughput, asynchronous document processing that introduces latency in exchange for cost efficiency. It is unsuitable for time-sensitive tasks with strict SLA requirements.
Standard monthly reports are submitted to the Batch API for cost-efficient processing, while urgent exception reports are routed through the synchronous API to meet the 30-minute latency requirement.
C
Context Window
The maximum number of tokens that can be included in a single API request, encompassing the system prompt, conversation history, tool definitions, and document content. Exceeding it degrades model performance for content near the limit.
Tool definitions consuming 2,500 tokens combined with large documents push total input close to the 200K context window limit, causing end-of-document extraction accuracy to drop to 71%.
Coordinator Agent
The orchestrating agent in a multi-agent pipeline responsible for delegating tasks to specialized subagents, managing data flow between them, and maintaining overall workflow control. It should not cede orchestration logic to subagents.
The coordinator evaluates synthesis output for gaps, then re-delegates targeted queries to the web search and document analysis subagents before invoking the synthesis agent again.
E
errorCategory
A structured metadata field returned by MCP tools to classify errors as transient, validation, or permission failures, enabling the agent to choose the correct recovery strategy. It is typically paired with an isRetryable boolean.
Enhancing tool error responses with errorCategory and isRetryable fields allows the agent to distinguish network timeouts from permission errors and avoid wasting turns on non-recoverable failures.
Exponential Backoff
A retry strategy for transient errors where the wait time between successive retry attempts increases exponentially to reduce load on a failing service. It should only be applied to retryable errors, not permanent failures.
The publish_article tool implements retries with exponential backoff for 503 network timeouts but surfaces 403 permission errors immediately to the agent without retrying.
I
Instruction Drift
The phenomenon where a model's adherence to system prompt guidelines degrades over the course of a long conversation, even when the context window is not exceeded. It is mitigated by periodically reinforcing critical constraints within the active context.
By turn 25–30, the assistant begins using informal tone and skipping required formatting due to instruction drift, even though conversation length is well within the 200K token limit.
isError
A boolean field in an MCP tool result payload that signals a tool-execution-level failure, as distinct from a JSON-RPC protocol error. It informs the agent that the tool ran but encountered a business or infrastructure error.
A calendar API 503 response is reported as a tool result with isError: true, while a malformed request missing user_email is reported as a JSON-RPC protocol error.
isRetryable
A boolean metadata field in a structured tool error response indicating whether the failed operation can be expected to succeed if retried. Its presence allows the agent to make an informed decision about retry versus escalation.
The search_catalog tool returns isRetryable: true for network timeouts and isRetryable: false for query syntax errors, preventing the agent from wasting turns on unrecoverable failures.
M
MCP (Model Context Protocol)
A protocol for integrating external tools and resources with Claude, defining standards for how tools are described, invoked, and how their results or errors are communicated back to the model. It distinguishes between protocol-level errors and tool-execution errors.
The lookup_order MCP tool returns a structured error result rather than throwing an exception, ensuring the agent can distinguish an order-not-found condition from a temporary database failure.
P
Parallel Subagent Execution
An orchestration pattern in which independent subagents are invoked concurrently rather than sequentially, reducing overall pipeline latency when tasks do not depend on each other's outputs.
Because the web search and document analysis tasks are independent, an async orchestration layer spawns both subagents in parallel, eliminating the sequential wait that caused 40+ second delays.
Prompt Injection
An attack vector in which malicious content embedded in external data (e.g., retrieved documents or tool outputs) attempts to hijack agent behavior by issuing unauthorized instructions. It is a key security concern in agentic and RAG pipelines.
The coordinator sanitizes all subagent outputs before including them in downstream prompts to guard against prompt injection from adversarial content in retrieved web sources.
Provenance
Metadata that tracks the origin of information—such as source URLs, document names, and page numbers—preserved as first-class data throughout a multi-agent pipeline to enable accurate citation in final outputs.
Each agent outputs structured data separating content summaries from source provenance metadata, ensuring the report generator can attribute every claim to its original document.
R
RAG (Retrieval-Augmented Generation)
An architecture where relevant external documents or passages are retrieved and injected into the model's context to ground its responses in up-to-date or domain-specific information. Unbounded accumulation of RAG results can crowd out conversation history.
Accumulated RAG results from all previous queries fill the context window, causing coherence degradation after 15 turns; a sliding window for RAG results resolves the issue.
S
Semantic Deduplication
A post-processing technique that identifies and removes semantically redundant content across accumulated context, such as repeated RAG results, to reclaim token budget. It reduces redundancy but does not solve unbounded context growth on its own.
Semantic deduplication removes duplicate passages from accumulated RAG results but fails to address the core problem of unbounded context growth across many conversation turns.
Sliding Window
A context management strategy that retains only the most recent N message pairs in the conversation history, discarding older turns to stay within token limits. It risks losing critical early context such as user-stated constraints or allergies.
A sliding window retaining only the last 30 turns would drop the refund discussion from turns 1–15, preventing the agent from accurately answering a follow-up question at turn 48.
State Manifest
A structured export persisted by each agent to a known location capturing its completed outputs and progress, enabling a crashed pipeline to resume without repeating work. The coordinator loads the manifest and injects relevant state into agent prompts on restart.
After the pipeline crashes at document 12 of 28, the coordinator loads the state manifest and injects only the relevant prior findings into each agent's prompt to resume processing with full fidelity.
Story Bible
A dedicated, retained section of context containing invariant narrative elements—character backgrounds, world rules, and plot structure—kept separate from ephemeral brainstorming content to prevent narrative inconsistency as context limits are approached.
Persistent story elements are placed in a story bible section at the start of the context, while summarization and trimming are applied only to the brainstorming discussion that follows.
Structured State Object
An externalized, authoritative data structure maintained by the application layer that captures the current known state (e.g., user preferences, session data) and is injected into each API request. It prevents the model from having to infer current state from ambiguous conversation history.
A structured state object stores current property search preferences and is updated immediately when a user says 'raise the budget to $650K,' ensuring the model always acts on the latest values.
Subagent Context Isolation
The property by which each subagent operates within its own context and does not automatically inherit the conversation history or outputs of sibling agents. The coordinator must explicitly pass required information via prompts.
Because of subagent context isolation, the synthesis agent has no awareness of findings from the web search agent unless the coordinator explicitly includes them in its invocation prompt.
T
Tool Choice Enforcement
An API-level parameter (tool_choice) that forces the model to call a specific named tool rather than deciding autonomously, ensuring deterministic execution order in pipelines where one tool's output is a prerequisite for another.
Setting tool_choice to extract_metadata ensures structured extraction always runs first, making the DOI available before lookup_citations or verify_doi are called in subsequent turns.
Tool Granularity
The design principle of scoping each tool to a single, well-defined operation with only the parameters relevant to that operation, reducing parameter ambiguity and improving the model's selection accuracy.
Splitting a combined order-management tool into three separate tools—issue_refund, cancel_order, and reship_order—eliminates parameter confusion and significantly improves call accuracy.
Tool Result
The structured response returned to the model after a tool executes, containing either the operation's output or an error payload with isError set to true. It is distinct from a JSON-RPC protocol error, which signals a request-formation failure.
A temporary database failure in lookup_order is communicated as a tool result with isError: true rather than an exception, so the agent can reason about whether to retry or escalate.
V
Validation Feedback Loop
A retry mechanism in which a specific validation error message is appended to the prompt of a follow-up request, enabling the model to self-correct its output. It is ineffective when the required information is absent from the input context.
The pipeline appends the Pydantic validation error 'expected float for quantity, got 2 to 3' to a follow-up request, allowing the model to reinterpret the range and return a corrected extraction.