A Complete Guide to the 3-Year Architectural Evolution of AI Agents

    Over the past three years, AI agents have evolved from simple conversational interfaces to complex, autonomous systems capable of multi-step task execution. This article explores the architectural evolution of AI agents, breaking down key concepts like tool calling, ReAct, Agent Loops, Harness, Subagents, and Loop Engineering. It analyzes how each layer addresses the gaps left by the previous one, providing a practical framework for choosing the right architectural depth based on side effects, uncertainty, and operational requirements.

    Why the Buzzwords of the Last Three Years Are One Evolution Chain

    Around late 2022, conversational large language models entered the public eye. The usage pattern was essentially a single input box: a user provides text, the model returns text, and follow-up questions trigger more generation. Domestic and international peer products that followed mostly adopted this one-question, one-answer interaction. Three years later, the industry is no longer discussing whether the model can chat, but whether it can fetch data, modify code, process emails, monitor messages, and decide the next step autonomously in multi-step tasks.

    Terms like ReAct, Agent Loop, Subagent, Agent Teams, Harness, Loop Engineering, Personal Agent, and Super-agent are not unrelated marketing labels. A more accurate understanding is that each layer fills the gaps left by the previous one. These gaps primarily stem from four issues: models can only generate text, knowledge has a cutoff date, single-turn context is limited, and no one is responsible for connecting “thinking” and “doing” into an auditable closed loop.

    Let’s break this down by capability rather than by a specific product. In this article, an “AI agent” refers to a software system that uses a large language model as its decision-making core, capable of calling tools, observing results, and continuing to act under goal constraints. It is not a new species, but a combination of models, tools, state, and runtime strategies.

    1. Chatbots: Strong Generation, Weak Action

    The core loop of early systems was extremely short:

    1. Concatenate the conversation history into the context;
    2. The model continues generation based on the probability distribution of the next word;
    3. Once generation ends, the entire text block is handed back to the user.

    What large language models do statistically is “conditional continuation.” They have read massive amounts of text, so they can piece together seemingly complete answers to questions, including writing instructions, drafting code, and comparing solutions. Users are amazed because the continuation quality crosses the usability threshold, not because the system truly understands the external world.

    There are three hard boundaries at this layer:

    • Only language, no side effects. Booking tickets, modifying databases, sending messages, or running tests—models can at best write out the steps, but the executor remains human.
    • Knowledge is frozen at the training cutoff. Asked “what happened today,” it either admits ignorance or fluently states a highly probable but factually incorrect sentence. The latter is hallucination: grammatically smooth, factually unverified.
    • No task state. Multi-turn dialogue merely stuffs old text back in. Once the context gets too long, it gets truncated. Goals, constraints, and attempted paths are not stored independently.

    Therefore, chatbots are suitable for brainstorming, drafting, and explaining, but not for business workflows that require accountability for outcomes. A common pitfall for many teams is trying to compensate for the inability to act and verify with longer prompts. Prompts cannot solve read/write access to the external world.

    2. Tool Calling: Connecting Language to Executable Actions

    The next leap is function calling or tool calling. The model no longer outputs paragraphs solely for humans to read; it can also output structured tool requests, such as “retrieve document,” “query calendar,” or “execute read-only SQL.” The runtime parses this request, actually calls the system, and writes the result back into the context for the model to continue generating.

    This step solves the “only knows how to say the steps” problem. In principle, two layers must be distinguished:

    • The decision layer remains the language model, which selects the tool name and parameters;
    • The execution layer is standard code, where permissions, timeouts, retries, and idempotency are guaranteed by engineering code.

    Tool descriptions must be narrow and explicit: name, parameter types, side effects, and what to return on failure. When descriptions are vague, the model will select the wrong tool or fabricate parameters. Permissions must also follow least privilege: reading emails and sending emails are not the same tool; production write operations should be denied by default or require human confirmation.

    The pitfalls of tool calling are equally obvious. The model might continuously call tools randomly when information is insufficient, or it might cover up an error using natural language after the first failure, refusing to retry. A single “call-return” cycle still lacks explicit reasoning and stop conditions, making complex tasks prone to getting lost after just two or three steps.

    3. ReAct: Interleaving Reasoning and Action

    ReAct stands for Reason + Act. The industry generally understands it as a prompting and trajectory format: the model alternately produces short reasoning, an action, and a reference to environmental observation, rather than writing a long essay before acting or acting without explaining the basis.

    The illustrative loop is as follows:

    1. state = {goal, constraints, trace=[]}
    2. while not done and steps < max_steps:
    3. thought, action = model.decide(state)
    4. if action.type == "finish":
    5. return action.answer
    6. observation = tools.run(action) # Timeout, permissions, structured errors
    7. state.trace.append((thought, action, observation))
    8. return fail_or_ask_human(state)

    Its value over pure tool calling is that each step forces the model to face the latest observation, rather than writing to the end based on initial speculation. For instance, to check if an API is deprecated, it should first retrieve the documentation, then decide whether to modify the call method or ask the user for confirmation based on the return, rather than directly generating a version of code that “looks runnable.”

    ReAct is not a reliability guarantee either. Reasoning text can be rationalized after the fact; when observations are long, key errors get drowned out; a step limit that is too small leads to premature abandonment, while one too large wastes tokens by spinning. Engineering-wise, it must at least have: a maximum step count, duplicate action detection, structured return of tool errors, and a completion condition of “stop if evidence is insufficient.”

    4. Agent Loop: From Q&A to Recoverable Jobs

    The Agent Loop turns the alternating process above into a runtime, rather than a template written in a prompt. A production-ready loop typically includes:

    • Goals and completion criteria: What constitutes done, and what must be handed back to a human;
    • Planning: A revisable list of steps, not a one-off long-term plan;
    • Action and observation: Tool results enter the state, not just the natural language;
    • Memory: Short-term in the context, long-term in external storage, with sources attached;
    • Stop and escalation: Exiting the loop based on budget, latency, sensitive operations, or low confidence.

    Compared to chatbots, state becomes a first-class citizen for the first time. Tasks can be paused, resumed, and replayed. Failures no longer just manifest as “poor answers,” but as a tool timeout at a specific step, insufficient permissions, or an observation contradicting the goal.

    The new pitfalls at this layer are cost and loss of control. The loop extends itself: search, search again, modify plan, search again. Without budgets (steps, latency, cost) and duplicate detection, a simple question turns into a prolonged spin. Another pitfall is plan worship: the model generates a ten-step plan, and even when the environment changes, it still executes the old plan. Plans should be cheap and disposable; observation is the source of truth.

    5. Harness: The Engineering Skeleton Outside the Loop

    Relying solely on prompts to maintain a loop will shatter as soon as you swap a model or add a tool. Harness refers to the runtime layer wrapping the model: tool registration, sandboxing, identity and permissions, trajectory logs, evaluators, and human-in-the-loop gates. It can be understood as the skeleton that “makes agents operable,” rather than just another smarter prompt.

    A practical skeleton usually handles these tasks:

    • Tool whitelisting and parameter validation, rejecting tool names fabricated by the model;
    • Sandbox boundaries for file systems, commands, and networks, defaulting to read-only;
    • Full trajectory: what was called at which step, what was returned, and whether it was human-confirmed;
    • Evaluation sets: checking success rates, extraneous steps, and unauthorized actions on fixed tasks, rather than just watching demo videos;
    • Failure classification: hallucinations, permissions, environment drift, ambiguous goals—fixed separately.

    Harness solves the “demo works, production is uncontrollable” problem. The issue it leaves behind is complexity: if the skeleton is too heavy, even simple tasks are forced through heavy workflows, increasing latency and comprehension costs. Capabilities should be tiered by risk; read-only Q&A doesn’t need the full approval chain.

    6. Subagents and Teams: Splitting Context, Not Responsibility

    When a single loop tries to cram research, coding, testing, and writing documentation into the same context, both attention and permissions will spiral out of control. The Subagent approach is: the main controller retains the goal and acceptance criteria, delegating subtasks to sub-processes with isolated contexts. The sub-process has its own subset of tools and step budget, returning only conclusions and evidence, not all the intermediate noise.

    Agent Teams go further by running multiple roles in parallel: e.g., retrieval, implementation, and review. The benefit of parallelization is shortening the critical path and using the review role to counter the implementation role’s self-consistent hallucinations. The cost is coordination: overlapping task slices, contradictory conclusions, and lost constraints during merging.

    The viable division of labor principles are plain:

    • Split by permissions, not by “personas.” The one writing code shouldn’t also hold production deployment rights;
    • Split by verifiable outputs. The deliverable of a subtask should be a patch, a retrieval excerpt, or a test report, not an un-verifiable reflection;
    • The main controller only routes, merges, and halts. Do not pile a set of implicit business logic into the main controller.

    Multi-agent setups do not automatically improve accuracy. Three hallucinating processes voting can still vote out a fluent error. If the reviewer cannot see the original observation, it is just a second round of continuation.

    7. Loop Engineering: From “Can Loop” to “Stable Loops”

    Loop Engineering is not a new model, but the design and evaluation of the loop itself: step budgets, backoff, deduplication, checkpoints, regression tasks, and human takeover points. The question it answers is—for the same goal, how to complete it with fewer steps, fewer unauthorized actions, and a more reproducible trajectory.

    Failure modes worth managing separately in practice include:

    • Spinning: Repeatedly calling the same retrieval with different phrasing;
    • Goal drift: The user wants to fix a bug, but the loop wanders off to refactor an unrelated module;
    • False completion: Claiming it is fixed without running verification;
    • Observation pollution: Pasting the tool’s error page entirely back into the context, drowning out the actual stack trace;
    • Non-reproducibility: Failing to save tool versions and inputs, making it impossible to explain later why a change was made that way.

    The corresponding solutions are not mysterious: action fingerprint deduplication, mandatory tool verification for key assertions, summarizing long observations before keeping original pointers, and ensuring every trajectory is replayable. This is the same type of engineering as idempotency, auditing, and timeouts in traditional job systems, just with the decision-maker swapped to a probabilistic model.

    8. Personal Assistants and the Boundary of “Super Employees”

    Personal Agents emphasize long-term online presence, remembering user preferences, and proactively handling low-risk tasks: summarizing unread items, drafting replies, monitoring alerts, and opening a repair loop when tests fail. Super-agents represent the upper-limit imagination in marketing and architectural discussions: a single entry point scheduling almost all office and development tools.

    Technically, they are still combinations of the previous layers: loops, memory, tools, permissions, and human confirmation. The difference lies in residency and proactive triggering. Triggers can be schedules, queue messages, or monitoring events, rather than just waiting for a user to type. State must be saved across sessions and must be deletable and auditable; otherwise, “remembering the user” becomes a liability of privacy and false memories.

    Proactive action carries higher risks than Q&A. Code being modified or emails being sent while you sleep means that if misjudged, the damage occurs outside the chat window. Therefore, high side-effect actions should default to a draft state: generate a patch but don’t merge, generate a reply but don’t send, until a policy or human confirms. Being online 24/7 means the event-driven runtime is still active, not that the model is authorized to act freely.

    So-called omnipotence is usually just a broader tool coverage combined with a loop that didn’t fail in the demo. Production systems will still fail on permissions, expired knowledge, ambiguous goals, and environment changes. The end goal of this evolution is not to eliminate humans, but to shift them from repetitive execution to setting goals, approving side effects, and spot-checking trajectories.

    9. How to Choose the Right Layer to Stop At

    There is no need to apply the maximum architecture to every requirement. You can choose based on side effects and uncertainty:

    Scenario Sufficient Layer What Not to Rush Into
    Explain concepts, draft documents Dialogue + retrieval when necessary Multi-agent voting
    Query internal docs and provide sources Retrieval tool + citation constraints Auto-writing to business systems
    Fix a testable defect Loop + testing tool + patch draft Unmanned merge
    Cross research, implementation, review Main controller + permission-isolated subtasks Role-playing without acceptance criteria
    Long-term message/alert monitoring Event trigger + memory + human gate Default sending and publishing

    When deploying, the priority is to flesh out the evidence chain, not to add another role name: Is the goal decidable? Are tools least-privileged? Can failures be classified? Is the trajectory replayable? Cloud-native object storage, message queues, logging, and monitoring are suitable for checkpoints, events, and auditing, but they do not improve the model’s inherent factual accuracy. Accuracy comes from constraints, verification, and knowing when to stop.

    Conclusion

    The main thread of these three years can be compressed into one sentence: The model is responsible for proposing the next step amidst uncertainty, and the runtime is responsible for making that step executable, observable, stoppable, and accountable. Chatting is the starting point; tools turn language into action; ReAct and loops turn actions into multi-step jobs; the harness and loop engineering turn jobs into operable systems; sub-processes are merely splits for when context and permissions are insufficient. New buzzwords will continue to emerge, but the judgment criteria can remain unchanged—which gap of the previous layer did it solve, and which gap did it leave to humans?