The Three-Year Evolution of AI Agent Architecture: From Complexity Back to Simplicity

    This article traces the three-year evolution of AI agent architecture across four stages—open API calling, manual context injection, productized instructions and tools, and automatic context accumulation—and explains why the industry is moving back toward simpler designs. It breaks down the hard constraints that undermined the original universal-agent vision, the three main threads running through the evolution, and four design principles for rebuilding simplicity: single responsibility, layered context, controlled execution, and governable memory. Includes a sample layered agent structure, a sandboxed tool-call pattern, and practical engineering recommendations for interface scoping, evaluation, observability, and infrastructure.

    1. Background: The Gap Between Ambition and Reality

    The original vision for agent architecture was strongly universalist. Give a model a structured interface description file, and it would decide on its own which remote endpoint to call, what parameters to pass, and how to chain multiple steps together—yielding near-universal tool use. This approach treated standardized interface descriptions as the general-purpose bridge between models and external systems, and it essentially hoped a single unified protocol could cover every business scenario.

    Two hard constraints surfaced in practice. The first was model maturity on the model side. When an interface description grew to hundreds of endpoints with deeply nested hierarchies, early models were prone to parameter hallucination, wrong endpoint selection, and losing critical constraints across long contexts. The second was excessive burden on the interaction side: capabilities had to be enabled manually one at a time, which made stable expectations impossible to form and made it hard to accumulate anything as a team asset.

    The most valuable output actually came from a byproduct: the controlled code execution sandbox. It demonstrated that as long as a model is given a runnable, observable, and reclaimable execution environment, it can handle a large volume of tasks—data analysis, format conversion, scripted computation—without a dedicated endpoint being pre-built for every type of need. That conclusion became the key premise for the architectural simplification that followed.

    2. Stage Breakdown: Four Stages and Three Main Threads

    Stage 1: Open Interface Calling

    The defining traits were open capabilities and thin constraints. The advantage was broad coverage; the drawback was poor controllability. In engineering terms, this showed up as extremely long specification text stuffed into prompts, model behavior that was hard to reproduce, and evaluation sets that could not pass.

    Stage 2: Manual Context Injection

    Stable role definitions, coding conventions, and output formats were written into a fixed prefix and attached automatically to every session. This addressed the high-frequency pain point of repeatedly setting up context, and it was the conceptual origin of the later project-level rule files and repository-level documentation files. Its engineering value lay in separating volatile business logic from stable collaboration conventions.

    Stage 3: Productized Packaging of Instructions and Tools

    Role definitions, reference material, and a set of operations were bundled into a single-purpose unit that could be distributed. The direction shifted from an “open-ended universal assistant” to a “carefully curated single-purpose application.” The significance of this step was establishing a delivery format that is reusable, shareable, and versionable.

    Stage 4: Automatic Context Accumulation

    The system extracts stable facts from multiple rounds of interaction and silently injects them into subsequent sessions—effectively a self-maintaining system prefix. It moves personalization from “manually maintained by the user” to “automatically maintained by the system.”

    Three main threads run throughout: capability boundaries move from unlimited openness toward converged controllability; context management moves from manual assembly toward automatic accumulation; automation moves from zero toward a closed loop.

    3. The Underlying Logic of Returning to Simplicity

    Simplification is not a regression in capability; it is moving constraints forward. Uncertainty is shifted from runtime to design time, trading deterministic structure for stability. This can be summarized in four principles:

    1. Single responsibility: one agent unit solves only one class of problem, and the tool set stays at the minimum viable size.
    2. Layered context: stable conventions, task information, retrieved results, and historical memory are stored in separate pools to avoid cross-contamination.
    3. Controlled execution: all external actions go through a sandbox or gateway, with timeouts, quotas, rollback, and auditing.
    4. Governable memory: automatically accumulated content must be viewable, correctable, and deletable, with sensitive-information filtering in place.

    An illustrative layered structure (pseudocode):

    1. AgentUnit
    2. ├── system_prefix # Stable role and output conventions, version-controlled
    3. ├── task_context # Parameters and goals for a single task
    4. ├── retrieved_evidence # Retrieval-augmented results, with sources and freshness
    5. ├── memory_store # Automatically accumulated facts, supports view/correct/delete
    6. └── tool_registry # Minimal tool set, with unified auth and quotas

    Controlled invocation on the execution side can be abstracted as:

    1. def run_tool(name, args, ctx):
    2. assert name in ctx.tool_registry, "Tool is not in the allowlist"
    3. with sandbox(timeout=ctx.timeout, quota=ctx.quota) as box:
    4. result = box.execute(name, args)
    5. audit_log.write(name, args_hash, result.status)
    6. return result if result.status == "ok" else fallback(ctx)

    4. Engineering Recommendations

    • Subtract from interface descriptions: trim endpoints per scenario, prefer fewer over complete, and split long specifications into fragments loaded on demand.
    • Evaluation first: build reproducible test sets for each task type, and use pass rate as the basis for architectural trade-offs.
    • Close the memory governance loop: periodically sample and audit automatically accumulated content to prevent incorrect facts from persisting long-term.
    • Build observability in: connect logging services, monitoring and alerting, and distributed tracing to pinpoint “wrong tool selection” and “parameter hallucination.”
    • Elastic infrastructure: use stateless compute and container platforms to host sandboxes, object storage to hold artifacts, and message queues to smooth out peaks.

    5. Conclusion

    The conclusion from three years of evolution is not complicated: the ceiling of an agent is not determined by the number of tools, but by context quality and execution controllability. With the general cloud-native capabilities of platforms such as Baidu AI Cloud, developers should build systems with a minimal tool set, layered context, and governable memory, so that complex requirements land on a simple architecture.