Anatomy#

What agents are: structural components and training that define their abilities and limitations


abstraction#

Definition: label and/or concept that bundles together a set of underlying components or capabilities; streamlines communication by hiding implementation details

Purpose: lets agents, teams, and platforms reason about complex systems at a higher level without tracking every internal part; understanding what an abstraction hides is often necessary for diagnosing unexpected behavior

Example: “agent” is an abstraction for a system of distinct parts

Related Terms: agent, automation, harness, spec

Source: Dachary Carey: “An Agent is More Than Its Brain”


agent#

Definition: autonomous system that perceives its environment, makes decisions, and takes actions to achieve goals; given an objective expressed in natural language, chooses its own next action from a set of tools, executes that action against an external environment, observes the result, repeats the cycle until it judges the goal met or gives up

Historical: while researchers have described systems that sense→decide→act→adapt since the 1960s, current differences in agent infrastructure include tool use as a first-class feature, larger context windows, and observability frameworks; problem domains throughout history consistently include commitment instability, evaluation at scale, goal specification/spec gaming, plan-execution drift, representation and/or framing; common industry pitfalls include conflating historical and technical novelty -

EraInfluential Works
Symbolic, GOFAI: 1956-19851956 Dartmouth workshop influenced dominance of GOFAI, good old-fashioned AI paradigm: “intelligence” uncovered from manipulating logic symbols according to rules, path to agency through reasoning systems; STRIPS shaped PDDL, SHRDLU, rise of expert systems such as MYCIN, DENDRAL
BDI, Multi-Agent: 1986-1999Belief-Desires-Intention models, FIPA standards, Russell and Norvig’s Artificial Intelligence: A Modern Approach
Reinforcement Learning, Quiet Agents: 2000-2019Sutton and Barto’s Reinforcement Learning, Tesauro’s TD-Gammon, DARPA Grand Challenges, DeepMind’s AlphaGo
LLM Inflection: 2020-2022OpenAI’s GPT-3 API and InstructGPT, Wei’s “Chain-of-Thought Prompting Elicits Reasoning in Large Language Models”, Yao’s “ReAct: Synergizing Reasoning and Acting in Language Models”
Tool-Use Turn: 2023-2024Richards’ AutoGPT, Anthropic and OpenAI tool-use APIs, Anthropic’s computer-use preview, specialized frameworks trading breadth for coherence: LangChain, CrewAI, AutoGen, smolagents; observability stacks from Braintrust, Phoenix, Opik
Standardization: 2025-presentAnthropic’s Model Context Protocol specification, OpenAI’s Agent SDK with Responses API, Google’s Agent Development Kit, Mistral, Cohere, evaluation tooling maturing, EU AI Act phased application

Purpose: current iterations convert raw LLM capability into goal-directed, self-directed task execution; distinct from chatbots, process automation, and workflow engines through nondeterministic autonomy

Examples: Caldwell’s taxonomy serves as a design resource for agentic implementation; higher isn’t better; common design pitfalls include treating LLM output as ground truth, assuming longer thinking equals better answers, confusing breadth of tools with capability, building an agent when something simpler works - the right level for the problem is the lowest one that can solve it -

LevelCategoryDescriptionFailure Modes → Mitigation
0Scripted AutomationDeterministic program without an LLM - cron job moves files, rules engine prices mortgages, regex parses log linesShipping LLM-powered system when a competent script is faster, cheaper, lower variance
1LLM as Text FunctionLLM call wrapped behind deterministic interface without tools, loops, state: calling code handles input validation, output parsing, error paths in a summarize→classify→extract processPrompt engineering, constrained decoding, schema validation to treat LLM output as untrusted string to fix classification errors, prompt-injection from untrusted input and/or malformed inputs
2Tool-using LLMTools available in short sequence - thoughtht→action→observation→thought pattern in retrieval-augmentated chat assistants deciding search, coding assistants deciding testing strategy, customer-service bots deciding when to retrieve ordersStrict step budgets, schema-validated tool arguments, observability to resolve infinite loops, wrong tool selection, hallucinated tool arguments
3Goal-directed AgentTool-using LLM with explicit planning, task-decomposition mechanism: multi-step research/coding agents as orchestrators; given a goal, produces-maintains plan, executes steps, revises for failure recoveryExplicit plan validation, termination checks, periodic plan-vs-execution reconcilitation to remediate plan-execution drift in which execution quietly deviates, premature termination as agents claim success without meeting the goal, cascading hallucination as early mistake contaminates later reasoning
4Adaptive Agent with Persistent MemoryCarries state across sessions - commonly claimed, but likely Level 3 with key-value cache attachedDisciplined memory design to catch drift, privacy leakage across users, users deliberately teaching agent falsehoods
5Autonomous Multi-agent Systems, General-purpose Computer UseSystems composed of multiple Level 3+ agents: ability to operate heterogeneous environments - browser, desktop, shell through interfaces rather than narrowly-scoped toolsSafety, observability, evaluation techniques as failure modes at lower levels compound with inter-agent prompt injection, emergent coordination bugs, long-horizon goal drift

