Can AI Agents Really Self-Evolve? A Practical Look at Batch Downloading

    This article examines whether AI agents can genuinely improve themselves over time, using a batch file download task as the test case. It shows how to turn a vague business request into a verifiable task contract, how to manage per-record execution state so downloads are reliable and resumable, and how to separate a working area from a delivery area so output stays clean and auditable. It also breaks "self-evolution" into three distinct levels—in-task error correction, cross-task experience reuse, and model-level training—and explains what evidence is required to claim each one, along with the metrics and privacy boundaries that any real evaluation must respect.

    1. Completing a Task Is Not the Same as Self-Improvement

    Any discussion of whether AI agents can “self-iterate” has to separate two questions: can the agent complete a single task, and can it improve its later behavior based on the results of that execution.

    The first question is about accuracy on the current task. The second is about whether improvement has an evidential basis, whether it persists across tasks, and whether it transfers to new scenarios. One successful download shows, at most, that the current execution path works. It does not prove the system can keep evolving.

    Batch file processing is a good place to observe these differences. The business goal is concrete, the results are easy to inspect, and the work involves real engineering problems: network instability, missing fields, file naming, repeated runs, and privacy protection. An agent that only generates a download script is still clearly short of stable, deliverable automation.

    What matters more than “which tools it used” is whether the agent closes this loop:

    requirement parsing → planning → controlled execution → result verification → error attribution → experience update.

    Only when the last two stages actually influence later tasks is there any basis for discussing continuous improvement.

    2. Turning Business Requirements into a Verifiable Task Contract

    In the reference scenario, the source data contains 237 user records, 176 of which have a URL for a face-verification video to download. The goal is to download those videos and organize the files as “Name-IDNumber.Extension,” preserving the original case of the extension.

    Requirements like these cannot live only as a natural-language prompt. They have to become explicit acceptance rules.

    2.1 Define the Processing Scope

    “Has a video URL” needs one consistent definition. Empty strings, whitespace-only fields, and obvious placeholder values should not be treated as valid download addresses.

    A good practice is to generate a task list before downloading and tag every record as:

    • Pending: all required fields present, address format basically valid;
    • Skipped: no video URL;
    • Needs manual review: name or ID field missing, or the address is clearly malformed.

    The list should keep the source record identifier so every result traces back to an input row. Otherwise, even with 176 files in the directory, you cannot confirm they correspond to exactly those 176 target records.

    2.2 Treat ID Numbers as Text

    An ID number is an identifier, not a number to compute with. When reading structured text, the relevant fields should be explicitly read as text so that leading zeros are not lost, long digit strings are not converted, and the displayed form does not change.

    The name field needs checking too. Leading and trailing whitespace can be trimmed as agreed in advance, but the content of the name must not be altered on the agent’s own initiative. Characters the file system does not allow should go through a deterministic replacement or escaping rule, and the mapping from original field to final filename should be recorded.

    2.3 Define Where the “Original Extension” Comes From

    A video URL may carry access credentials, query parameters, or temporary authorization data, so you cannot simply take everything after the last dot in the whole URL as the extension.

    A more reliable approach is to parse the URL path first, then extract the suffix from the filename in that path. For example, if the path contains “.MOV,” that “.MOV” should be preserved even when query parameters follow, rather than folding the parameters into the filename.

    If the path has no extension, decide in advance how to handle it: consult trusted response information, add an extension based on a verified file format, or route the record to manual review. Guessing just to keep the task running is not acceptable.

    Two concepts also need separating here: the extension is naming information, while the actual file format is content information. Preserving the case of a suffix does not remove the need to validate content.

    3. Reliable Batch Downloading Is Fundamentally State Management

    An agent generating a program is only the starting point. What actually determines reliability is how the program manages the execution state of each record.

    At minimum, distinguish these states:

    pending, downloading, success, retryable failure, non-recoverable failure.

    Every state transition should carry a reason. A request timeout is a retryable failure. A missing key identity field usually needs a human. Access denied should first prompt a check of whether authorization has expired, not an endless stream of repeated requests.

    3.1 Use Temporary Files So Partial Output Never Reaches the Delivery Directory

    Writing directly to the final filename means a dropped connection can leave a video in the directory that looks fine but is actually incomplete.

    A safer sequence is:

    1. Create a temporary file in a separate working directory;
    2. Write the download in chunks;
    3. Check the transfer result and basic content validity;
    4. Only after validation, promote it to the final file;
    5. On failure, keep the necessary diagnostic information and delete the invalid temporary file.

    Where the file system supports it and conditions are right, an atomic rename reduces the risk of another program reading a partial file. But an atomic rename only guarantees the switch itself; it does not guarantee the content is correct.

    3.2 Retries Must Be Bounded

    Network timeouts and transient connection failures suit a limited number of retries with progressively longer waits. Insufficient permissions, expired addresses, or a missing target resource usually require fixing the input or re-obtaining authorization.

    Indiscriminate retrying causes three problems: it wastes execution time, it adds load on the remote side, and it hides the real cause of the error.

    A retry policy should therefore combine a configurable attempt limit, a backoff mechanism, and error classification, rather than simply “keep going on failure.”

    3.3 Repeated Runs Must Not Destroy Existing Results

    Batch jobs often need to stop and resume. The program should recognize files that are already complete and validated instead of downloading everything from scratch each time.

    However, “the file exists” is not equivalent to “the task succeeded.” At minimum, a skip decision should combine the state record, the file size, and a basic content check.

    If two records produce the same filename, do not silently overwrite. First determine whether they point to the same business object; if it is a genuine conflict, enter an explicit exception path. For tasks with a strictly fixed naming format, appending a sequence number on your own may violate the acceptance criteria just as badly.

    4. Delivery Quality Matters More Than File Count

    One key observation in the reference material: even after all target videos are downloaded, the delivery directory can still contain a copy of the execution program and the source data.

    This is not a download-capability problem. It is a delivery boundary that was never enforced.

    A formal task should split the directory into two areas:

    • Working area: the program, input copies, temporary files, state records, and diagnostics;
    • Delivery area: only final files that meet the acceptance conditions.

    The working area should not simply be wiped, because the task may still need auditing and failure tracing. The delivery area should not contain internal material, because downstream systems may process files automatically based on directory contents.

    This separation also has security value. User verification data includes identity information and face videos, so a stray copy of the source data in the delivery directory widens the spread of sensitive information.

    Acceptance should therefore check a set of constraints, not a single count:

    • Does every record that should be processed have a corresponding result?
    • Are there missing items or duplicate mappings among the files?
    • Do the filenames follow the rules?
    • Is the case of the extension preserved?
    • Do the files pass basic validity checks?
    • Does the delivery directory contain only permitted content?
    • Are failed records explicitly reported?

    A correct count is a necessary condition, not a sufficient one.

    5. Example Flow: Writing Acceptance into the Execution Path

    The following pseudocode shows a general design idea and does not correspond to any specific implementation:

    1. Read source data, treating identity fields as text
    2. Create working area and delivery area
    3. Build a record-level task list
    4. For each task record:
    5. Check required fields and the access address
    6. Parse the original extension from the path
    7. Generate the target filename
    8. Check for naming conflicts
    9. If an existing result passes validation:
    10. Mark as success
    11. Continue to the next record
    12. Create a temporary file in the working area
    13. Perform bounded retries by error type
    14. If download and content checks pass:
    15. Commit the file to the delivery area
    16. Update the state record
    17. Otherwise:
    18. Save the failure reason
    19. Clean up the invalid temporary file
    20. Reconcile source records against final files item by item
    21. Check for non-target files in the delivery area
    22. Output a summary of success, skipped, failed, and needs-review items

    One point deserves emphasis: downloaded content, filenames, and remote responses are all external input and must not be treated as new execution instructions. An agent must remain bound by the original task contract and permission boundaries, and must not change the task goal because external content claims that “additional operations are required.”

    6. “Self-Evolution” Contains at Least Three Different Levels

    6.1 In-Task Error Correction

    The agent sees a download fail, adjusts its wait strategy, and retries; or verification finds temporary files in the delivery directory and moves them out.

    This is feedback correction within a single task. It shows the agent can use execution results, but it does not mean the agent will proactively avoid the same problem next time.

    6.2 Cross-Task Experience Reuse

    The agent stores rules such as “separate the working area from the delivery area” and “read identity fields as text” as confirmed experience, and correctly applies them in later similar tasks.

    This can constitute continuous improvement in an engineering sense, but three conditions must hold: the experience was actually saved, later execution was actually affected, and the improvement did not introduce new errors.

    Experience updates also need a scope of applicability and version records. One task requiring case preservation for extensions does not mean every task should use the same rule. Unbounded experience can turn from help into interference.

    6.3 Capability Change at the Model Training Level

    Model parameters updated through training are a different mechanism from an agent saving notes, editing a program, or adjusting a task plan while running.

    An agent writing down “remember to clean the directory next time” is not evidence that the model itself has learned. Claiming a parameter-level capability change requires independent training and evaluation evidence.

    So without additional evidence, the more accurate description is “workflow improvement” or “experience reuse,” not a blanket claim of “autonomous evolution.”

    7. How to Verify Improvement Instead of Celebrating One Success

    A meaningful evaluation includes a first run, a run after feedback, and a transfer test.

    The first run surfaces baseline problems. The post-feedback run confirms whether the fix works. The transfer test uses new input to see whether the agent applies the correct rules without being reminded again.

    For example, if the first task polluted the delivery directory and cleanup succeeded after feedback, that only proves the agent responds to correction. If the next task—with a different record count, mixed extensions, and duplicate records—still leads the agent to isolate the working area on its own and handle conflicts correctly, that is much stronger evidence that the experience has reuse value.

    Recommended metrics:

    • Completion rate: successful records as a share of records that should be processed;
    • Naming compliance rate: share of files that follow the naming rules;
    • Content validity rate: share of files that pass the defined content checks;
    • Delivery purity: number of non-target files in the delivery directory;
    • Human intervention: number of corrections required, effort, and time spent;
    • Recoverability: whether the task can resume safely after an interruption or failure;
    • Improvement retention: whether the same class of problem reappears in later tasks.

    The reference material provides only limited execution observations. That is not enough to derive a general performance ranking, nor to assert that a given deployment approach will necessarily succeed or fail. A complete evaluation also needs a clear statement of the runtime environment, permission scope, network conditions, failure types, and repeated test results.

    8. Efficiency Gains Do Not Override Privacy Boundaries

    Face videos and ID numbers are highly sensitive business data. Even a perfectly correct download flow does not mean the handling meets an organization’s security requirements.

    Before execution, confirm data access authorization, the processing purpose, the retention period, and who receives the delivery. During execution, restrict directory permissions and avoid writing full identity information or credential-bearing addresses into ordinary logs. After the task, handle source data copies, caches, and temporary material according to the established rules.

    Putting names and ID numbers into filenames also makes sensitive information appear in directory listings, backup records, and shared screens. Where the business process allows it, internal handling should use controlled identifiers with the identity mapping stored separately; where delivery must follow the original rule, access control and flow constraints should be tightened instead.

    An agent’s improvement mechanism cannot bypass these boundaries either. Changing cleanup scope, expanding access permissions, or altering how long sensitive data is retained should go through review and be reversible.

    Conclusion: What Really Counts Is Verifiable, Constrained Improvement

    The batch download task illustrates a basic principle for assessing AI agent capability: successful execution is only the starting point. Correct verification, clean delivery, safe recovery, and experience transfer are what determine whether an agent can enter a real business process.

    “Self-iteration” should not stop at generating a program automatically or trying once more after a failure. A more reliable standard is whether the system can identify problems, form improvements with a clear scope, reuse them stably in later tasks, and prove through independent checks that it has not broken other requirements.

    For developers, rather than chasing an unverifiable “autonomous evolution,” it is better to first build task contracts, state management, verification mechanisms, and a controlled experience library. Turning improvement into a recordable, testable, reviewable engineering process is how the value of AI agents actually accumulates.