Part IV — Autonomous Systems and Multi-Agent Architectures · Chapter 13

Agent Programs and Architectures

~45 min read5 interactive widgets9 plates

In this chapter

  1. Simple reflex agents
  2. Subsumption and layered architectures
  3. Model-based reflex agents
  4. Goal-based agents and the sense-plan-act cycle
  5. Hybrid architectures: TouringMachines and InterRRaP
  6. Utility-based agents
  7. Learning agents: the four components
  8. Reinforcement learning agents as an example
  9. AI agents and language agents
  10. AI agent components and agent SDKs
  11. Emerging standards: MCP and A2A
  12. Check your understanding

1. Simple reflex agents

Simple reflex agents select actions on the basis of the current percept, ignoring the rest of the percept history. They have no state: the same percept always produces the same action, through condition–action rules. This is the architecture embodied by the classic subsumption architecture line of work and by rule-based reactive systems.

SIMPLE REFLEX AGENT ENVIRONMENT current percept AGENT condition–action rules if percept then action · no state percept action no history: the same percept always yields the same action
Plate 13.1 — A simple reflex agent maps the current percept directly to an action through condition–action rules; the percept history is ignored and no internal state is kept.

2. Subsumption and layered architectures

The subsumption architecture is the best-known architecture for reactive agents, developed by Rodney Brooks. The agent’s decision-making is realized through a set of task-accomplishing behaviours arranged into hierarchical layers:

When the layers are combined, higher layers subsume the lower ones when appropriate, giving reactivity with a hierarchical organization of behaviours.

SUBSUMPTION ARCHITECTURE [BROOKS] AVOID OBSTACLES low-level · HIGH priority WANDER mid-level · priority EXPLORE / GOAL-DIRECTED high-level · LOW priority priority ↑ each behaviour: perceptual input → action · higher layers subsume lower ones when needed
Plate 13.2 — The subsumption architecture: task-accomplishing behaviours in hierarchical layers. Lower layers carry higher priority (e.g. avoid obstacles), higher layers are more abstract and subsume them when appropriate.

The general family of layered agent architectures organizes behaviours, or more generally reasoning capabilities, into layers that interact through defined interfaces — the subsumption architecture being the reactive member of the family.

3. Model-based reflex agents

Model-based reflex agents overcome the statelessness of simple reflex agents: the agent has an internal state that depends on the percept history, used to reflect at least some of the unobserved aspects of the current state. The internal state is updated as time goes by, using two kinds of knowledge:

Together, the transition model and the sensor model allow an agent to keep track of the state of the world, to the extent possible given the limitations of its sensors.

MODEL-BASED REFLEX AGENT ENVIRONMENT state AGENT state percept history model of world + sensor model condition–action rules on the internal state percepts actions transition model + sensor model keep track of the unobserved state
Plate 13.3 — A model-based reflex agent maintains an internal state, updated from percepts using a model of the world and a sensor model; the condition–action rules then fire on the internal state rather than on the raw percept.

4. Goal-based agents and the sense-plan-act cycle

A model-based goal-based agent has an explicit knowledge and representation of the goal/task to accomplish. The agent program combines this with the model (the same information used by the model-based reflex agent) to choose actions that achieve the goal. Search and planning are the subfields of AI devoted to finding action sequences that achieve the agent’s goals.

Decision making of this kind is fundamentally different from condition–action rules: it involves consideration of the future. The classic realization is the Sense-Plan-Act architecture: sense the environment, plan a course of action that achieves the goal, act on it; then repeat.

GOAL-BASED AGENT · SENSE–PLAN–ACT SENSE perceive environment update state via model PLAN search action sequence that achieves the goal ACT execute actions affect environment loop: sense → plan → act → sense … consideration of the future — unlike condition–action rules
Plate 13.4 — The goal-based agent decides with an eye on the future: search and planning find action sequences that achieve the explicit goal, realized through the sense-plan-act cycle.

5. Hybrid architectures: TouringMachines and InterRRaP

Reactive and deliberative layers each have weaknesses: pure reactivity cannot pursue long-term goals; pure deliberation is too slow for dynamic environments. Hybrid architectures combine both in layers, with a control mechanism deciding which layer drives behaviour at each moment. Two classic examples:

Why this matters for Chapter 14

The layering tension — react while deliberating, deliberate while reacting — is resolved in the BDI architecture by interleaving plan selection and action execution. The BDI reasoning cycle of Chapter 14 is, in a precise sense, the mature answer to the hybrid-architecture problem.