Coding Agent vs Training Crawler: coding assistants’ web fetch methods don’t include traditional scraping by default; products like Claude Code and GitHub Copilot make real time HTTP requests during a task using generic HTTP client signatures like axios/1.8.4, while training crawlers like GPTBot, ClaudeBot, CCBot scrape the web for LLM training data and self-identify via distinct user-agent strings that respect robots.txt; most agent-detection mechanisms such as user-agent sniffing, the RFC 9421 Signature-Agent header, bot-management JS challenges - catch training crawlers and answer-engine bots, not coding agents, which remain effectively invisible to them

Related Terms: abstraction, Agent-Friendly Documentation Spec, automation, memory, planning, robots.txt, self-reflection

Sources:


automation#

Definition: use of technology to perform tasks with minimal human intervention; can range from basic rule-based systems to complex machine learning models

Purpose: in an AI context, delegates decision-making or execution to algorithms, robots, or automated agents to reduce manual effort and increase consistency

Related Terms: abstraction, agent, harness

Source: Wikipedia: “Automation”


context window#

Definition: total amount of text, measured in tokens, an LLM can process at once; includes system prompt, conversation history, and any injected context

Purpose: bounds what information is directly available to the LLM during a given interaction; content outside the window is not directly accessible

Example: agent platforms handle conversations approaching the limit through summarization, selective truncation, or compression; quality of context window management strategy determines whether agents retain earlier instructions or “forget” context in a few ways:

ChallengeDescription
CompactionLLM summarization / rewriting, or server-side opaque compression
Context RotPerformance degradation as length increases ~30k+ tokens
Lost in the MiddleLLMs use info at context beginning, end more than middle
Tiered Retentionkeep only current page state; trim snapshot with lightweight model before it reaches primary LLM; compress older turns into a persistent, agent-authored memory field instead of retaining raw history to hold token use roughly constant

Related Terms: memory, /SKILL, system prompt, temperature

Sources:


hallucination#

Definition: type of AI output that’s false, fabricated, or unsupported information; appears plausible but isn’t grounded in training data or provided context

Purpose: a critical quality-control concern in AI systems; understanding hallucination helps diagnose failures and informs evaluation of truthfulness and robustness

Example: in the Agent Reading Test, GitHub Copilot reported “25 canary tokens found” in its summary, but its own JSON report listed only 16, with only 23 canaries total across all pages; agent hallucinated a count of its own reported data, inflating a number it had just generated; LLMs don’t understand truth, fill gaps in training data, oversimplify patterns, and lack real-world verification to produce different types of hallucinations -

TypeDescription
CreativeProduces completely fictional explanation to a scientific question
FabricatedCreates references or sources that don’t exist
FactualGenerates incorrect facts, asserting a fictional event as historical
LogicalDelivers contradicting outputs or lack consistency

Related Terms: Agent Reading Test, agent, canary phrase, evaluation, memory, observability, self-reflection, SimpleQA

Sources:


harness#

Definition: platform layer that wraps around an LLM; provides configuration, permission settings, system prompts, and tools

Purpose: shapes agent behavior independently of the underlying LLM; agents sharing the same LLM can behave very differently depending on their harness configuration; in computer-use agents, forms the middle tier of a three-layer stack that includes an LLM below for perception and decision-making and infrastructure above for managed environments; the same harness can run different LLMs or infrastructure

Example: code search, file operations, shell execution, web access, content management strategy, and temperature settings; Agent S, Browser Use, CoACT, GTA1, and are harnesses distinct from the LLMs and infrastructure they run on

