AI Agent Self-Iteration Tested: Which Ones Are Actually Reliable
This article tests whether AI agents can truly self-iterate by running a real batch file-processing task: downloading 176 videos and renaming them to a strict "Name-IDNumber.Extension" convention. It explains a three-layer definition of self-iteration, compares two general-purpose agents that tied on completion but differed on self-verification and delivery cleanliness, and shows why locally deployed small models failed on long, multi-constraint workflows. The article also provides a reusable four-point acceptance checklist, sample Python assertions, and engineering recommendations for turning agent output into deliverable results.
1. Defining What “Self-Iteration” Actually Means
Before asking whether an AI agent can self-iterate, the concept needs to be narrowed. The industry usually breaks self-iteration into three layers:
- Execution layer: The agent understands the goal, decomposes it into steps, and calls tools to complete the task.
- Verification layer: After execution, the agent checks its own output, detects deviations, and corrects them.
- Delivery layer: The output meets engineering standards and can enter downstream workflows without manual rework.
Much of the marketing claims treat the first layer (“it runs”) as if it were the third layer (“it is deliverable”). This is the main source of distorted evaluation.
This article uses a real and typical scenario as the benchmark. Suppose you have a user authentication spreadsheet with 237 records, 176 of which contain video URLs generated after liveness face verification. The requirement is to download all 176 videos and rename each one to “Name-IDNumber.Extension”. It looks like pure manual labor: clicking through one by one can easily consume an afternoon and is highly error-prone. Yet it falls squarely within what agents do best: a clear goal, repetitive steps, and automatically verifiable results.
2. Task Design: Making a “Simple Task” Discriminating
The difficulty is not complexity but detail constraints. The source data contains names, phone numbers, ID numbers, and video URLs. The video container formats are inconsistent, and file extensions mix uppercase and lowercase. There are only three core requirements:
- Download every record that has a video URL, with none missed.
- Preserve the original case of each extension exactly, with no normalization.
- Name each file strictly as “Name-IDNumber.Extension”.
These three constraints map to three common failure modes: missing items, extensions being rewritten to a uniform case, and the task aborting midway with no resume capability. There is also an implicit metric: directory cleanliness, meaning whether the output directory contains intermediate artifacts such as scripts, logs, or data copies. In engineering delivery, this often determines whether the output can be consumed directly.
3. Test Results for Two Types of Agents
Both types of agents chose the same technical route: the model generated an automation script and executed the downloads, rather than relying on manual UI operations. This is the mainstream approach for agents handling batch file tasks today, and its advantages are controllability, reproducibility, and ease of debugging.
The first agent downloaded all 176 videos successfully. The naming strictly followed the specification, the mixed-case extensions were fully preserved, and the output directory contained only video files, with no scripts, logs, or temporary files. It was deliverable as-is. The whole process was driven by a general-purpose large model at a cost of about one yuan RMB.
The second agent also downloaded and named all 176 files correctly, but its output directory retained two intermediate artifacts: the download script and a copy of the source data. They did not affect the videos themselves, but they broke delivery cleanliness and would require an extra cleanup step in a production setting. Its model and cost level were comparable to the first.
The conclusion is clear: at the “can it finish” layer, the two tie. The difference appears at the self-verification and delivery standards layer. The first agent proactively converged its workspace during the final stage; the second left the intermediate artifacts behind. This is exactly the dividing line between “it runs” and “it is deliverable,” and the key evidence for judging self-iteration capability.
4. Key Finding: Local Small Models Fail Collectively on Long-Chain Tasks
Another notable phenomenon was that all the locally deployed small-parameter models failed to complete the task. The reason was not a single-point capability gap but the compound pressure of a long-chain task:
- Instruction retention decay: When there are more than three constraints, including negative requirements about what not to do, small models tend to forget them in the middle or later stages.
- Insufficient tool-call stability: Multi-round script generation and execution require stable structured output, and small models are more prone to format deviations.
- Weak error recovery: When a single link times out or returns 404, there is no retry or skip strategy, so the entire batch aborts.
- Absent self-verification: The model does not proactively compare whether the record count, download count, and file naming are consistent.
The engineering implication is that the longer the task and the more constraints there are, the more the marginal capability gap between models is amplified. Selection should not be based on how a single-turn Q&A looks, but on the end-to-end completion rate.
5. A Reusable Evaluation Framework: A Four-Layer Acceptance Checklist
The observations above can be abstracted into an actionable acceptance method for evaluating whether any agent has real iteration capability:
- Completeness: Does the output count equal the expected count? A simple assertion can verify this:
expected = 176actual = len([f for f in os.listdir(out_dir) if f.lower().endswith(('.mp4', '.mov'))])assert actual == expected, f"Missing {expected - actual} files"
- Fidelity: Are original attributes unintentionally rewritten, especially extension case, encoding, and separators?
- Cleanliness: Does the output directory contain only deliverables, with intermediate artifacts isolated in a separate workspace?
- Recoverability: Can the task resume from a checkpoint after interruption, and are failed items logged and retried separately?
A robust implementation usually has the following skeleton:
for row in read_records(csv_path): # Read row by row, supporting resume after failureurl = row.get("video_url")if not url:continue # Skip records without a URLext = guess_ext_from_url(url) # Preserve the original casedst = f"{row['name']}-{row['id_no']}{ext}"download_with_retry(url, dst, retries=3, timeout=30)cleanup_workspace(keep_dir=out_dir) # Final cleanup to ensure delivery cleanliness
6. Engineering Recommendations
To make agents reliably produce deliverable results, convert constraints from “natural-language expectations” into “machine-verifiable acceptance conditions”: first define the output directory specification and naming regex, then let the agent execute, and finally use a script to assert automatically. Write intermediate artifacts to a dedicated temporary directory and clean them up before delivery. For batch tasks, always require idempotency and checkpoint resume to avoid a full rerun caused by a single failure.
On the infrastructure side, general cloud capabilities can carry this kind of pipeline: object storage holds source data and outputs, a container platform runs batch jobs, logging and monitoring with alerting handle failure trails and threshold notifications, and a message queue handles peak shaving and task distribution. This way the agent handles “generation and decision-making” while the platform handles “stability and observability,” with a clear division of labor.
7. Conclusion
Whether an agent can truly self-iterate is not judged by how flashy the demo is, but by three verifiable things: whether the result is complete, whether attributes are preserved, and whether delivery is clean and automatically verifiable. This test shows that with the same model and cost, the real gap lies in the ability to self-converge during the final stage, while local small models still cannot deliver stably on long-chain, multi-constraint tasks. Putting acceptance criteria upfront, isolating intermediate artifacts, and making failures recoverable are the practical path for agents to move from “demo-able” to “production-ready.”
