A Short History of Agents: From ReAct to 2026
From prompted reasoning to tool protocols
Worked reasoning examples
think · act · observe
learned tool use
structured tool API
Screenshot-based pointer and keyboard actions
tools as a protocol
Terminal coding tool preview
Summaries, retrieval, and delegated tasks
A useful thread through recent LLM-agent work is the repeated cycle of generating an action, executing it, and returning an observation. ReAct made that cycle easy to inspect in a transcript; tool training, structured APIs, and MCP changed how its parts connect.
The question through this history is what each proposal changed: the model’s training, the action format, the available tools, or the context carried into another turn.
The problem this layer solves
A language model can describe how to run a test suite. To run it and inspect the result, an application must execute the command and return the output to the model.
Here, an LLM agent means a system that repeatedly generates actions, executes them, and supplies the resulting observations to the next generation. It stops when the task is complete or the runtime ends the run.
Prerequisites
This post sits near the end of the series. To follow the trajectory, it helps to already have a feel for a few earlier layers:
- What a tokenizer does and why chat templates matter. Agent protocols live inside the transcript format.
- The difference between training a behavior into a model and prompting it at inference time. Most of the history here is a swing between the two.
- The distinction between model output and application execution. The next post develops function calling in detail; this history introduces why that interface appeared.
The minimal formalism
We can compare the systems in this history using a loop with four parts:
- A model that produces tokens.
- An action space — the set of things the model is allowed to ask the world to do.
- A tool (or environment) that executes an action and returns an observation.
- An observation that gets pasted back into the context for the next model step.
One step of the loop is just:
The model samples an action from its context, the tool produces an observation, the context grows by one action-observation pair, and you loop until the model emits a final answer or a stop condition fires.
Chain-of-thought: reasoning moves into the generation stream
January 2022. Wei et al. publish Chain-of-Thought Prompting Elicits Reasoning in Large Language Models. Their few-shot prompts include worked reasoning examples before the test question. That differs from the later zero-shot “let’s think step by step” technique. On GSM8K, the paper reports a large improvement for PaLM-540B when prompted with those intermediate steps.
The experiment changes the prompt without updating the model’s architecture or weights.
Intermediate generated tokens give later tokens more context to work from. ReAct uses that idea alongside external actions. A visible reasoning trace can help debugging, but it is not a guaranteed faithful account of the model’s internal computation.
Tool-using language-model systems also predate ReAct, including WebGPT. This is a selected history of influential ideas, not a claim that the agent loop began in 2022.
ReAct: the loop gets a name
October 2022. Yao et al. publish ReAct: Synergizing Reasoning and Acting in Language Models.
ReAct interleaves Thought tokens with Action tokens (like search("Arthur's Magazine")) and Observation tokens (the tool's response). Prompting or training teaches the model to alternate these steps until it emits a final answer.
Which magazine was founded first, Arthur's Magazine or First for Women?
I need to look up both magazines' founding dates, then compare.
search("Arthur's Magazine")
Arthur's Magazine was an American literary periodical published in Philadelphia in the 19th century, founded in 1844.
search("First for Women magazine")
First for Women is a woman's magazine launched in 1989 by Bauer Media Group.
1844 is earlier than 1989, so Arthur's Magazine was founded first.
Arthur's Magazine
- It works just as prompting, not only with fine-tuning. The format is simple enough that a big model can follow it from a few in-context examples.
- It makes the loop legible. You can read a ReAct trace and inspect the generated rationale alongside the tool action and observation.
- It's model-agnostic. The format can be prompted across models, although their ability to follow it varies. The protocol is in the prompt, not the weights.
Toolformer: training the behavior into the weights
February 2023. Schick et al. publish Toolformer: Language Models Can Teach Themselves to Use Tools.
Toolformer builds a self-supervised dataset for tool use. A pretrained LM proposes calls inside text; the system executes them and retains annotations that reduce prediction loss on the following text. The model is then fine-tuned on those annotated examples.
Selected milestones in tool-using language models
Worked reasoning examples improved accuracy on several arithmetic and symbolic benchmarks.
Worked examples prompt the model to generate intermediate reasoning before its answer.
Interleaved generated reasoning and actions, such as search queries, with observations returned by tools.
The model narrates a plan, calls a tool, reads the result, and decides what to do next.
Fine-tuned a model on a self-supervised dataset of tool calls, so tool use could come from weights instead of prompts.
An LLM agent in Minecraft that writes programs and stores reusable skills in a library.
Saved programs can be retrieved for later tasks.
OpenAI shipped structured function-call outputs in the API. Tool names and JSON-schema argument definitions; strict constraints came later.
The host receives the requested function name and arguments in structured fields.
Anthropic shipped a model that reads screenshots and returns mouse and keyboard actions.
Mouse and keyboard actions can operate interfaces that have no dedicated API.
MCP specified how clients discover and access tools, resources, and prompts exposed by servers.
Compatible hosts can reuse a server while adapting its capabilities to their model API.
Anthropic introduced a terminal coding tool in limited research preview.
The announced tool could read and edit code and run tests through a terminal interface.
Function calling: the action gets a schema
June 2023. OpenAI ships function calling in the Chat Completions API. The API now accepts a list of function definitions in JSON Schema, and the model can return a structured function_call object alongside (or instead of) the text.
The API exposes the action as named fields, so applications can handle calls without extracting them from free-form prose.
The definitions provide argument schemas, and the response separates the function name and arguments from prose. The June 2023 API still required applications to check conformance. Later strict-output modes added constrained decoding for supported schemas. Other providers also added structured tool interfaces.
Execution, validation, recovery, and stopping remained application responsibilities.
Voyager and Reflexion: memory and self-critique
Spring 2023. Two papers that push on pieces of the loop that function calling didn't touch.
Reflexion (Shinn et al., March 2023) adds a verbal self-critique step. After a failed trajectory, the agent writes a short natural-language reflection and stores it as memory for the next attempt. The paper reports improvements on HotpotQA and AlfWorld. The underlying weights stay fixed; the next attempt receives the reflection as additional context.
Voyager (Wang et al., May 2023) takes this further in a Minecraft environment. The agent writes executable code, stores working skills in a library keyed by natural-language description, and retrieves them later when a relevant situation arises. The library lets later attempts reuse working code without retraining the underlying model. A coding agent can similarly store a tested script for later use.
Tree-of-Thoughts, also 2023, pushes on the model-step piece by letting the agent search over multiple reasoning branches before committing. This adds an explicit search procedure around model generation.
2024–25: interfaces and infrastructure
The following releases illustrate different changes to the agent interface: a curated coding environment, screen actions, a shared tool protocol, and new API representations.
SWE-agent (Yang et al., 2024) showed that a general-purpose language model, wrapped in an "agent-computer interface" (a careful curation of shell commands, file views, and edit operations exposed as tools), could solve real GitHub issues. It demonstrated how the agent-computer interface affects software-task performance.
Anthropic Computer Use (October 2024) gave a model a screenshot and a mouse, and asked it to do things. The model can request screenshot-based mouse and keyboard actions, within the runtime’s supported action set and permissions.
MCP (Model Context Protocol, November 2024) took the function-calling idea and cut it loose from any one provider. A single MCP server exposes tools, resources, and prompts, and compatible MCP clients can discover them. Hosts still translate those definitions into the selected model API.
OpenAI Responses API (March 2025) added an item-based API for model responses and tools. The Harmony format published with gpt-oss (August 2025) documented a token-level representation with roles, channels, and recipients. These operate at different layers: API objects versus rendered model input/output.
2025–26: agents that ship
Examples of deployed agent interfaces include:
Coding agents — Claude Code, Cursor's agent mode, Devin, Codex CLI. The agent edits files, runs tests, reads the output, keeps going. The loop interleaves actions and observations; the tools are a curated set of file and shell operations; the memory is a combination of the open editor state, a running scratchpad, and context-management mechanisms such as summaries or delegated subtasks.
Computer-use agents — Anthropic's Computer Use, OpenAI's Operator, various browser-pilot products. The model requests pointer and keyboard actions from screenshots. The runtime must execute those actions and obtain another observation to check their effect.
Retrieval-and-answer agents — the ones living inside Perplexity-style products, enterprise search, and most "chat with your docs" deployments. They use retrieval and tool calls to assemble evidence before answering.
The comparison below holds the task and seven beats fixed to show how an action format can change while the broad control flow stays familiar.
Two constructed traces: free-form actions and structured calls
1. thought
Free-form trace
I need to look up the repo's test command.
Structured trace
I need to look up the repo's test command.
2. action
Free-form trace
search[query="package.json test script"]
Structured trace
{ "name": "bash", "input": { "cmd": "cat package.json" } }3. observation
Free-form trace
Obs: "scripts": { "test": "vitest run" }Structured trace
{"type": "tool_result", "content": "\"test\": \"vitest run\""}4. thought
Free-form trace
Now run the tests and see what fails.
Structured trace
Now run the tests and see what fails.
5. action
Free-form trace
run[cmd="npm test"]
Structured trace
{ "name": "bash", "input": { "cmd": "npm test" } }6. observation
Free-form trace
Obs: 1 failing test in auth.spec.ts, line 42.
Structured trace
{ "type": "tool_result", "content": "FAIL auth.spec.ts line 42" }7. answer
Free-form trace
The test on line 42 is failing because…
Structured trace
The test on line 42 is failing because…
Systems using this loop can differ in:
- Model training for tool selection and coding.
- The available actions and how their arguments are validated.
- Tools can use documented interfaces, including MCP and provider APIs.
- Context management, including compaction, summaries, and delegated subtasks that reduce how much intermediate output the caller retains.
- A runtime can add retries, logging, evaluations, and approval gates.
A minimal agent loop
This Anthropic SDK example exposes one tool and bounds the number of model turns.
from anthropic import Anthropic
client = Anthropic()
# One tool: a toy "search" that pretends to hit a knowledge base.
def run_tool(name: str, args: dict) -> str:
if name == "search":
q = args.get("query", "")
return f"(pretend result for: {q})"
return f"unknown tool: {name}"
tools = [{
"name": "search",
"description": "Look something up.",
"input_schema": {
"type": "object",
"properties": {"query": {"type": "string"}},
"required": ["query"],
},
}]
messages = [{"role": "user", "content": "Which magazine was founded first, Arthur's Magazine or First for Women?"}]
for _ in range(8):
resp = client.messages.create(
model="claude-sonnet-4-5",
max_tokens=1024,
tools=tools,
messages=messages,
)
messages.append({"role": "assistant", "content": resp.content})
if resp.stop_reason == "end_turn":
print("".join(b.text for b in resp.content if b.type == "text"))
break
if resp.stop_reason != "tool_use":
raise RuntimeError(f"Incomplete turn: {resp.stop_reason}")
# Run every tool the model asked for and feed results back.
tool_results = []
for block in resp.content:
if block.type == "tool_use":
out = run_tool(block.name, block.input)
tool_results.append({
"type": "tool_result",
"tool_use_id": block.id,
"content": out,
})
messages.append({"role": "user", "content": tool_results})
else:
raise RuntimeError("Iteration limit reached")stop_reason separates a tool request from a completed turn. An output-limit stop is not a final answer and should not be treated as one. This sketch raises on other stops; a fuller runtime may implement recovery for them.
Tool results return in a user message with tool_result blocks, following Anthropic’s public Messages API contract.
Misconceptions
"An agent requires a new neural architecture." A tool loop can wrap an existing language model. Agent design also includes the runtime, available tools, training, and context policy; the word alone does not identify a particular neural architecture.
"ReAct is obsolete, we have function calling now." Function calling provides structured fields for actions; strict modes can additionally constrain arguments. ReAct remains a useful example of interleaving generated rationale with actions and observations, even when a modern system uses a different prompting or training method.
"Chain-of-thought prompting is the same as a reasoning model." Prompting with intermediate examples and training a model to use extra reasoning compute are different interventions. DeepSeek-R1 documents reinforcement-learning methods; proprietary models expose reasoning controls without necessarily disclosing an equivalent training recipe.
"Agents will replace function calling / prompting / RAG." Agents are the outer loop that those things live inside. A modern coding agent uses retrieval to grab relevant code (RAG), runs tools with structured schemas (function calling), and sometimes even prompts itself with specific personas for sub-tasks.
What's next
The next post covers Function Calling as Structured Generation, how structured tool calls actually work under the hood, how constrained decoding uses a tool schema, and what that schema can enforce.
Additional reading (and watching)
-
Wei, J., et al. (2022). Chain-of-Thought Prompting Elicits Reasoning in Large Language Models. arXiv:2201.11903. Demonstrated few-shot prompting with worked intermediate reasoning steps.
-
Yao, S., et al. (2022). ReAct: Synergizing Reasoning and Acting in Language Models. arXiv:2210.03629. Introduced the thought/action/observation loop as an explicit prompting pattern. A useful reference for inspecting tool-use transcripts.
-
Schick, T., et al. (2023). Toolformer: Language Models Can Teach Themselves to Use Tools. arXiv:2302.04761. A self-supervised recipe that filters candidate tool calls by their effect on prediction loss.
-
OpenAI. (2023). Function calling and other API updates. Introduces function definitions and structured call responses in Chat Completions.
-
Shinn, N., et al. (2023). Reflexion: Language Agents with Verbal Reinforcement Learning. arXiv:2303.11366. Studies storing verbal feedback for a later attempt.
-
Wang, G., et al. (2023). Voyager: An Open-Ended Embodied Agent with Large Language Models. arXiv:2305.16291. A Minecraft agent that stores and retrieves executable skills.
-
Yao, S., et al. (2023). Tree of Thoughts: Deliberate Problem Solving with Large Language Models. arXiv:2305.10601. Search-over-thoughts as an upgrade to the model-step of the loop.
-
Yang, J., et al. (2024). SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering. arXiv:2405.15793. Showed that with a well-designed tool surface, a general LLM could solve real GitHub issues. Studies how interface design affects a coding agent’s performance.
-
Anthropic. (2024). Introducing the Model Context Protocol. The announcement of MCP. Cited here as the canonical entry point for the protocol that standardized tool interfaces across providers.
-
Anthropic. (2025). Claude 3.7 Sonnet and Claude Code. February 24 announcement of the Claude Code research preview.