The First Agents: From AutoGPT Hype to Reliable Tool Loops
Spring 2023 made autonomous agents famous: AutoGPT passed 74,000 GitHub stars within weeks, BabyAGI fit into 140 lines of Python. Six months later, few run in production. We trace the ReAct pattern behind the hype, quantify runaway loops and real costs, and describe the constrained tool-use loop that works: budgets, schemas, checkpoints.
The Promise of Full Autonomy
Give a language model a goal, a set of tools, and a loop — and it works until the goal is reached. That was the promise of spring 2023. AutoGPT appeared on GitHub on 30 March 2023 and passed 74,000 stars by mid-April, more than PyTorch had accumulated in six years. BabyAGI followed within days. Demo videos of self-prompting agents that research markets, write code, and found companies filled every timeline.
Six months later, the picture is sober. Hardly any of these agents made it into production. The failure modes are consistent across projects: endless loops, hallucinated results, unbounded API bills. This article separates the pattern that works — the tool-use loop — from the architecture that does not work today: open-ended autonomy. The distinction is not academic. It decides whether an LLM feature ships or burns budget.
ReAct Defines the Loop
The underlying pattern is older than the hype. Yao et al. published ReAct ("Reasoning and Acting") in October 2022 (arXiv:2210.03629); the paper was accepted at ICLR 2023. The idea is compact: the model alternates between a reasoning step (thought), an action (a tool call, for example a Wikipedia lookup), and an observation (the tool's result). Each observation is appended to the context, so the next thought is grounded in evidence rather than in the model's parametric memory alone.
ReAct is not autonomy. It is a prompting structure. In the paper's error analysis it markedly reduced hallucination on HotpotQA compared with chain-of-thought prompting alone, and it produced traces a human can audit step by step. Nothing in ReAct says the model chooses its own objectives or decides when it is finished. Those two additions came later — and they are precisely where the problems start.
AutoGPT and BabyAGI Arrive
AutoGPT, released by Toran Bruce Richards on 30 March 2023, wraps GPT-4 in an unattended ReAct-style loop. The model receives a high-level goal, selects a command — web search, file access, code execution — observes the result, and continues. Results of earlier steps are stored as embeddings in a vector database. Human confirmation of each action is optional and can be switched off entirely in continuous mode.
BabyAGI makes the structure even more explicit. Yohei Nakajima described it on 28 March 2023 as a "task-driven autonomous agent" and published it in early April as a script of roughly 140 lines of Python: an execution agent completes the current task, a task-creation agent derives new tasks from the result, a prioritization agent reorders the queue. The loop runs until the queue is empty — or indefinitely. Both projects are honest experiments. The hype around them was not.
Runaway Loops and Real Costs
Two failure modes dominate the field reports. The first is divergence. Without external ground truth, the model assesses its own progress, and errors compound: assume a 95% success rate per step, and the probability that a 50-step chain stays intact is about 8% (0.95^50). Agents repeat sub-tasks they have already solved because the evidence has left the context window. Andrej Karpathy attributes the derailments to exactly this finite context.
The second is cost. Han Xiao of Jina AI ran the numbers on 13 April 2023: at GPT-4 8K pricing — $0.03 per 1,000 prompt tokens, $0.06 per 1,000 completion tokens — a step that fills the context window costs about $0.288. A small task of 50 steps: roughly $14.40. A loop that runs overnight without converging produces a bill and no result. Both failures share one root cause: the loop has no termination criterion outside the model.
Why the Loop Diverges
The autonomous architectures make three structural mistakes. First, control flow is generated: what happens next is a model completion, not code, so every step inherits the model's error rate. Second, progress is self-assessed: the same model that made a mistake grades the step as a success. Third, nothing is serializable: a solved task cannot be replayed as a fixed program, so the next, nearly identical run costs the full amount again.
None of this indicts the model. GPT-4 executes single, well-scoped steps reliably. The defect sits in the outer architecture: open-ended objectives, self-generated task queues, and unbounded iteration convert small per-step error rates into near-certain failure. That is an engineering problem — and it has an engineering answer.
Building Reliable Tool Loops
The reliable variant inverts control. Application code owns the loop; the model makes exactly one decision per iteration: which tool, with which arguments. Since 13 June 2023, OpenAI's API supports this natively — function calling in gpt-4-0613 and gpt-3.5-turbo-0613 returns a JSON object for a declared function signature instead of free text that has to be parsed heuristically. The schema is a contract, not a guarantee: arguments still require validation on the caller's side.
Our working rules at Blue IT Systems are deliberately unspectacular: a small tool set (five to ten tools, precisely described), schema-validated arguments, a hard step budget and token budget per run, tool errors returned as typed observations with capped retries, and a human checkpoint before every irreversible action. A loop that stops with "budget exceeded" is a feature. The table summarizes the contrast.
| Aspect | Autonomous agent (spring 2023) | Constrained tool loop |
|---|---|---|
| Control flow | Model generates the next step | Code owns the loop |
| Termination | Self-assessed goal completion | Hard step and token budget |
| Tool interface | Free text parsed heuristically | JSON schema with validation |
| Error handling | Fed back to the model unchecked | Typed observation with capped retries |
| Human role | Optional confirmation | Checkpoint before irreversible actions |
Outlook from October 2023
We expect the word "agent" to survive and the architecture beneath it to change. The unit of value will not be an autonomous goal-pursuer but a bounded tool loop embedded in ordinary software: invoked like a function, budgeted like a batch job, observable like a service. Model vendors will keep fine-tuning tool selection, and benchmarks such as AgentBench (August 2023) now measure it systematically instead of anecdotally.
Two predictions. First, tool interfaces will standardize. Today every team describes its tools in its own JSON dialect; a vendor-neutral description format is the obvious next step. Second, autonomy will return — in narrow domains with verifiable feedback, code against a test suite being the clearest candidate. Until then, our conclusion stands: the model supplies the reasoning. The loop is ours to write.
Sources
- Yao et al. — ReAct: Synergizing Reasoning and Acting in Language Models (arXiv:2210.03629, 6 Oct 2022)
- Yohei Nakajima — Task-driven Autonomous Agent Utilizing GPT-4, Pinecone, and LangChain (28 Mar 2023)
- Significant Gravitas — AutoGPT repository (released 30 Mar 2023)
- Han Xiao (Jina AI) — Auto-GPT Unmasked: The Hype and Hard Truths of Its Production Pitfalls (13 Apr 2023)
- OpenAI — Function calling and other API updates (13 Jun 2023)
- Liu et al. — AgentBench: Evaluating LLMs as Agents (arXiv:2308.03688, 7 Aug 2023)
