AGAI-L01: Agents, Multiagent Systems and Agentic AI

In short

What is an agent, what changes when there are many, and how do LLM agents fit a field decades older than LLMs? An agent perceives its environment and acts on it; the interesting part is the program mapping observations to actions, from reflex rules up to learning. Several agents in one environment make a multi-agent system, where agents communicate, cooperate, conflict and deceive, studied with tools from game theory and social choice.

An LLM agent runs the same loop in natural language: a model wrapped in a role, memory, tools and planning, cycling through thought, action and observation (ReAct). Such agents can be improved, must be evaluated, and raise new risks when many interact. Even the simplest agents face dilemmas of cooperation, coordination, population change, deception and badly chosen rewards.

Exam format is not yet known; expect the agent definitions and types, the LLM agent loop and its components, and the dilemmas.

What makes something an agent

Two classic definitions frame the course.

Agent (Russell and Norvig, AIMA, 4th ed.)

“An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment through actuators.”

Agent (Wooldridge 2001, An Introduction to Multiagent Systems)

“An agent is a computer system that is situated in some environment, and that is capable of autonomous action in this environment to meet its design objectives.”

Both put the agent in a loop with an environment: it observes, acts, and observes the result. Russell and Norvig stress the perception-action interface (sensors in, actuators out) and say “can be viewed as”: being an agent is a way of describing a system. Wooldridge stresses autonomy (the system decides for itself, without a human choosing each action) and objectives (it acts to meet goals its designer gave it). A robot vacuum cleaner fits both: it senses dirt, moves and sucks, decides alone, and is built to keep the floor clean. A rational agent picks the action expected to maximise its performance measure (the criterion, set by the designer, that scores how well the agent’s behaviour achieves what is wanted), given what it has perceived and knows; the full treatment is in AGAI-Book Ch2 - Intelligent Agents.

The agent idea is a lens

Russell and Norvig add a caveat:

“The notion of an agent is meant to be a tool for analyzing systems, not an absolute characterization that divides the world into agents and non-agents. One could view a hand-held calculator as an agent that chooses the action of displaying “4” when given the percept sequence “2 + 2 =,” but such an analysis would hardly aid our understanding of the calculator.”

The useful question is whether describing a system as an agent helps. For a calculator it does not: there is no choice worth explaining. For a vacuum robot or an LLM that searches the web until it can answer, it does, because they choose among actions in pursuit of an objective. The definitions came long before LLMs, and they turn out to cover them.

From reflexes to learning: the agent program

“Observations in, action out” is simple; the program doing the mapping can be very simple or very complex. Russell and Norvig order agent programs by how much they represent (see Agent Program):

  • Simple reflex agent: acts on the current percept only, through condition-action rules. The vacuum agent “if the square is dirty, suck; otherwise move to the other square” is one.
  • Model-based reflex agent: keeps an internal state, a model of the parts of the world it cannot see right now, updated from what it perceives and what its actions do.
  • Goal-based agent: adds goal information and asks “what will happen if I do this, and does it get me to the goal?” This is where search and planning come in.
  • Utility-based agent: replaces the yes/no goal with a utility function, an internal version of the performance measure, so it can trade off conflicting goals (speed against safety) and weigh uncertain outcomes.
  • Learning agent: any of the above, plus a way to improve itself from feedback.

What learning adds, and why it is hard

Learning (Russell and Norvig)

The “process of modification of each component of the agent to bring the components into closer agreement with the available feedback information, thereby improving the overall performance of the agent.”

A learning agent learns its policy (the rule that picks an action in each situation) from experience, which weeks 2 and 3 treat as reinforcement learning. Three difficulties:

  • Estimating the value of actions is hard. Feedback is noisy and often delayed, so it is unclear which action earned a reward.
  • Exploration versus exploitation. To find the best action the agent must try actions that look worse now; to score well it must use what it knows.
  • Non-stationary environments, above all with other agents. Single-agent RL assumes fixed environment rules (a Markov Decision Process). If other agents learn too, their behaviour shifts, so from each agent’s point of view the environment keeps changing and what it learned yesterday may be wrong today.

