AI Agent Batch File Processing: Real-World Testing and the Truth About Self-Improvement
This article reports a hands-on test of AI Agents performing batch file processing, a task that stresses engineering discipline more than raw intelligence. Using a 237-record manifest with 176 face-verification videos in mixed .mp4 and .MOV formats, the test required downloading, renaming to "Name-IDNumber.extension," and archiving into a clean target directory. Both cloud-based Agents completed the main task at roughly 1 yuan per run, but differed in delivery hygiene: one separated workspace from output, while the other left scripts and manifest copies behind. Locally deployed models generally failed due to missing tool loops, feedback loops, and state management rather than model size. The article also breaks "self-improvement" into four verifiable capability layers and offers practical recommendations for teams, including writing acceptance checks first, enforcing workspace isolation, requiring idempotency and resume support, keeping audit logs, and measuring cost by first-pass success rate.
1. Why Batch File Processing Is a Litmus Test for Agents
In scenarios such as data governance, content moderation, and certification archiving, a common requirement appears: given a structured manifest containing multiple media file URLs, batch download the files, rename them according to business rules, and archive them into a designated directory.
In one real-world test, the manifest contained 237 records, 176 of which included face-verification video links. The files mixed .mp4 and .MOV formats with inconsistent letter casing, and the final naming convention had to be “Name-IDNumber.extension.”
The technical complexity of this task is not high, yet it extremely tests engineering details. Missing a single download, normalizing extensions to lowercase, failing to resume after an interrupted download, or leaving scripts and temporary files in the directory will all degrade delivery quality. For this reason, it is an excellent sample for observing whether an AI Agent possesses end-to-end delivery capability.
2. Task Card: Turning Requirements into an Acceptance Specification
To make the comparison fair, the task was fixed into a “task card” containing three parts: input, constraints, and acceptance criteria.
- Input: a user authentication manifest (fields include name, phone number, ID number, and video URL).
- Constraints: process only records with a video URL; preserve the original extension casing; name strictly as “Name-IDNumber.extension.”
- Acceptance: consistent count, zero naming errors, no redundant files in the directory, and repeatable execution.
The illustrative acceptance logic can be written as:
import os, redef verify(dir_path, expected):files = [f for f in os.listdir(dir_path) if os.path.isfile(f)]pattern = re.compile(r"^[\u4e00-\u9fa5A-Za-z]+-\d{17}[\dXx]\.(mp4|MOV)$")assert len(files) == expected, f"Count mismatch: {len(files)}/{expected}"bad = [f for f in files if not pattern.match(f)]assert not bad, f"Naming or extension anomaly: {bad[:5]}"extra = [f for f in files if f.endswith((".py", ".csv", ".log", ".tmp"))]assert not extra, f"Redundant files found: {extra}"
Writing “directory cleanliness” into the acceptance criteria is a highly valuable practice that many teams easily overlook.
3. Real-World Performance of Two Execution Paths
In the test, both types of Agents chose the “write and execute a script” code-execution route, and both ultimately completed the download of 176 videos with correct naming and extension casing. The difference appeared in delivery details:
- One implementation placed scripts, logs, and data copies outside the workspace, leaving only the finished videos in the target directory. Delivery was complete upon completion.
- The other implementation left the download script and a copy of the source manifest in the target directory. Although this did not affect the videos themselves, it required extra cleanup in a formal delivery scenario.
From an engineering perspective, this is not a question of “who is smarter,” but a question of “whether delivery awareness exists.” A mature Agent should separate the “workspace” from the “output area” and self-check the directory at the end.
4. The Overlooked Key Point: Why Local Models Collectively Failed
A notable phenomenon was that locally deployed models generally failed to run the task through completely under the same conditions. Symptoms included errors after script generation, improper path handling, unstable handling of uppercase and lowercase extensions, or stopping midway without retrying. The cause is usually not that “the model is not large enough,” but the absence of three things:
- Tool loop: the ability to actually execute code, read and write files, and make network requests, rather than only giving suggestions.
- Feedback loop: the ability to read errors upon execution failure, automatically fix them, and execute again.
- State management: recording completed items and supporting resume-from-breakpoint and idempotent re-entry.
5. Cost and Efficiency: What a 1-Yuan-Level Task Indicates
This test was completed in a cloud model environment, with a single task costing about 1 yuan. This magnitude indicates that for batch tasks with clear rules and enumerable steps, the cost-effectiveness of an Agent is already far higher than manual per-item operation. However, whether the cost advantage can be realized depends on the first-pass success rate and the number of reworks. If multiple rounds of manual cleanup and re-downloading are required, the actual cost will rise rapidly.
6. Can It Self-Iterate and Evolve: Breaking “Evolution” into Verifiable Capabilities
“Self-iterative evolution” is often described in a mystical way, but in practice it should be broken down into four layers of verifiable capability:
- Task-level self-correction: being able to modify code and rerun after failure, rather than stopping and waiting for a human.
- Experience-level reuse: abstracting the current script into a template and directly applying it to similar tasks next time.
- Rule-level accumulation: writing rules such as “directory cleanliness” and “extension preservation” into the verification checklist.
- Architecture-level optimization: adjusting concurrency, retry, and sharding strategies based on the failure distribution.
With only the first two layers, it is “able to fix bugs”; adding the latter two layers brings it close to “getting better with use.” Currently, most Agents remain at the first two layers, and cross-session memory is unreliable.
7. Practical Recommendations for Teams
- Write acceptance criteria first, then hand it to the Agent: turn count, naming, and directory cleanliness into assertions.
- Enforce workspace isolation: allow only finished files in the output directory.
- Require idempotency and resume support: use the record identifier as the key and skip completed items.
- Keep audit logs: record the download status and time spent for each item to facilitate troubleshooting.
- Measure cost by “first-pass success rate”: factor rework into cost accounting.
8. Conclusion
As far as this test is concerned, both types of Agents could complete the main task, and the gap was reflected in delivery cleanliness and engineering habits; local models were limited by the tool loop and feedback loop. The so-called self-iteration is essentially the engineering of three things: “executable, feedback-capable, and accumulable.” Putting acceptance criteria upfront, hard-coding directory conventions, and making failure retries the default are the correct paths to making agents truly “more handy with use.”