6. Utility-based agents

In many real-world scenarios, goals alone are not enough to generate high-quality behaviour: there may be different action sequences achieving the goal, some evaluated better than others with respect to the performance measure — goals provide only a crude binary distinction between “happy” and “unhappy” states. A more general performance measure allows a comparison of different world states according to exactly how happy they would make the agent. Because “happy” does not sound scientific, economists and computer scientists use the term utility.

UTILITY-BASED AGENT ACTIONS + OUTCOMES uncertain outcomes with probabilities partial observability AGENT utility function U(state) choose arg max E[U] over outcomes state action utility = internalized performance measure · maximizes expected utility goals give a binary happy/unhappy; utilities rank how happy
Plate 13.5 — Utility-based agents internalize the performance measure as a utility function and choose the action maximizing expected utility, handling uncertainty from partial observability or conflicting goals.

7. Learning agents: the four components

The central question: how do the agent programs come into being? In his famous early paper, Turing (1950) considers programming his intelligent machines by hand, estimates the work, and concludes that “some more expeditious method seems desirable” — the method he proposes is to build learning machines and then to teach them. In many areas of AI this is now the preferred method for creating state-of-the-art systems; any type of agent (model-based, goal-based, utility-based, etc.) can be built as a learning agent or not.

A learning agent can be divided into four conceptual components:

LEARNING AGENT [RN] ENVIRONMENT percepts · state feedback actions LEARNING AGENT PERFORMANCE ELEMENT CRITIC fixed standard LEARNING ELEMENT PROBLEM GENERATOR exploratory actions percepts actions critic → feedback on performance standard → learning element → improves performance element problem generator suggests exploratory actions (experiments)
Plate 13.6 — The learning agent in four components: performance element (acts), critic (evaluates against a fixed standard), learning element (improves), and problem generator (explores). After Russell & Norvig.

8. Reinforcement learning agents as an example

Reinforcement Learning (RL) agents instantiate the four components concretely. The policy π(s) selects the action; a state estimator may be needed if percepts ≠ states. Typical implementation:

The four components map onto RL machinery:

REINFORCEMENT LEARNING AGENT ENVIRONMENT state s(t+1) reward r(t+1) action a(t) AGENT POLICY π(s) exploit argmax Q CRITIC TD error δ LEARNING ELEMENT PROBLEM GENERATOR ε-greedy explore s, r a Q-learning: Q(s,a) ← Q(s,a) + αδt · critic signal δ = “better (or worse) than expected” exploration vs exploitation: ε-greedy, softmax, UCB, curiosity bonuses
Plate 13.7 — An RL agent instantiates the learning-agent components: the policy exploits Q-values, the critic produces the TD error δ, the learning element updates Q, and the problem generator injects exploration (e.g. ε-greedy).

9. AI agents and language agents

AI agents / “language agents” — also called LLM-based autonomous agents or “generative agents” — are the “AI Agents” of Agentic AI: agent systems whose reasoning core is a large language model. The reference model used by the module is Sumers, Yao, Narasimhan and Griffiths, Cognitive Architectures for Language Agents (TMLR, 02/2024), which explicitly frames language agents as a species of cognitive architecture — the connection to Chapter 14.

Their architecture is based on prompt-engineering techniques and runs a continuous cycle of perception, reasoning, planning, action and reflection (see Plate 13.8).

AI AGENTS KEY COMPONENTS [GOOGLE AGENT SDK] PERCEPTION gathers information: sensors, databases, user interfaces REASONING LLM analyzes the data: context, relevant information PLANNING develops a plan: goals, steps, best way to achieve ACTION performs tasks, makes decisions, interacts REFLECTION learns from results, adjusts continuous cycle ↑ learning & improving over time ↑ based on prompt-engineering techniques · (from Google Agent SDK)
Plate 13.8 — The AI-agent components from the Google Agent SDK: a continuous cycle of perception, reasoning, planning, action and reflection, with learning and improvement over time.

10. AI agent components and agent SDKs

Several in-progress technologies (libraries, frameworks, platforms) support building such agents. Main examples:

The programming style is declarative configuration around an LLM core, with tools, instructions and input schemas. The course’s example comes from Google ADK (2025):

Note the architectural echoes: instruction is a goal in natural language, tools are the action repertoire, and inputSchema defines the agent’s interface with the world — the vocabulary of Chapter 12 reappears in the agentic wave.

11. Emerging standards: MCP and A2A

Two emerging “standards” frame the agentic wave:

MCP and A2A are complementary: MCP connects an agent to its tools and data sources (the agent–environment interface), while A2A connects agents to each other (the agent–agent interaction). Chapter 15 will revisit this complementarity from the MAS side, contrasting “tool”/MCP with artifacts (A&A) and A2A with agent communication languages.

MCP & A2A ARE COMPLEMENTARY AGENT LLM + tools TOOLS / DATA via MCP OTHER AGENTS via A2A MCP: agent ↔ tools/data · A2A: agent ↔ agent — two orthogonal axes of the same system
Plate 13.9 — MCP standardizes how agents integrate tools and data sources; A2A standardizes communication between agents. The two protocols are complementary rather than competing.

Check your understanding

Describe simple reflex agents and the subsumption architecture.

Simple reflex agents select actions on the basis of the current percept, ignoring percept history, with no state — condition–action rules. The subsumption architecture (Brooks) realizes reactive decision-making through task-accomplishing behaviours arranged in hierarchical layers; each behaviour maps perceptual input to an action, higher layers (lower priority) are more abstract, and low-level layers carry high priority (e.g. avoid obstacles).

How do model-based reflex agents keep track of the world?

They maintain an internal state that depends on the percept history, reflecting unobserved aspects of the current state. The state is updated over time using two kinds of knowledge: a model of the world (how the world changes, effects of the agent’s actions, how it evolves independently) and a sensor model (how the world state is reflected in percepts). Together they let the agent track the world to the extent its sensors allow.

What distinguishes goal-based agents, and what is the sense-plan-act cycle?

Goal-based agents have an explicit representation of the goal/task and combine it with the world model to choose actions that achieve it; decision making involves consideration of the future. Search and planning are the AI subfields that find action sequences achieving goals. The sense-plan-act cycle realizes this: sense the environment, plan a course of action, act, and repeat.

Why do utility-based agents need a utility function rather than just goals?

Goals give only a crude binary distinction between “happy” and “unhappy” states, while different action sequences achieving a goal may be evaluated differently by the performance measure. The utility function internalizes the performance measure, ranking states by how good they are, and is essential for decision making under uncertainty (partial observability, conflicting goals). A rational utility-based agent chooses the action maximizing expected utility of outcomes.

Name and describe the four components of a learning agent.

Performance element — selects external actions (what we previously called the whole agent). Critic — tells the learning element how well the agent is doing against a fixed performance standard (percepts alone do not indicate success). Learning element — uses critic feedback to modify the performance element; its design depends on the performance element’s design. Problem generator — suggests exploratory actions leading to new, informative experiences, balancing short-run suboptimality against long-run discovery.

How do the four learning-agent components map onto reinforcement learning?

The policy π(s) is the performance element, selecting actions (exploit: argmaxa Q(s,a)). The critic receives (state, action, reward, next state) and produces an evaluation signal — the TD error δ, positive meaning “better than expected”, negative “worse”. The learning element uses δ to update internal parameters (Q-table or network weights), e.g. tabular Q-learning. The problem generator injects exploration into the policy (ε-greedy, softmax, UCB, curiosity bonuses), balancing exploration vs exploitation.

What are AI agents / language agents, and what cycle do they run?

AI agents (LLM-based autonomous agents, generative agents) are agent systems whose reasoning core is a large language model, framed as cognitive architectures for language agents (Sumers et al., TMLR 2024). Their architecture is based on prompt-engineering techniques and runs a continuous cycle: perception (gather information from sensors, databases, UIs), reasoning (LLM analyzes the data and formulates solutions), planning (set goals, break them into steps), action (perform tasks, interact with systems), and reflection (evaluate results and adjust future plans).

What are MCP and A2A, and why are they complementary?

MCP (Model Context Protocol, Anthropic, Nov 2024) is an open standard for how AI systems integrate and share data with external tools, systems and data sources — the agent–environment interface. A2A (Agent to Agent, Google) is an open standard for communication and collaboration between AI agents — the agent–agent interface. They are complementary because they standardize two orthogonal axes of the same system: tools/data access and inter-agent communication.

Why does the module call LLM-based agent programming “the newest kind of agent program”?

Because the same abstraction holds: an explicit goal (the instruction), an environment (tools, data sources, input schema), autonomy (the LLM decides the steps), perception (tools/sensors), and action (tool calls). The declarative LlmAgent example from Google ADK shows goals, action repertoires and interfaces reappearing in the agentic wave — the vocabulary of Chapter 12 remains the vocabulary of AI agents.