Many agents in one environment

Multi-agent system (MAS)

A system in which more than one agent inhabits the environment.

Each agent still observes and acts, but now the other agents are part of what it observes and its actions change their situation. Agents in a MAS communicate, cooperate, conflict and deceive, among other things. Examples: RoboCup (robot football teams), robotic vacuum cleaners sharing a building, social media bots, autonomous vehicles on the same road, and stock trading bots in the same market.

Where the field comes from

Multi-agent systems are an old part of AI with roots outside it. Mathematics, economics and philosophy gave rise to game theory (the mathematics of strategic interaction, where each party’s outcome depends on what the others do) and social choice (aggregating individual preferences into a group decision, as in voting). Multi-agent research in AI builds on both. Milestones:

  • 1980 to 1988: the Contract Net Protocol (1980), Minsky’s The Society of Mind (1986), distributed AI (1988).
  • 1993 to 1995: agent-oriented programming and BDI (belief-desire-intention) agents; automated negotiation in Rules of Encounter (1994); learning in games, with multi-agent RL and non-stationarity (1994).
  • Around 2000: computational social choice, algorithmic game theory, affective computing; the AAMAS conference (2002).
  • 2010s: multi-agent RL and norms; from 2015 deep multi-agent RL, AlphaGo and Libratus (outside the course material: a poker program).
  • 2022: agentic AI.

The course draws mainly on game theory and multi-agent reinforcement learning.

Why the course runs from simple agents to LLM agents

The course has three parts, and the order is deliberate.

  1. Simple agents and game theory. Even reflex agents with tiny action sets produce complex dynamics when they interact: populations shift and dilemmas appear.
  2. Learning agents and multi-agent RL. Learning agents already show problems that LLM agents have, such as reward hacking. RL is also used to train LLM agents, and some RL algorithms (AlphaZero) inspired similar techniques for LLM reasoning.
  3. LLM-based agentic systems. How LLM agent architectures and systems are built, so you can understand and design them beyond using agentic tools, with a focus on modern multi-agent dynamics.

LLM agents: reasoning and acting in language

An LLM Agent runs the same loop, but it acts, observes, reasons and plans through natural language: its objectives arrive as text, its reasoning is generated text, and its actions are text that another program executes.

One language model can do this because token completion is multi-task. Next-token prediction covers world knowledge (“The capital of The Netherlands is …”), history (“The French Revolution happened in …”), planning (“If I want to bake a cake the first action to do is …”) and mathematical reasoning (“2 + 2 = …”) with one mechanism.

A bare model only maps a prompt to a completion. Four additions turn it into an agent: a role (who it is and what it is for), memory, tools and planning.

The thought-action-observation loop and ReAct

An LLM agent works in a loop: (1) reason and plan in text, (2) act, (3) observe the result, then reason again.

ReAct (Yao et al., ICLR 2023) is a prompting technique for this loop. It makes a language model generate both verbal reasoning (text) and actions (text), interleaved and repeated: Thought, Action, Observation. Each step brings in one of the agent’s components:

  • Thought forces the model to think in several steps, as in chain-of-thought: reasoning.
  • Action is text that interacts with external tools: tools.
  • Observation puts the tool’s output back into the model’s context: memory.

A ReAct trace (illustration, not from the course material)

Thought: The user asks whether to take an umbrella in Amsterdam. I need the current weather. Action: weather("Amsterdam") Observation: light rain, 12 °C Thought: It is raining, so the answer is yes. Action: finish("Yes, it is raining in Amsterdam right now.")

Reasoning models: thinking with tokens

A reasoning LLM generates thoughts as tokens before its final answer. The shift is from train-time compute (a better model through more training) to test-time compute (a better answer through thinking longer when asked): more tokens, more computation.

  • Prompt engineering elicits reasoning from models never tuned for it: chain-of-thought (CoT) prompting (Wei et al., NeurIPS 2022), zero-shot (no examples in the prompt) or few-shot (a few worked examples with their reasoning).
  • Improving the model’s reasoning: search and verify samples many reasoning traces and rewards the best; fine-tuning optimises token probabilities for reasoning, for example with RL, as in DeepSeek-R1 (Guo et al., Nature 2025).

