Foundations of AI Agent Systems / AI Agent系统基础
Foundations of AI Agent Systems
The notion of an autonomous agent capable of perceiving its environment, reasoning about its observations, and taking actions to achieve specific objectives has captivated artificial intelligence researchers since the field's inception. What distinguishes modern AI agents from their historical predecessors is not merely the sophistication of their algorithms, but a fundamental architectural shift: the transition from handcrafted rule-based systems to learned, adaptive architectures where large language models serve as the cognitive core. This transformation has profound implications for how we conceptualize, design, and deploy intelligent systems in real-world applications.
The significance of this shift cannot be overstated. Early AI systems operated within tightly constrained domains, following explicit programming to solve well-defined problems. Contemporary autonomous agents, by contrast, must navigate open-ended environments, interpret ambiguous instructions, and adapt their behavior to novel situations—capabilities that demand a qualitatively different architectural approach. Understanding this evolution, and the theoretical foundations that underpin it, forms the essential groundwork for mastering the design and implementation of modern AI agent systems.
This chapter establishes the conceptual and theoretical foundations necessary for understanding modern AI agent systems. We begin by providing rigorous definitions of what constitutes an agent in artificial intelligence, distinguishing between simple reactive agents and sophisticated autonomous agents capable of complex reasoning. We then trace the historical evolution of agent paradigms from early expert systems to contemporary LLM-based agents, examining how advances in natural language understanding and generation have fundamentally transformed agent architecture. The core of this chapter explores the perception-thinking-action paradigm that structures agent behavior, along with the various models of agent-environment interaction that characterize different agent architectures. We examine the revolutionary role that large language models now play as the cognitive core of modern autonomous agents, before introducing the three pillars framework—tool calling, dialogue management, and planning—that will structure the remainder of this book.
Defining AI Agents: From Simple Reactivity to Complex Autonomy
The formal study of intelligent agents in artificial intelligence requires precise definitions that distinguish meaningful categories of agency. An agent, in the most general sense, is any entity that can perceive its environment through sensors and act upon that environment through effectors. This definition, while foundational, encompasses an enormous range of systems—from a simple thermostat that senses temperature and controls heating to sophisticated robots navigating complex terrain. The meaningful distinctions among agents emerge when we consider the nature of their decision-making processes and the complexity of their behavioral repertoire.
Simple reactive agents represent the most fundamental category of artificial agents. These systems operate on a direct mapping from perceptual input to behavioral output, without maintaining internal representations of the world or engaging in deliberative reasoning. The thermostat exemplifies this category: it perceives the current temperature, compares this input against a setpoint, and directly triggers heating or cooling actions. More sophisticated reactive agents may employ finite state machines or lookup tables that map specific situations to predetermined responses, but the fundamental architecture remains one of direct stimulus-response coupling without intermediary representation or reasoning.
The limitations of purely reactive systems become apparent when agents must operate in environments that require maintaining information across time, planning sequences of actions to achieve distant goals, or adapting behavior based on accumulated experience. These requirements gave rise to model-based agents, which maintain internal representations of the environment state and can therefore engage in more sophisticated reasoning about action consequences. A model-based agent might represent not just the current temperature but also the rate at which the environment heats or cools, the capacity of the heating system, and the thermal characteristics of the space—information that enables more intelligent action selection even when the current perceptual input alone would not dictate the optimal response.
The distinction between reactive and deliberative capabilities marks an important boundary in agent taxonomy, but modern autonomous agents extend beyond this binary categorization. Goal-based agents incorporate explicit representations of objectives and can reason about action sequences that lead to goal achievement. Utility-based agents evaluate outcomes according to preference functions, enabling nuanced trade-offs between competing objectives. Learning agents improve their performance over time based on feedback from the environment, adapting both their perceptual processing and their decision-making strategies.
For the purposes of this book, we adopt the following working definition of an autonomous agent:
> An autonomous agent is a software system that (1) operates continuously in an environment, (2) perceives its environment and updates its internal state accordingly, (3) maintains and updates representations of its goals and the means available to achieve them, (4) selects and executes actions based on deliberative processes that consider its goals, beliefs, and environmental constraints, and (5) can interact with other agents and human users through natural language or structured protocols.
This definition emphasizes several key characteristics that distinguish modern autonomous agents from simpler reactive systems. First, continuous operation implies that agents are designed to function over extended periods, adapting to changes in their environment and their goals. Second, the presence of deliberative processes distinguishes agents that "think" about their actions from those that merely react. Third, the capacity for interaction—particularly through natural language—reflects the transformative impact of large language models on agent architecture.
The relationship between these characteristics and the three pillars framework we introduce later in this chapter becomes clear when we consider the architectural implications. Goal representation and deliberative reasoning require sophisticated planning capabilities. Natural language interaction demands robust dialogue management. And the ability to extend agent capabilities through external tools requires effective tool calling mechanisms. Together, these three pillars form the foundation upon which modern autonomous agents are constructed.
Historical Evolution of Agent Paradigms
Understanding the current state of AI agent systems requires appreciation of the historical trajectory that produced them. The evolution from early expert systems to contemporary LLM-based agents reflects not merely technological advancement but fundamental shifts in how researchers conceptualized intelligence and agency.
The Expert System Era: Rule-Based Reasoning
The first wave of practical AI systems, emerging in the 1960s and 1970s, took the form of expert systems—programs designed to encode and apply domain expertise from human specialists. Systems like DENDRAL (for chemical structure identification), MYCIN (for medical diagnosis), and their successors demonstrated that AI could provide valuable assistance in specialized domains by encoding expert knowledge as explicit rules. These systems operated on a production rule architecture: a knowledge base of if-then rules combined with an inference engine that applied