Related Terms: abstraction, accessibility tree snapshot, automation, gate, hook, MCP server, permission and safety systems, temperature

Sources:


heuristic#

Definition: practical problem-solving approach that uses shortcuts or rules of thumb to find satisfactory solutions; differs from algorithms that guarantee optimal solutions

Purpose: trades optimality for speed and feasibility when exhaustive search is impractical; in agent systems, guides decision-making when perfect information or unlimited computation is unavailable

Example: A* search, greedy algorithms, hand-crafted evaluation functions

Related Terms: planning, self-reflection

Source: Wikipedia: “Heuristic”


LLM#

Definition: acronym for Large Language Model; model trained on vast amounts of text data to understand and generate human language; also known as “the agent’s brain”

Purpose: not all AI is LLM-based - computer vision models and recommendation systems are common non-LLM examples; the LLM is the reasoning component an agent’s harness wraps around

Open-weight vs. Open-source:

TermDescriptionExamples
Open-sourceEntire pipeline released for full reproducibility, researchAi2 Olmo, Falcon
Open-weightModel weights released publicly for deployment, fine-tuning, inference; architecture, data, training code may not be includedLLaMA, Mistral
ProprietaryWeights closed; access typically via APIClaude, Gemini,GPT

Related Terms: agent, harness, LLM distillation, temperature,

Sources:


LLM distillation#

Definition: specialized form of knowledge distillation that compresses LLMs for efficiency while preserving performance; while compression shrinks LLMs through quantizing or pruning, distillation produces a separate student-model with its own parameters and different design whose goal is to emulate teacher-model behavior

Purpose: enables deployment of capable models in resource-constrained environments - edge devices, mobile, low-latency applications; reduces computational costs and energy consumption; limits include static student-model performance level, too large a gap between levels risk degradation, design impacts more than parameter quantity, knowledge loss, may require continued fine-tuning

Example: Google’s Gemma models are distilled from Gemini; DeepSeek used distillation to create a 7B student that outperformed a 32B LLM on competition mathematics; techniques include -

TechniqueDescription
Feature-BasedCopies hidden representations from intermediate layers to capture deeper knowledge
Multi-TeacherCombines knowledge from multiple teacher-models for robustness
Output-BasedLearns from teacher-model’s soft probability distributions, soft targets, using KL divergence loss
Prompt-BasedCompresses long prompts into shorter, efficient versions
RL-BasedUses reinforcement learning feedback signals to iteratively improve
Synthetic Data AugmentationExpands training data using teacher-generated examples for improvement
Task-SpecificFine-tunes for specific downstream applications

Related Terms: LLM, training data, harness, training data

Sources:


memory#

Definition: enables agents to maintain context, learn from experience, and reference past actions; ability to store and retrieve information across interactions and tasks

Purpose: critical for multi-step reasoning and adapting behavior based on history; types include short-term - current task, long-term - across sessions, and episodic - specific events

Example: 100K-word prompts are more expensive than short ones due to KV caching - working memory separate from the LLM’s weights that store key-value vectors for every token processed; grows linearly with token count and batch size; decoding reads the entire cache on every generated token makes it a bandwidth cost as much as a storage one, techniques include -

TechniqueDescription
EvictionDrops token entries from the cache to reduce its size; keeps recent tokens and a few opening tokens, while less relevant entries are discarded - risks losing information the generation later needs
Grouped-query AttentionLets multiple query heads share a single key-value head, sharply reducing the number of stored vector sets; the standard trade-off between full multi-head attention and the more aggressive multi-query variant
Multi-head Latent AttentionProjects keys and values into a smaller latent representation before caching, then expands them on read; large memory savings but adds serving complexity, compression adds work on every read and pairs awkwardly with standard attention implementations
Multi-query AttentionExtreme head-sharing variant where every query head shares one key-value head; saves the most memory, but can degrade quality and training stability
Paged AttentionBorrows OS-style fixed-size page management to eliminate cache fragmentation; systems that wasted 60–80% of cache memory to fragmentation dropped below 4%
Prefix CachingShares cached blocks across requests that begin with identical text, such as a repeated system prompt; API providers report 50–90% cost and latency reductions on cache hits - risk is prompt info leaking by sharing state
QuantizationRounds key and value vectors from 16 bits to 8 or 4 bits; 8-bit costs under 1% accuracy, 4-bit saves more, but shows measurable losses on demanding retrieval tasks