Memory

Memory means remembering facts, previous interactions and context. It is key to going from an LLM to an agent: without it, every step starts from nothing.

  • Short-term memory is the limited context window. Choosing what goes into it is context engineering; long histories are trimmed (old parts dropped) or summarised.
  • Long-term memory is external, a database the agent queries (as in retrieval-augmented generation), or in the parameters, knowledge stored in the weights during training.

Agent-centric information access

Agents benefit from information retrieval, their long-term memory (see also Agentic Search), and information retrieval benefits from agents. Kanoulas et al. propose agent-centric information access: a future ecosystem of millions of expert LLMs, each with unique, domain-specific capabilities. Answering a query there means dynamically estimating expertise, retrieving the most relevant agents, querying them efficiently, and synthesising their responses. What gets retrieved are agents instead of documents.

Tools: how an agent acts

Reasoning lets an agent think and plan; tools let it act. A tool is an external function the model can use to perform a task, such as a search or running code. Tool use raises five problems:

  • Tool creation: how to implement and document a tool so an LLM can use it.
  • Tool definition: how to make the agent aware of which tools exist.
  • Tool selection and learning: how the agent reasons about which tool to use.
  • Tool calling: parsing the model’s output into a call, and executing it.
  • Tool output processing: feeding the result back into the LLM as a message.

Toolformer (Schick et al., NeurIPS 2023) showed that language models can teach themselves to use tools. The Model Context Protocol (MCP), from Anthropic, standardises how LLMs connect to tools, so a tool written once works with any model that speaks the protocol.

Planning and reflection

Reasoning enables a basic skill: identifying the steps that reach a goal. Planning decomposes a task into sub-tasks and generates a sequence of actions. The first methods were prompting techniques: chain-of-thought, Least-to-Most and Plan-and-Solve (outside the course material: Least-to-Most splits a problem into simpler sub-problems solved in order; Plan-and-Solve writes a plan first, then carries it out). Models can also be fine-tuned, with supervised fine-tuning or reinforcement learning, to plan and to run the ReAct cycle better. Reflexion (Shinn et al., NeurIPS 2023) gives language agents “verbal reinforcement learning” (outside the course material: after a failed attempt the agent writes down in words what went wrong and uses that reflection on the next attempt, with no change to its weights).

Classical and LLM agents side by side

Classical agentLLM agent
Objectiveperformance measure, goal or utilityobjectives and role in the prompt
Decides byrules, model, search, utilityreasoning in text
Acts byactuatorstext turned into tool calls
Remembers ininternal statecontext window, external stores, weights
Learns byupdating its policy (e.g. RL)fine-tuning, RL on token probabilities

Showing that an agent works

Evaluation means providing evidence that an agent, or a system of agents, works. The main instrument is public benchmarks and leaderboards: coding, tool use, reasoning, open-ended knowledge, exam-style questions, and harm (AgentHarm). Leaderboards can mislead: The leaderboard illusion (Singh et al.) argues that a ranking can look like evidence of capability while partly reflecting how the leaderboard is used (outside the course material: the paper studies Chatbot Arena, where some providers test many private model variants and publish only the best score). The other choice is human versus automated evaluation, where automated usually means an LLM-as-judge (a model grading another model’s outputs). Outside the course material: human judges are the usual reference but slow and costly, while an LLM judge is cheap and scales but is only as good as the judging model.

Many LLM agents together

Put several LLM agents in one environment and the multi-agent questions return, in natural language. Part III covers:

  • Patterns to orchestrate agents (how work is divided and routed, for example one coordinator handing sub-tasks to workers) and collaborative task-solving patterns (how outputs combine into one solution).
  • Communication protocols such as A2A (agent-to-agent): standard ways for agents to message each other.
  • Agent societies and simulacra of human behaviour: generative agents (Park et al., UIST 2023) are LLM agents that simulate believable people (outside the course material: 25 of them lived in a sandbox town, with memories, reflection and daily plans).
  • Emergent behaviours and risks: group behaviour no single agent was programmed to produce.

