Foundations and Evolution of AI Agents
Consider a customer service scenario: a user writes, "My flight to Boston tomorrow is canceled, and I need to attend a critical meeting. Please help." A non-agentic system might simply retrieve the airline's cancellation policy text. An intelligent agent, however, perceives this message, formulates a goal (get the user to Boston), devises a plan (check alternative flights, book a hotel if needed, notify the meeting organizer), and executes a sequence of actions: querying flight APIs, cross-referencing the user's calendar, drafting a notification email, and presenting a summarized solution with options for confirmation. This autonomous, goal-directed, multi-step reasoning and action is the essence of modern AI agentic systems. This chapter establishes the intellectual framework for understanding such systems. We will trace the historical lineage of the agent concept from its roots in symbolic AI and philosophy through the reinforcement learning revolution to the current paradigm dominated by Large Language Models (LLMs). We will rigorously define the core terminology—agent, environment, action, observation—and distinguish agentic from non-agentic architectures. Foundational theoretical models, particularly the Belief-Desire-Intention (BDI) framework and Markov Decision Processes (MDPs), will be reviewed not as historical curiosities but as living blueprints that inform contemporary design. Finally, we will conduct a critical examination of the paradigm shift induced by LLMs, arguing that they represent a novel substrate for agent construction, one that merges semantic reasoning with probabilistic planning, thereby setting the precise architectural challenges—tool integration, conversational grounding, and reliable planning—that constitute the core subject of the subsequent chapters.
Defining the Core: Agent, Environment, and the Action-Observation Loop
At its most abstract, an intelligent agent is a system that perceives its environment through observations and acts upon that environment via actions to achieve goals. This definition, while succinct, encodes a powerful loop that is the heartbeat of any autonomous system. The environment encompasses everything external to the agent: it could be the physical world for a robot, a software API ecosystem for a digital assistant, or a text-based simulation for a game-playing AI. The observation is the agent's percept, its partial and potentially noisy window into the environment's state. The action is the agent's effector, its mechanism for changing the environment's state. The agent's internal policy maps sequences of observations to actions, ideally in a way that maximizes a cumulative notion of utility or reward over time.
This interaction is formally modeled as a sequential decision-making process. For a discrete-time setting, we define:
Let $s_t \in \mathcal{S}$ be the true state of the environment at time $t$. Let $o_t \in \mathcal{O}$ be the observation received by the agent at time $t$, where $o_t = f(s_t)$ for some potentially partial and stochastic observation function $f$. Let $a_t \in \mathcal{A}$ be the action selected by the agent at time $t$. The environment's dynamics are governed by a transition function $T: \mathcal{S} \times \mathcal{A} \rightarrow \mathcal{S}$, such that $s_{t+1} = T(s_t, a_t)$, which may be stochastic.
The agent's behavior is defined by its policy, $\pi: \mathcal{O}^* \rightarrow \mathcal{A}$, which maps the history of all past observations $o_{1:t}$ to a probability distribution over actions. The objective is to find a policy $\pi^*$ that maximizes the expected cumulative discounted return: $$R = \mathbb{E}_{\pi} \left[ \sum_{t=0}^{\infty} \gamma^t r(s_t, a_t) \right]$$ where $r(s_t, a_t)$ is the immediate reward signal from the environment, and $\gamma \in [0,1]$ is a discount factor that prioritizes near-term over long-term rewards.
This formalism, the Markov Decision Process (MDP), is the cornerstone of sequential decision theory. Its power lies in the Markov property: the future state depends only on the current state and action, not on the history. However, in many real-world settings, the agent does not directly observe $s_t$; it only sees $o_t$. This leads to the Partially Observable MDP (POMDP), where the agent must maintain an internal belief state—a probability distribution over possible environment states—based on the observation history. The maintenance and utilization of this belief state is a primary function of an agent's cognitive architecture.
The Agentic Spectrum: From Scripted Bots to Autonomous Systems
Not every software system that calls itself a "bot" or "assistant" qualifies as an agent in this rigorous sense. To clarify, we can position systems along a spectrum of agency:
| Dimension | Non-Agentic System | Agentic System | | :--- | :--- | :--- | | Control Flow | Pre-defined, static, or simple conditional branching (if-then-else). | Dynamic, goal-driven, contingent on environment feedback. | | State Management | Stateless or session-scoped, with no persistent model of the world. | Maintains an internal world model (belief state) that is updated by observations. | | Planning Horizon | Single-turn, reactive. No consideration of future states. | Multi-step, deliberative. Considers consequences of actions over a horizon. | | Tool Use | Integrated at design-time; calls are hard-coded. | Discovers and selects tools dynamically based on current goals and beliefs. | | Failure Handling | Pre-programmed error messages; no adaptation. | Can detect failure (e.g., API error, unsatisfied preconditions), diagnose, and replan. | | Example | A FAQ chatbot that matches keywords to answers. | A travel assistant that books a multi-city trip by orchestrating flight, hotel, and car rental APIs. |
A non-agentic system executes a fixed script. It may be sophisticated (e.g., using deep learning for intent classification), but its behavior is fundamentally a complex lookup or a single-step transformation. An agentic system, in contrast, exhibits a degree of autonomy: it decides *what* to do next based on a model of how its actions affect the world relative to its goals. This distinction is not merely academic; it dictates architectural requirements. Agentic systems necessitate components for goal management, state estimation, planning/search, and execution monitoring—the very components we will dissect in later chapters.
A Historical Lineage: From Symbolic Reasoning to Probabilistic Learning
The intellectual tradition of artificial agents is rich and multifaceted, drawing from philosophy, logic, economics, and control theory. Understanding this lineage is crucial for appreciating the compromises and innovations in modern designs.
The Classical Era: Symbolic AI and Logic-Based Agents (1960s-1980s)
Early AI research, often termed "Good Old-Fashioned AI" (GOFAI), posited that intelligence resided in the manipulation of abstract symbols according to formal logic. The Physical Symbol System Hypothesis (Newell & Simon, 1976) claimed that such a system has the necessary and sufficient means for general intelligent action.
Agents in this era were often logic-based. They operated on a knowledge base (KB) of facts and rules, using inference engines (e.g., forward or backward chaining) to derive new facts or decide actions. The environment was typically a well-defined, static, and fully observable domain (e.g., a blocks world). The STRIPS planner (Fikes & Nilsson, 1971) is a seminal example. It represented the world with logical predicates (e.g., `On(A, B)`, `Clear(C)`) and actions with preconditions (what must be true to execute) and effects (what becomes true/false after execution). Planning was a search problem through a space of world states, using operators to tra