The Evolution of General-Purpose AI Agents: From Demo to Self-Evolution

    This article traces how general-purpose AI agents have moved through three overlapping paradigm shifts in just over a year: the concept breakout, ecosystem expansion, and self-evolution. It breaks down the four core layers of a general agent (planning, memory, tools, and evolution), shows how to build a minimal self-evolution loop, lists common pitfalls, and proposes a four-dimension evaluation framework. Readers will learn the engineering constraints that matter most: recursion limits and budgets in planning, tiered memory with retrieval instead of full injection, clear tool contracts with error semantics, and a fixed baseline for measuring whether each iteration is actually better.

    1. Background: Three Paradigm Shifts in a Single Year

    General-purpose AI agents have gone through three clear paradigm shifts in a little over a year.

    The first was the concept breakout. Products in the form of general task assistants turned “give it one sentence, get a finished deliverable” into an experience the mainstream could perceive. The industry debate centered on a single question: can it actually do the work?

    The second was ecosystem expansion. A large number of open source implementations appeared, producing a crowded field: some teams built execution kernels, some built tool adaptation layers, some built front-end interaction shells. The ecosystem looked lively, but inconsistent interface standards, blurry capability boundaries, and differing evaluation criteria made it hard for developers to compare options side by side.

    The third is self-evolution. Systems began to adjust themselves based on their execution traces. This is not simple prompt rewriting; it means turning failure experience into reusable strategy assets. This shift moved the focus of competition from “how many features” to “iteration efficiency.”

    These three shifts are not replacements for one another; they stack. Building a usable agent system today still requires the task-loop capability of the first phase, the tool ecosystem integration of the second, and the continuous optimization mechanism of the third.

    2. Capability Breakdown: The Four Core Layers of a General Agent

    2.1 Planning Layer: Turning a Vague Goal into an Executable Graph

    Planning quality sets the ceiling on system capability. In practice, three strategies are usually combined:

    • Decomposition planning: recursively splits a goal into a subtree of subtasks, suited to clear goals with enumerable steps;
    • Reflection planning: reviews results after execution and dynamically revises the remaining steps, suited to verifiable results;
    • Hybrid planning: coarse-grained decomposition first, then local reflection at each node, balancing cost and robustness.

    A schematic pseudocode structure looks like this:

    1. def solve(goal, depth=0):
    2. if depth > MAX_DEPTH or is_atomic(goal):
    3. return execute(goal)
    4. plan = decompose(goal) # generate subtasks
    5. results = []
    6. for sub in plan:
    7. r = solve(sub, depth + 1)
    8. if not verify(r): # local reflection and retry
    9. r = solve(reframe(sub, r), depth + 1)
    10. results.append(r)
    11. return merge(results)

    Three engineering constraints matter: set a maximum recursion depth to prevent infinite decomposition; assign a timeout and budget to each node; and force human confirmation for irreversible actions (deletion, payment, outbound sending).

    2.2 Memory Layer: Separate Three Types of Memory to Avoid Context Explosion

    Stuffing all history into the context is the most common mistake. A sensible layering is:

    • Short-term memory: intermediate state of the current task, reclaimed when the task ends;
    • Long-term memory: preferences, terminology, and domain knowledge reusable across tasks, retrieved rather than injected in full;
    • Episodic memory: complete traces of failures and successes, the raw material for later self-optimization.

    For retrieval, a combination of “vector recall + keyword recall + reranking” is recommended. Semantic similarity alone tends to miss on proper nouns, identifiers, and error codes.

    2.3 Tool Layer: Capability Boundaries Are Defined by Interface Contracts

    The stability of tool calls depends essentially on how clearly the contract is described. A usable tool definition should include a clear input schema, error semantics for failures, an idempotency statement, and a side-effect level annotation. A tool without error semantics leaves the planning layer oscillating between “retry or give up.”

    2.4 Evolution Layer: Turning Experience into Assets

    The practical form of self-evolution is usually to distill successful traces into retrievable strategy entries, convert failed traces into constraints, and run canary comparisons between versions. The easiest trap here is a missing baseline: without a fixed evaluation set, any judgment that something “got better” is only a subjective impression.

    3. Putting Self-Evolution into Practice: How to Build the Loop

    A minimal viable evolution loop has five stages:

    1. Collection: record inputs, plans, tool calls, results, latency, and cost;
    2. Labeling: use rule-based checks or model review to produce reusable judgment signals;
    3. Distillation: write high-value traces into a strategy library with applicability tags;
    4. Canary: new strategies take effect on only a small share of traffic, running in parallel with the baseline;
    5. Rollback: automatically switch back to the previous strategy version when metrics degrade.

    General-purpose cloud platform capabilities are enough to support this: object storage keeps traces and strategy snapshots, a message queue smooths spikes and decouples the collection pipeline, a container platform hosts elastic inference and sandbox execution, logging and monitoring with alerting provide observability, and key management with access control protects credentials. Baidu AI Cloud offers exactly this category of general capabilities; specific choices should be evaluated against data volume and compliance requirements.

    4. Common Pitfalls and How to Avoid Them

    • Blind faith in end-to-end: handing all logic to the model leaves no verifiable intermediate state, so failures cannot be localized;
    • Ungoverned memory: long-term memory only grows and never shrinks, and recall quality keeps declining as noise accumulates;
    • Tools without a sandbox: executing generated code or system commands directly in production is an uncontrollable risk;
    • Evaluation by feel: without a fixed evaluation set and baseline, iteration direction drifts randomly;
    • No cost budget: without caps on tokens and call counts, per-task cost spirals;
    • Over-broad permissions: granting the agent more than the minimum permissions the task requires widens the blast radius.

    5. Evaluation Framework: Four Dimensions of System Maturity

    Build a dashboard around four dimensions: task success rate, step efficiency (steps and calls needed to reach the goal), stability (variance across repeated runs on the same input), and unit cost. The four usually pull against each other: raising the success rate typically increases steps and cost, so evaluation must present them together rather than reporting a single number.

    6. Conclusion

    From concept breakout to ecosystem expansion to self-evolution, the center of competition for general agents has shifted from “can it do it” to “can it keep getting better in a stable, low-cost, measurable way.” For developers, the real moat is not model parameters but the four engineering foundations: planning strategy, memory governance, tool contracts, and the evaluation loop.