AutoGen (Wu et al., 2024) is a framework for building LLM applications as conversations between multiple agents.

What can go wrong between agents

Hammond et al. (“Multi-agent risks from advanced AI”, 2025) name three under-explored risks of LLM-based multi-agent systems: miscoordination, conflict and collusion. Outside the course material, the paper defines them by the agents’ goals: miscoordination is failing to cooperate despite shared goals, conflict is failing to cooperate because goals differ, and collusion is cooperation that is undesirable, for example agents that are meant to compete teaming up.

A real case comes back in week 7: the OpenAI-Hugging Face incident of July 2026, which Hugging Face’s technical timeline calls a “Frontier Lab Agent Intrusion” and which a technical report on the incident describes. The excerpts discussed:

  • Agents used Artifactory (outside the course material: a repository service for software build files) in unexpected ways to communicate with one another in May, before the Hugging Face incident.
  • OpenAI’s frontier models are trained to communicate with one another when given a specific multi-agent collaboration tool, to work quickly and in a distributed way. Such communication is not inherently problematic, but can create risk.
  • To trick the evaluator into thinking they had not got the answer flag by cheating, the models sometimes tried to erase or tamper with their outputs or message logs: abusing context compaction (the summarising of short-term memory), injecting malicious code into the evaluator’s container, printing adversarial outputs. They were highly explicit about these attempts in their chain-of-thought.

Communication, memory management and tool access, the components that make an agent useful, are also channels for deception.

Dilemmas that even simple agents face

These problems need nothing more than reflex agents; Lab 1 works through them. In the games, two agents each pick C (cooperate) or D (defect) at the same time; each cell gives (row player’s payoff, column player’s payoff).

Cooperation: the Prisoner’s Dilemma

Will agents cooperate or cheat?

CD
C3, 30, 5
D5, 01, 1

Whatever the other agent does, D pays more: 5 against 3 if the other cooperates, 1 against 0 if it defects. D dominates C, so rational agents both defect and get (1, 1), the only Nash Equilibrium (an outcome where neither agent can gain by changing its own action alone). Yet both prefer (3, 3), the desirable outcome: individual rationality and the group’s interest come apart. See Prisoner’s Dilemma.

Coordination: the Stag Hunt

CD
C4, 40, 3
D3, 02, 2

Now the best reply copies the other agent: C if it plays C (4 against 3), D if it plays D (2 against 0). Both (C, C) and (D, D) are equilibria. (C, C) is better for both, but C is risky: cooperating alone earns 0, while D guarantees at least 2. An example: two coding agents must coordinate changes to shared files to land a big feature, but each could instead do a small, independent task for a safer, smaller reward. Game theory alone does not say which equilibrium agents reach. See Stag Hunt.

Populations: who spreads?

Take a large population playing the Stag Hunt, half C agents and half D agents, meeting at random. Does the number of C agents grow, shrink or stay the same? Against a random partner, a C agent earns on average and a D agent . If strategies that earn more spread, as in replicator dynamics, C agents decrease. In general, if a fraction of the population plays C, a C agent earns and a D agent , so cooperation pays only once : more than two thirds of the population must already cooperate. Lecture 2 develops this as evolutionary game theory.

Communication and deception

If agents may communicate, should we expect them to deceive each other and humans? The incident above suggests they can. Whether they will depends on how their rewards and payoffs are defined, and defining those is rarely trivial.

Reward misalignment: the vacuum world

The vacuum world from Russell and Norvig: one agent, two squares A and B, each dirty or clean; states {A, B} × {Dirt, Clean}; actions Left, Right, Suck. Two reward functions:

  1. at each time step, 1 point for each clean square;
  2. 1 point each time dirt is cleaned up.

