What Makes an Agent: Beyond Simple Prompts
What Makes an Agent: Beyond Simple Prompts
Consider two scenarios. In the first, you type a question into a chat interface and receive a polished, informative response. The AI synthesizes information, structures an answer, and delivers it with confidence. Impressive, certainly. But when you close the browser, the interaction ends. The AI didn't pursue implications you didn't ask about. It didn't notice the inconsistency in your premise. It certainly didn't take any action in the world beyond generating text.
Now consider the second scenario. You give an AI system a goal: "Research our competitor's latest product release and identify three weaknesses we can exploit." Instead of generating a single response, this system begins a sustained campaign. It searches the web, reads press releases, analyzes customer reviews, cross-references pricing data, drafts a strategic memo, saves findings to a shared document, and flags the most relevant insights for your attention—all while keeping you informed of its progress and asking clarifying questions when needed.
What separates these two systems? Why does the second qualify as an *agent* while the first, despite its linguistic sophistication, does not? These aren't semantic games. Understanding the distinction shapes every architectural decision you'll make, every system you'll build, and every expectation you'll set for AI systems going forward.
This chapter establishes the foundational concepts that will guide everything else in this book. We'll explore what agency actually means in the context of AI systems, why the difference matters enormously for practical applications, and how the best systems in the industry have operationalized these concepts. By the end, you'll have a clear mental model for evaluating any AI system—and a vocabulary for discussing what makes agents fundamentally different from the language models that power them.
---
Defining Agency: What Separates Actors from Answer Machines
The term "agent" gets thrown around carelessly in AI discourse. Every language model gets rebranded as an "agent" the moment it can call a function or maintain a conversation. But rigorous definitions matter, especially when we're building systems that will make decisions and take actions in real environments.
The Three Pillars of Agency
True agency in AI systems rests on three interlocking properties: autonomy, reactivity, and goal-directed behavior. Understanding each clarifies what we're actually trying to build.
Autonomy means the system can operate independently, making decisions and taking actions without constant human intervention. When you give an autonomous agent a task, it doesn't wait for you to approve every micro-decision along the way. It proceeds, exercising judgment about when to continue and when to seek guidance. Autonomy exists on a spectrum—a truly autonomous agent might complete complex multi-day tasks with minimal touchpoints, while a semi-autonomous one might require approval at key checkpoints. The critical point is that the system isn't purely reactive, waiting for each human input before proceeding.
Consider a customer service agent at a software company. A non-autonomous system would respond to each customer message and wait. An autonomous agent, given access to the ticketing system and knowledge base, could proactively investigate issues, draft resolutions, and take corrective actions—all without a human in the loop for routine matters.
Reactivity means the system can perceive its environment and respond to changes in real time. This goes beyond simply receiving inputs; it means the system monitors what happens after its actions and adjusts accordingly. A highly reactive agent notices when a search doesn't return useful results and pivots to a different strategy. It detects when a tool fails and attempts recovery. It observes that user feedback is becoming frustrated and recalibrates its approach.
The contrast with purely generative systems is stark. A standard language model generates text based on its training and the prompt; it has no mechanism for observing the consequences of its previous outputs or adapting to new information that arrives after generation completes. Reactivity requires a feedback loop that connects actions to outcomes.
Goal-directed behavior is perhaps the most distinctive property. An agent doesn't just respond to stimuli; it pursues objectives. This means maintaining a representation of what it's trying to achieve, reasoning about how different actions contribute to that goal, and persisting through obstacles and setbacks. A goal-directed system takes initiative that wasn't explicitly scripted because it recognizes that initiative serves its objectives.
When you ask a goal-directed agent to "improve our documentation," it doesn't just describe improvement—it identifies specific gaps, drafts new content, integrates it into existing structures, and verifies the result meets quality standards. The goal isn't merely to generate text; it's to achieve an outcome.
Autonomy Without Agency: The Case of Sophisticated Autocompletion
Here's where intuition can mislead. Consider a system that generates remarkably sophisticated outputs, completes complex coding tasks, and produces seemingly creative solutions. Doesn't that constitute agency?
Not necessarily. The crucial question is whether the system is *directing its own behavior toward goals* or simply generating impressive completions to prompts.
A language model that writes production-quality code is performing a sophisticated linguistic task. A true coding agent, however, takes ownership of the objective. It decides what files to examine, what tests to write, what edge cases to consider, and when to escalate to a human. The code generation is a tool in service of a goal, not the goal itself.
This distinction explains why the most impressive language models can still fail as agents. A model might write elegant Python when prompted, but that same model, asked to "automate our data pipeline," might generate code that looks right but makes catastrophic assumptions about the environment, ignores error conditions, and produces no mechanism for monitoring or recovery. Agency requires scaffolding that bridges the gap between impressive generation and reliable performance in the real world.
Why These Definitions Matter for Architecture
When you design an agent system, you'll make dozens of decisions about where to place autonomy, how much reactivity to build in, and how to represent and track goals. These aren't arbitrary choices—they're engineering decisions with concrete consequences.
An agent with too little autonomy becomes a fancy傀儡, generating text that describes actions without taking them. An agent with too much autonomy, without appropriate guardrails, becomes unpredictable and potentially harmful. Reactivity that is too shallow produces systems that repeat mistakes; reactivity that is too sensitive produces systems that over-correct and never complete tasks. Goal representation that is too rigid produces brittle systems; too flexible, and the agent loses coherent direction.
Understanding agency as the combination of these three properties gives you a framework for making these tradeoffs consciously. As we explore specific architectures throughout this book, we'll return repeatedly to how each design choice affects autonomy, reactivity, and goal-directed behavior.
---
The Agent Loop: A Fundamental Pattern Underlying All Agent Systems
If agency is the destination, the agent loop is the engine. Every AI agent, regardless of its specific application or complexity, implements some version of a fundamental cycle: observe, think, act, learn. Understanding this loop is essential for both evaluating existing systems and designing new ones.
The Four Phases of the Agent Loop
```mermaid flowchart TD A[Observe] --> B[Think] B --> C[Act] C -->