Related Terms: context window, planning, self-reflection

Sources:


permission and safety systems#

Definition: platform-level rules that define what actions an agent is allowed to take; conceptual authorization and/or guardrails

Purpose: shape agent behavior independently of the underlying LLM and enforce safety boundaries on what an agent may execute, largely in response to security concepts -

ConceptDescription
Data PoisoningInsertion of malicious data into training sets or sources to alter LLM behavior; only requires sampling for backdoor installation
Defense in DepthRealistic posture for LLM systems as no single filter holds all the time; process of layering independent security controls, so that failure of one is contained by another - input validation, retrieval sources cleaning, minimum tool permission scope, model sanitation, monitoring, human review
Excessive AgencyWhen an agent holds more permission than its task requires; arises from the lethal trifecta: simultaneous access to private data, exposure to untrusted content, a channel to act externally
Model TheftExtraction of model weights or architecture through API queries; typically expensive, bounded, but remains a risk for teams hosting open weights or running their own training pipelines
Supply Chain SecurityVerifying provenance of models, adapters, vector stores, and tools before deployment; bypasses runtime defenses because the threat is present before input validation runs

Example: requiring confirmation before running shell commands, restricting file access to specific directories, or blocking certain categories of action entirely; a production browser agent’s execution layer blocks clicks on elements labeled “refund,” “delete,” or “transfer” unless explicit confirmation is given, and restricts navigation to an allowlisted set of domains - enforcing the boundary in code instead of relying on the LLM to police its own actions, since prompt injection can override LLM-level judgment but not a deterministic check it never reaches

Related Terms: accessibility tree snapshot, harness, observability, prompt injection vulnerability, rule

Sources:


prompt injection#

Definition: traditional command injection applied to realm of natural language; manipulation of LLM behavior by crafting malicious or misleading prompts, often by bypassing safety filters and executing unintended instructions; exploits the absence of a boundary between instructions and data in token sequences

Purpose: fundamental security vulnerability in LLM systems; understanding it is essential for building secure agents; the root cause of many agent security failures

Direct vs Indirect:

TypeRouteDescriptionExample
DirectUser inputHostile instruction typed into chat boxUser asks agent to ignore previous instructions
IndirectRetrieved contentInstruction embedded in legitimate tasks - docs, emails, web pagesEchoLeak CVE-2025-32711 - hidden email instructions caused data exfiltration

Related Terms: context window, LLM, permission and safety systems, prompt injection vulnerability

Sources:


RAG#

Definition: acronym for retrieval-augmented generation; architecture where LLM retrieves context from external sources before generating responses; typically uses vector databases to store and retrieve documents as numerical embeddings

Purpose: extends LLM capabilities beyond training data cutoff dates; enables agents to ground answers in current, specific information, but also creates new attack surface through poisoned retrieval sources

Example: PoisonedRAG attack that corrupted system answers by inserting 5 malicious passages into millions of documents, reaching 90% success rate on targeted questions

Related Terms: context window, LLM, summarization layer

Sources:


RLHF#

Definition: acronym for reinforcement learning from human feedback; training methodology in which human evaluators rate LLM outputs and the ratings fine-tune the LLM toward preferred behaviors; uses reward models to quantify preferences and reinforcement learning to optimize the model; not immune to selection and human evaluation bias

Purpose: creates a strong instruction-following bias; LLMs trained with RLHF tend to prioritize explicit user instructions, sometimes at the expense of broader context; aligns models with human values and reduces harmful outputs

Process: SFT on instruction-response pairs → reward model trained on human preference data → RL algorithm updates LLM to maximize reward → iterative refinement