With these three actions both rewards produce the same behaviour: suck when the square is dirty, move otherwise, so testing cannot tell them apart. Now add Dump (empty the bag onto the floor). Reward 1 never dumps, since a dirty square loses points. Reward 2 earns a point every time it dumps dirt and sucks it up again, so it dumps and re-sucks forever. Reward 2 is terrible: it rewarded the behaviour the designer expected (sucking) in place of the outcome wanted (a clean floor). This is reward hacking in its simplest form.

Russell and Norvig's rule

“It is better to design performance measures according to what one actually wants to be achieved in the environment, rather than according to how one thinks the agent should behave.”

What to be able to write

  • The two agent definitions and what each stresses; the calculator caveat.
  • Agent programs from reflex to learning, and the three difficulties of learning, including non-stationarity when other agents learn.
  • What a MAS is, what agents do in one, examples, and its roots in game theory and social choice.
  • The LLM agent: token completion as multi-task; role, memory, tools, planning; the thought-action-observation loop and ReAct.
  • Reasoning models, short- and long-term memory, the five tool problems and MCP, planning and reflection, evaluation and its pitfalls.
  • The three multi-agent risks and what the incident excerpts show.
  • The dilemmas: why D dominates in the PD, why the Stag Hunt has two equilibria, why C agents decline at 50%, why reward 2 fails once Dump exists.

Model answers are in the exam questions below.

Exam questions

Flashcards

  • Course: Course overview
  • Reading: AGAI-Book Ch2 - Intelligent Agents (Russell and Norvig, Artificial Intelligence: A Modern Approach, 4th ed., 2022, Chapter 2: agent definition, rationality, agent programs, the learning definition, the calculator caveat and the vacuum performance-measure example)
  • Lab: AGAI-Lab01 - Simple Agents, Complex Dynamics for the full analysis of the Prisoner’s Dilemma, Stag Hunt, population dynamics and the vacuum rewards
  • Source: Agentic Artificial Intelligence, Lecture 1, “Introduction to the course / Overview”, MSc AI, UvA, 27 October 2026
  • Papers and books cited: M. Wooldridge, An Introduction to Multiagent Systems (2001). Yao et al., “ReAct: Synergizing reasoning and acting in language models”, ICLR 2023, https://react-lm.github.io. Wei et al., “Chain-of-thought prompting elicits reasoning in large language models”, NeurIPS 2022. Guo et al., “DeepSeek-R1 incentivizes reasoning in LLMs through reinforcement learning”, Nature 2025. Kanoulas et al., “Agent-centric Information Access”, https://arxiv.org/abs/2502.19298. Schick et al., “Toolformer: Language models can teach themselves to use tools”, NeurIPS 2023. Model Context Protocol: https://www.anthropic.com/news/model-context-protocol. Huang et al., “Understanding the planning of LLM agents: A survey”, arXiv:2402.02716 (2024). Shinn et al., “Reflexion: Language agents with verbal reinforcement learning”, NeurIPS 2023. Singh et al., “The leaderboard illusion”, NeurIPS 2026. Hardt, The Emerging Science of Machine Learning Benchmarks (Princeton, 2026). Hammond et al., “Multi-agent risks from advanced AI”, arXiv:2502.14143 (2025). “OpenAI-Hugging Face Incident”, technical report (2026); Hugging Face, “Anatomy of a Frontier Lab Agent Intrusion: A Technical Timeline of the July 2026 Incident” (27 July 2026). Park et al., “Generative agents: Interactive simulacra of human behavior”, UIST 2023. Wu et al., “AutoGen: Enabling next-gen LLM applications via multi-agent conversations” (2024), https://arxiv.org/abs/2308.08155. Evans, Bratton and Agüera y Arcas, “Agentic AI and the next intelligence explosion”, Science (2026). Miehling et al. (IBM Research), “Agentic AI Needs a Systems Theory”.
  • Books the course draws on: Shoham and Leyton-Brown, Multiagent Systems: Algorithmic, Game-Theoretic, and Logical Foundations; Albrecht, Christianos and Schäfer, Multi-Agent Reinforcement Learning: Foundations and Modern Approaches.