AI Agents for Batch Tasks: Testing Automation and Self-Iteration

    A hands-on test of two AI agent tools examines how well they handle a 176-video download task, including exact file naming, extension preservation, error recovery, and output cleanup. The results illustrate where feedback-driven self-iteration works, where model limitations matter, and why developers still need explicit acceptance criteria and automated validation.

    AI Agents for Batch Tasks: Testing Automation and Self-Iteration

    1. A Real-World Batch Processing Task

    Consider a user verification dataset containing 237 records. Of these, 176 include links to videos captured during identity verification. The task is to download all 176 videos and archive them using the naming convention name-ID_number.extension.

    This looks like routine manual work. Downloading and renaming 176 files could take an afternoon, with plenty of opportunities to miss a file, use the wrong extension, or mistype an identification number.

    Tasks with clear rules, repetitive steps, and verifiable results are a natural fit for AI agents. But how well do claims of “self-iteration” and “autonomous improvement” hold up in practice? Are they meaningful capabilities, or mostly marketing language?

    2. Task Requirements: Simple Workflow, Important Details

    The source is a CSV file with fields for names, phone numbers, identification numbers, and identity-verification video URLs. Several details make the task more demanding than a basic download script:

    • Mixed file extensions: The videos include both .mp4 and .MOV. Each original extension, including its capitalization, must be preserved rather than normalized to lowercase.
    • Exact naming: Every filename must follow name-ID_number.extension. The identification numbers in this dataset contain 18 characters and must be reproduced exactly.
    • Completeness: All 176 videos must be downloaded. Failures and timeouts need to be detected and retried.
    • Clean delivery: Ideally, the output directory should contain only the finished video files, with no temporary scripts, logs, or copies of the source data.

    The main challenge is not whether an agent can download a file. It is whether the agent handles exceptions, respects edge cases, and understands the expected final deliverable.

    3. Comparing Two Agent Tools

    Two AI agent tools were tested on the same task. Both followed a generate code → execute → validate workflow and used comparable lightweight reasoning models. The reported cost was approximately CNY 1 per task for each tool.

    Tool A: Complete and Ready to Deliver

    Tool A independently generated a Python script to perform the downloads. Its final output met all three observed delivery criteria:

    1. All 176 videos were downloaded successfully.
    2. Filenames followed the required convention, with .MOV and .mp4 capitalization preserved exactly.
    3. The output directory contained only the 176 finished video files, with no scripts, logs, or temporary artifacts.

    The third result is particularly noteworthy. Tool A appeared to recognize that the delivery directory should be clean and removed intermediate artifacts after execution. That behavior went beyond the literal download instructions and reflected an understanding of the expected end state.

    Tool B: Correct Files, Incomplete Cleanup

    Tool B also completed the task through code execution. All 176 videos were downloaded, and both filenames and extensions were correct.

    However, the output directory contained two additional files: the Python download script and a copy of the source CSV.

    These leftovers did not affect the correctness of the videos, but they made the directory unsuitable for direct delivery without additional cleanup. Tool B satisfied the explicit file-processing instructions while missing an implicit requirement about the final deliverable.

    4. What the Test Reveals About Lightweight Models

    A related observation was that success rates dropped substantially when the same task was assigned to agents powered by locally deployed, small-parameter open-source models.

    Common failure patterns included:

    • Generating otherwise correct scripts that normalized extension capitalization.
    • Stopping after an individual download timed out because no retry logic was implemented, leaving the file count below the target.
    • Mishandling empty values or dirty CSV data, resulting in filenames containing invalid characters.

    These observations suggest a useful distinction: the underlying model sets the baseline for execution reliability, while task planning and feedback mechanisms determine how far the agent can improve its performance.

    The model’s ability to understand code details and edge cases directly affects whether self-iteration produces meaningful corrections or remains an unfulfilled promise.

    5. Can AI Agents Really Self-Iterate?

    The results support a qualified answer. Self-iteration is not a binary capability; it is better understood as several layers of execution competence.

    Layer 1: Task Decomposition and Code Generation

    Most mainstream agents can translate clearly defined natural-language requirements into executable scripts.

    This works best when the task rules can be stated precisely. Ambiguous requirements make it harder to generate reliable code from the outset.

    Layer 2: Error Correction During Execution

    The clearest evidence of iteration is a feedback loop: after a script fails, can the agent read the error, identify the cause, modify the code, and run it again?

    In the testing, better-performing tools responded to individual link timeouts by adding retry logic and timeout controls. This is a concrete example of self-iteration: execution feedback leads to a change in the implementation.

    Layer 3: Result Validation and Delivery Standards

    The least consistently demonstrated capability is checking whether the finished result meets the full delivery standard.

    That includes verifying the file count, checking filenames, and removing intermediate artifacts. Stronger tools performed most of these steps, but complete coverage of every implicit requirement remained uncommon.

    This layer still needs a human-defined acceptance checklist.

    The conclusion is that self-iteration is real, but layered and bounded. Agents can take over much of the execution work in repetitive workflows. They still need explicit human guidance on what constitutes an acceptable deliverable.

    6. Practical Recommendations for Developers

    For enterprise batch processing, the test points to four practical measures.

    1. Include Acceptance Criteria in the Task Description

    Do not simply ask the agent to “download these 176 videos.” Specify the required file count, filename pattern, extension capitalization, and absence of unrelated files in the output directory.

    Agents tend to follow explicit rules more reliably than they infer unstated expectations.

    The source task included the following example of a validation script:

    1. # Include a self-validation script with the task
    2. import os
    3. files = os.listdir(output_dir)
    4. assert len(files) == 176, f"Unexpected file count: {len(files)}"
    5. for f in files:
    6. name, ext = os.path.splitext(f)
    7. assert ext in ('.mp4', '.MOV'), f"Unexpected extension: {f}"
    8. assert '-' in name and name.split('-')[-1].isdigit(), f"Invalid filename: {f}"

    This script provides basic checks, but it is not a complete implementation of every acceptance criterion. In particular, its filename check does not verify an exact 18-character identification number or compare the filename against the source record.

    2. Control Costs Without Sacrificing Model Reliability

    Batch processing can be cost-sensitive, so a cost-effective lightweight reasoning service may be a reasonable choice.

    However, the model still needs dependable code-generation and error-interpretation capabilities. A smaller locally deployed model is not automatically a reliable fallback: rework can erase the savings from lower inference costs.

    3. Standardize an Execute–Validate–Clean Workflow

    Run a fixed acceptance process after the agent finishes:

    • Verify the file count.
    • Spot-check filename correctness.
    • Check that the output directory contains only deliverables.
    • Remove intermediate artifacts before delivery.

    Delivery quality should be enforced through an engineered workflow, not left to the agent’s initiative.

    4. Apply Least Privilege and Protect Sensitive Data

    Identification numbers and face-verification videos involve sensitive personal information.

    The agent’s execution environment should follow least-privilege access principles. Logs should avoid writing sensitive fields in plaintext, and finished files should preferably be stored in access-controlled object storage rather than an unprotected local directory.

    7. Conclusion

    In this test, AI agents produced results approaching professional delivery standards on a clearly defined batch task. Their self-iteration was visible in execution feedback loops and recovery from exceptions.

    However, understanding delivery semantics and satisfying unstated expectations remain less reliable. People still need to define acceptance standards and verify the results.

    For developers and enterprises, the practical question is not whether every task can be handed over without supervision. It is how to make requirements explicit and validation repeatable: let agents perform the repetitive work, while people retain responsibility for the quality threshold.