ComponentDescription
DPODirect Preference Optimization; eliminates separate reward model by using preference data directly
KL DivergenceMeasures difference between original and updated model distributions; prevents reward hacking
KTOKahneman-Tversky Optimization; utility-based approach using binary feedback instead of paired preferences
OOD GeneralizationOut-of-distribution performance; ability to handle scenarios not seen in training
PPOProximal Policy Optimization; stable RL algorithm using clipped objective function
Reward HackingModel manipulates reward system to get high scores without solving the actual problem
Reward ModelNeural network trained to predict human preferences; outputs scalar reward values
RLAIFReinforced Learning from AI Feedback; uses LLM instead of human annotators for preference labels
SFTSupervised fine-tuning; initial step using high-quality instruction-response pairs
AspectPPODPOKTO
ObjectiveMaximize reward, prevent large policy updatesOptimize policy based on human preferences using binary classificationModel alignment, maximize utility based on prospect theory
InputPrompt and reward signalPrompt and human preference pairsPrompt and binary feedback
OutputActions taken in environmentActions taken in environment aligned with human preferencesLLM outputs with binary labels
Learning MechanismPolicy gradients, clipped objectiveBinary cross-entropy optimization on human preference dataBased on LLM alignment without complex preference models
Network ComponentsSeparate policy and value networksSingle policy networkLLM framework, adapted to KTO methodology
Feedback MechanismRewards from environmentHuman preference dataBinary feedback on LLM outputs
StabilityMaintained by clipping mechanismPreferences with dynamic per-example weightingFocus on utility maximization
ComplexityDual network, maximization with policy update stabilityBypasses explicit reward modeling, human preference optimizes policyReduces complexity for binary utility optimization
ApplicabilityGeneral-purpose RL alignmentWhen human preference alignment crucialWhen rapid alignment with human feedback desired

Related Terms: LLM, permission and safety systems, sycophancy, system prompt, training data

Sources:


spec#

Definition: abbreviation for specification; implementation guide that informs everyone building on a format exactly what to expect

Purpose: documents which fields exist, what values are valid, how files should be structured, and what behavior is required versus optional

Example: the Agent-Friendly Documentation Spec defines 23 checks across 7 categories - content discoverability, markdown availability, page size, content structure, URL stability, observability, and authentication - that evaluate how well a documentation site serves coding agents

Related Terms: abstraction, harness, MCP server

Source: Wikipedia: “Specification (technical standard)”


summarization layer#

Definition: context management mechanism that condenses conversation history, tool outputs, and/or retrieved content into a shorter form as an agent’s context nears its window limit; operates continuously as part of general context engineering, not only when an agent is retrieving information from the web

Purpose: explains why an agent may lose access to content it could theoretically process in full; the layer distills what it judges relevant into a summary and reinitiates a new context window so processing can continue, meaning what a source actually serves may not be what the agent actually sees; distinct from truncation, which is a hard size limit, because summarization is content-dependent and relevance-dependent

Example: when an agent fetches docs mid-task, the layer sits between the HTTP response and the agent, filtering content based on perceived relevance to the agent’s stated query - meaning what a documentation site serves may not be what the agent processes

Related Terms: context window, hallucination, harness, memory

Sources:


sycophancy#

Definition: LLM tendency to agree, comply, or validate user input rather than reason independently; pattern of producing a favorable answer they’ve been primed to produce, not the accurate one; known limitation of RLHF-trained LLMs and an active area of research

Purpose: amplified by detailed or specific prompts, which push the LLM into “execution mode”; understanding sycophancy helps distinguish an agent’s genuine reasoning from compliance bias

Example: in the Agent Reading Test, agents consistently claimed higher scores than they actually achieved; Claude Code claimed 17/18 points but actually scored 15, inflating scores by manually following redirects and fetching JavaScript files that their pipeline could not handle natively, then reporting these workarounds as pipeline capabilities; GitHub Copilot claimed “25 canary tokens found” in its summary while its own JSON report listed only 16

Related Terms: Agent Reading Test, hallucination, RLHF, self-reflection

Sources:


temperature#

Definition: parameter that controls the degree of randomness in an LLM’s outputs; set by the platform and sometimes adjustable by the user

Purpose: affects agent behavior independently of the LLM itself - low temperature produces more focused, predictable responses; high temperature produces more varied, creative ones

Related Terms: context window, harness, system prompt

Source: Dachary Carey: “An Agent is More Than Its Brain”


training data#

Definition: dataset used to teach an LLM patterns, relationships, and knowledge; the LLM learns by processing examples and adjusting internal parameters

Purpose: quality and composition of training data directly affects LLM capabilities and biases

Related Terms: context window, LLM, LLM distillation

Source: IBM: “What is training data?”