AI Agent Self-Iteration and Evolution: What Batch File Processing Reveals
This article examines what AI agents can actually do when given a real batch file processing task, and how two mainstream agents performed on it. Using a dataset of 237 user verification records, it compares task understanding, script generation, execution stability, and delivery quality, then looks at why smaller locally deployed models struggle with long tool chains. It also separates the three commonly claimed layers of agent "self-iteration" and explains which ones are mature today, closing with practical recommendations for delivery standards, validation, execution environments, and model selection.
1. Introduction: Why Batch File Processing Is a Test of Agent Capability
In day-to-day data governance and business delivery, batch file processing may look like repetitive work, but it hides a lot of detail traps. Take a dataset of 237 user verification records: 176 of them include face recognition video links that must be downloaded one by one and renamed to the pattern “name-IDnumber.extension”. Manual work is not only slow, it easily leads to missed downloads, extensions whose letter case gets silently rewritten, and interrupted downloads that cannot resume. Tasks like this have clear rules, decomposable steps, and verifiable results, which makes them an ideal scenario for evaluating an AI agent’s planning and execution ability.
This article compares two mainstream types of AI agents on the same task, focusing on their differences in task understanding, script generation, execution stability, and delivery quality. It then examines how credible the claim of “self-iteration and evolution” is in a real engineering context.
2. Task Setup and Evaluation Dimensions
The source data is a user verification spreadsheet with fields for name, phone number, ID number, and the video URL generated after face verification. The video formats are mixed, with both lowercase and uppercase extensions, and the letter case is not consistent.
The core requirements come down to three:
- Download every record that has a face video URL;
- Preserve the original letter case of each extension, with no normalization;
- Rename files according to the “name-IDnumber.extension” pattern.
The evaluation covers four dimensions: completeness (whether everything was downloaded), correctness (whether naming and extensions strictly comply), cleanliness (whether the delivery directory contains only the target files), and cost control (whether model calls and execution overhead stay within a reasonable range).
3. Execution Paths of the Two Agent Types
The first type of agent generated an automation script first and then ran the downloads. All 176 videos ended up in place, naming and extension letter case were fully preserved, and the delivery directory contained no scripts, logs, or temporary files, so it could move straight to the next stage. The whole process used a general-purpose reasoning model, at a cost of roughly one yuan.
The second type of agent also took the code execution route, with the same correct download count and naming results, but two extra files remained in the directory: the download script and a copy of the data source. This did not affect the videos themselves, but it broke delivery cleanliness and would require an additional cleanup step in a production setting. Its model call cost was also around one yuan.
The gap between the two is not about “whether it can be done” but about “whether it is done cleanly enough”. This suggests that an agent’s maturity often shows in its awareness of delivery standards during the wrap-up phase, rather than in how complete the main flow is.
4. A Notable Finding: Local Models Struggle in Complex Tool Chains
The evaluation also observed that smaller parameter models deployed locally generally struggled to complete this kind of task reliably. The reason is not a single missing capability, but that such tasks require composite abilities: multi-step tool calls, retries on exceptions, and path and encoding handling. Small models tend to break down in long-chain planning and self-correction. This shows that an agent’s usability depends heavily on the underlying reasoning model’s tool orchestration and context retention ability.
5. Can Agents Really Self-Iterate and Evolve?
From an engineering perspective, “self-iteration” usually covers three layers:
- In-task correction: adjusting the script based on errors during execution, for example retrying automatically on a timeout;
- Cross-task experience reuse: turning successful paths from past tasks into reusable strategies;
- Self-expansion of capability: automatically generating new tools or new workflows.
Current agents are fairly mature at the first layer, the second depends on external memory and strategy libraries, and the third is still exploratory. A more precise statement is therefore that agents have limited self-correction ability within a bounded task domain, rather than autonomous evolution in a general sense.
6. Practical Recommendations
- Define delivery standards explicitly: write cleanliness and naming rules into the task constraints instead of assuming the agent will figure them out;
- Strengthen validation: combine sampling comparison with full-count checks to avoid a result that only “looks complete”;
- Control the execution environment: write scripts, logs, and temporary files to a separate working directory, and keep only finished products in the delivery directory;
- Choose models sensibly: for long-chain tool calls, prefer general-purpose models with stronger reasoning and context ability;
- Build reusable templates: abstract successful scripts into templates to cut repeated cost on similar tasks.
7. Conclusion
The comparison on batch file processing shows that an agent’s value lies not in claiming it “can evolve”, but in whether it can deliver reliably under clear constraints. For developers, understanding its capability boundaries and filling in the validation and cleanup steps is the key to putting agents to real use.
