Do AI Agents Really Self-Evolve? What a Real File-Processing Test Reveals

    This article separates three commonly confused levels of agent capability—in-task adaptation, cross-task experience reuse, and expansion of capability boundaries—and uses a real batch file-processing task as a benchmark to compare two mainstream agent approaches. It explains why clean, handoff-ready output and correct handling of edge cases matter more than simply generating a script, why small locally deployed models struggle with long-chain tasks, and which measurable engineering metrics can actually verify progress. Readers will find practical recommendations for acceptance criteria, directory isolation, resumable runs, and regression test sets.

    Do AI Agents Really Self-Evolve? What a Real File-Processing Test Reveals

    1. The Question: Does “Editing Code” Equal Evolution?

    Discussion about whether AI agents can “self-iterate” and “self-evolve” has intensified over the past two years. A lot of marketing treats “can write its own scripts” and “can fix its own errors” as proof of self-evolution. These are concepts that need to be strictly separated.

    In an engineering context, at least three layers of capability must be distinguished:

    • In-task adaptation: adjusting strategy during a single task run based on errors or boundary conditions—switching parsing methods, adding retry logic.
    • Cross-task experience reuse: turning lessons from a previous task into reusable assets that can be called directly when a similar problem appears.
    • Capability boundary expansion: autonomously discovering new scenarios, adding new tools, and restructuring its own workflow without human intervention.

    The first layer is common in today’s agents. The second requires external memory and an asset library. The third still lacks reliable evidence in general-purpose settings. Packaging the effect of the first layer as the third is the most common substitution in current marketing.

    To move beyond conceptual debate, this article uses a real, detail-dense engineering task as a yardstick and observes how two mainstream agent technical approaches perform on the same input.

    2. Task Design: Why Batch File Processing Is the Best Test

    The scenario is typical: a user authentication spreadsheet with 237 records, 176 of which contain video URLs. Each video must be downloaded and archived under the naming format “Name-IDNumber.Extension”.

    The “dirtiness” of the input data is deliberately preserved:

    • Video container formats are inconsistent, with both lowercase and uppercase extensions present;
    • Some records have no video URL and must be skipped rather than aborting the run;
    • Names and ID numbers may contain characters that need escaping;
    • Downloads may hit timeouts, rate limits, or partially corrupted files.

    There are only three hard requirements: download only records that have a URL, preserve the original extension casing exactly, and keep the naming format fully consistent.

    This type of task was chosen because its demands map exactly onto the dimensions that matter for real deployment: uninterrupted long-chain execution, correct edge-case handling, and clean, handoff-ready deliverables. None of these can be faked by “looking done”—every file must be verified.

    3. Execution Differences Between the Two Approaches

    Approach A: Scripted Execution with Zero Directory Pollution

    The first agent generated a complete download script, ran it once, and cleaned up intermediate artifacts itself. The result: all 176 files present, naming and extension casing exactly correct, and nothing in the target directory except the video files—no scripts, logs, or data copies.

    The value of this path is delivery as a finished product. In real enterprise workflows, downstream stages often scan and ingest the directory directly, and any extra file triggers validation failures or human intervention.

    Approach B: Scripted Execution with Leftover Intermediate Artifacts

    The second agent completed the downloads and naming with no difference in accuracy, but left the execution script and a copy of the data source in the target directory. Functionally flawless; in engineering terms, it added a manual cleanup step.

    The difference looks minor but reflects a deeper issue: whether the agent includes the “delivery standard” in its own objective function. If the goal is defined only as “download succeeded,” leftovers are reasonable. Only when the goal is defined as “the directory can be handed off directly” does cleanup become a required action.

    The Nature of the Difference

    The two approaches used models of similar specification and cost tier, both completing the task at very low cost. This indicates the difference does not come from “who is smarter” but from how completely the task goal is modeled and how complete the self-verification mechanism is. Real evolutionary capability should show up as proactively filling in delivery constraints that were never explicitly stated, not as producing scripts faster.

    4. The Overlooked Finding: Small Local Models Fall Short on Long-Chain Tasks

    A more notable conclusion from testing: under the same task, small locally deployed models generally failed to deliver end to end. Typical failure modes included:

    1. Losing context midway: forgetting the naming rule after dozens of items, causing extensions to be rewritten uniformly;
    2. No retry mechanism: a single network error terminating the entire batch;
    3. Silent skipping: bypassing abnormal records outright, ending with a count mismatch while reporting success;
    4. Over-normalization of format: normalizing uppercase extensions to lowercase for the sake of “tidiness,” violating a hard requirement.

    This suggests the bottleneck in long-chain file tasks is usually not the model’s theoretical capability but context retention length, tool-call stability, and a closed self-verification loop. Small local models still lag noticeably on all three and are better suited in the short term to single-step, short-chain auxiliary work.

    5. Grounding “Self-Evolution” in Verifiable Engineering Metrics

    To judge whether an agent is genuinely evolving, use a quantifiable framework rather than demo effects:

    • First-pass rate: the proportion of runs meeting all hard constraints with no human intervention;
    • Delivery cleanliness: the number of redundant files in the target directory;
    • Exception recovery rate: the proportion still completed after injecting timeouts, broken links, and dirty data;
    • Constraint adherence: compliance with counterintuitive requirements such as “preserve casing”;
    • Cost per task: the order of magnitude of resources consumed for the same task;
    • Experience reuse rate: whether human intervention decreases on the second run of a similar task.

    The last item is the core evidence of “evolution.” If the second run still requires reasoning from scratch, it is repeated labor, not iteration.

    The verification logic can be as simple as:

    1. import os
    2. def verify(target_dir, expected):
    3. files = os.listdir(target_dir)
    4. extra = [f for f in files if f not in expected]
    5. missing = [f for f in expected if f not in files]
    6. return {"count": len(files), "extra": extra, "missing": missing}

    Making this kind of check a mandatory closing step for the agent is far more reliable than hoping it “realizes on its own.”

    6. Practical Recommendations

    1. Write delivery standards into the prompt and the acceptance script; do not rely on the agent inferring implicit requirements.
    2. Enforce separation of the working directory and the delivery directory, so intermediate artifacts cannot pollute the output by nature.
    3. Design checkpoint resume for long-chain tasks, recording progress per record to avoid full restarts.
    4. Use object storage and queues for peak shaving and retries, leaving network unreliability to mature infrastructure.
    5. Build a regression task set and rerun it after every model or prompt change, using data to judge whether capability truly improved.
    6. Keep reasonable expectations for small local models, positioning them on short-chain, verifiable subtasks.

    7. Conclusion

    Agents do currently possess in-task adaptation, but describing this as “self-iterating evolution” is still an overinterpretation. The real gaps lie in the voluntary completion of delivery constraints, recovery from exception scenarios, and whether experience can be accumulated and reused. The more robust engineering approach is to convert “intelligence” into controllable, measurable, deliverable deterministic results through explicit acceptance criteria, isolated directory structures, and a regression evaluation set.