ElemedexA pocket encyclopedia of AI architectures
No. 042

LLM agent

Language agent · ReAct · tool-using LLM

Errand Runner

It can't do arithmetic, but it knows where the calculator is. It thinks out loud, presses a button, reads what happened and thinks again, until the task is done or the budget runs out. Sometimes it goes round in circles, like a dog chasing its tail.

Height
Those of the core LLM
Weight
That of the core, plus tools and external memory
Parameters
Those of the core (ReAct: PaLM-540B; Toolformer: GPT-J, 6.7 B)
Context
The core's window, filled with thoughts, actions and observations
Training data
One to six examples in the prompt (ReAct); a handful of demonstrations per tool (Toolformer)
Year
2023
Generation
6 · Assistants, reasoning, and agents
Creators
Yao, Zhao, Yu, Du, Shafran, Narasimhan & Cao (ReAct); Schick et al. (Toolformer); and many others
Kind
System

Base stats

Total
455

Approximate, ordinal scales meant for comparing species with each other; the hard numbers are in the data sheet.

Weaknesses

  • Errors compound: every step can fail, and the next one builds on the mistake.
  • Loops and abandoned goals: without a memory of what it has done, it repeats actions.
  • Prompt injection: a web page or an email the agent reads can give it orders.
  • Nobody checks the intermediate steps unless the system is designed for it, and each step costs a model call.

Habitat

It was born in 2022–2023 papers (ReAct, Toolformer) and in GitHub repositories like AutoGPT. Today it lives in programmers' terminals, automated browsers and help desks, almost always with access to more tools than would be wise.

Moves

Abilities

ReAct loop
Interleaves natural-language reasoning with actions on the environment; every observation goes back into the context window.
Tool calls
The model emits a structured call (a JSON with arguments) that a program executes; the result comes back as text.
External memory
Files, databases or vector indexes where the system stores and retrieves whatever does not fit in the window.

Anatomy

executesback into contextUser's goalContext: prompt + historyLLM (decoder)Thought (text)Action: function call…or else: final answerSearch · code · APIsEnvironment: web, files, OSObservation (text)Agent (LLM + scaffold)Outside the model

The ReAct loop: the LLM writes a thought and an action; a program executes the action with a tool; the resulting observation is appended to the context, and the cycle repeats until the model emits a final answer. Everything except the LLM is ordinary software: the scaffold is symbolic, the core is not.

Evolution chain

042 LLM agent

An LLM agent is a system that puts a language model inside a loop: the model decides what to do, a program executes it, and the result comes back to the model as text. Alammar & Grootendorst (2024) define it as a system that uses a language model to determine which actions to take and in what order, with two new components: tools to do what the model cannot do by itself, and a plan that decides when to use them (2024, p. 218). An LLM is unreliable at multiplying long numbers; with a calculator within reach, the problem changes its nature.

How it works

The canonical pattern is ReAct (reasoning and acting): the model writes a thought (“I need to search for X”), then an action in a format a program can parse (search[X]), and receives an observation (the search result), which is appended to its context window before the next step (Yao et al., 2023). In the original paper there were three actions (look up a Wikipedia entry, look up a string within it, and finish with an answer), and the core was PaLM-540B prompted with one to six examples. Consulting Wikipedia reduced hallucinations compared with pure chain of thought, and in two interactive environments (ALFWorld and WebShop) ReAct beat imitation and reinforcement learning methods by 34 and 10 points of success rate (Yao et al., 2023, secs. 3–4). Alammar & Grootendorst (2024) show the same loop with a LangChain template, a search engine and a calculator (2024, pp. 219–223).

The other ingredient is tool use. Toolformer learned, in a self-supervised way and from only a handful of demonstrations per tool, when to call a calculator, a question-answering system, search engines, a translator or a calendar (Schick et al., 2023). In June 2023 OpenAI added function calling to its API: the model emits a JSON with the arguments of a function the developer has described, and the program executes it. In November 2024 Anthropic proposed the Model Context Protocol to standardize connections to tools and data, and in 2025 coding agents such as Claude Code or Codex, which read a repository, edit files, run tests and make commits from the terminal, became commonplace.

What changed

Compared with ChatGPT (InstructGPT), the model can be the same: what is new is the scaffold. Compared with Retrieval-augmented generation (RAG), retrieval stops being a fixed step before generation and becomes a tool the model decides whether to use. Millière & Buckner (2024b) describe the result as hybrid neurosymbolic systems that use language or code as a universal interface between connectionist and symbolic components (2024b, sec. 3.1.2). Santelli (2026) puts it this way: when we use ChatGPT or Claude Code we are not interacting with a pure LLM but with a complex neuro-symbolic system, even if the “processor” at its center is grown rather than built.

Limits

Errors compound. AutoGPT, one of the first popular autonomous agents (March 2023, running on GPT-4), tended to get stuck in loops. And since nobody watches the intermediate steps, the design has to provide ways to check them, for instance by asking the agent for the sources of what it found (Alammar & Grootendorst, 2024, p. 223). Any text the agent reads (a web page, an email) may contain instructions: prompt injection is the jailbreak of the agentic era. The base stats of this entry are those of a frontier core; generality measures the whole system.

Sources

  • Alammar, J., & Grootendorst, M. (2024). Hands-on large language models: Language understanding and generation. O’Reilly Media. §
  • Buckner, C. J. (2024). From deep learning to rational machines: What the history of philosophy can teach us about the future of artificial intelligence. Oxford University Press. https://doi.org/10.1093/oso/9780197653302.001.0001 §
  • Millière, R., & Buckner, C. (2024b). A philosophical introduction to language models—Part II: The way forward (arXiv:2405.03207). arXiv. https://doi.org/10.48550/arXiv.2405.03207 §
  • Santelli, M. (2026, August 25). El futuro de la IA: Entre doomers y hyperos. 421.news. https://www.421.news/es/ia-doomers-hyperos/ §
  • Schick, T., Dwivedi-Yu, J., Dessì, R., Raileanu, R., Lomeli, M., Hambro, E., Zettlemoyer, L., Cancedda, N., & Scialom, T. (2023). Toolformer: Language models can teach themselves to use tools. In Advances in Neural Information Processing Systems (Vol. 36, pp. 68539–68551). Curran Associates. https://doi.org/10.52202/075280-2997 §
  • Shanahan, M. (2024). Talking about large language models. Communications of the ACM, 67(2), 68–79. https://doi.org/10.1145/3624724 §
  • Yao, S., Zhao, J., Yu, D., Du, N., Shafran, I., Narasimhan, K., & Cao, Y. (2023). ReAct: Synergizing reasoning and acting in language models. In 11th International Conference on Learning Representations (ICLR 2023). https://openreview.net/forum?id=WE_vluYUL-X §