Can AI Agents Improve Themselves? From Batch Tasks to a Controlled Engineering Loop
Successful task execution does not prove that an AI agent can continuously improve. Using a 176-video batch download task as a reference, this article examines input validation, reliable downloads, delivery checks, persistent experience, regression testing, and privacy controls. It explains how evidence-based feedback can improve an agent’s workflow without changing the underlying model—and how to evaluate whether those improvements are reliable.
1. Completing a Task and Improving Over Time Are Different Problems
An AI agent’s ability to become more effective with use cannot be established by a single successful task.
In batch file processing, an agent may interpret natural-language instructions, create an execution plan, call tools, and inspect results. These actions demonstrate task orchestration and automated execution. Continuous improvement requires more: the system must identify problems from execution feedback, turn them into reusable rules, and apply those rules in later tasks with verified results.
Three concepts are often confused:
- In-context correction: The agent changes its approach after receiving an error during the current task.
- Persistent experience updates: Validated rules are saved and retrieved for future tasks.
- Model parameter updates: Training changes the model’s underlying parameters, requiring dedicated data, training, and evaluation processes.
The first two do not necessarily involve training or changes to the model’s underlying capabilities. The more precise question is therefore not whether an agent can “evolve automatically,” but whether it can continuously improve its task execution workflow within explicit permissions, reliable feedback, and quality constraints.
2. What a 176-Video Task Reveals About Automation
The reference task involved processing a spreadsheet of identity-verification records, downloading files with valid video URLs, and saving them using the pattern name-ID_number.original_extension. There were 176 videos to process, with filename extensions that differed in letter case.
At first glance, this looks like a straightforward batch download. In practice, reliability depends less on the download operation itself than on input interpretation, exception handling, and delivery boundaries.
Define Which Records Are Valid Tasks
The spreadsheet’s total row count is not necessarily the number of files to download. Empty URLs, duplicate records, malformed data, and missing names or ID numbers can all change the processing scope.
Before execution, perform a preflight check:
- Confirm the field mapping for names, ID numbers, and video URLs.
- Count records with nonempty URLs.
- Check that all fields required for naming are present.
- Identify duplicate records and potential filename collisions.
- Put records that cannot be handled automatically on a list for review.
The target file count should come from these checks, not from the agent guessing based on the task description. The figure of 176 describes this case; it is not a reusable constant for other tasks.
Treat Identity Numbers as Text
Identity fields are identifiers, not quantities. Type conversion during import can remove leading zeros or introduce scientific notation, producing incorrect filenames.
Names, phone numbers, and ID numbers should therefore be read as text, with unnecessary type conversions avoided throughout processing. Whitespace also needs careful handling: accidental leading or trailing spaces are different from meaningful spaces within a value. Removing every whitespace character indiscriminately is unsafe.
Extract Extensions from the URL Path
Video URLs may contain query parameters, access signatures, or temporary tokens. Splitting the entire URL at its last period can mistakenly treat part of a parameter as the extension.
A safer approach is to parse the URL, extract its path, and obtain the extension from the filename at the end of that path. Preserve the original letter case: if the path ends in .MOV, the saved file should not be normalized to .mov.
However, a correct extension does not prove that the content is a video. An expired URL may return an error page that is still saved with a video suffix. Content validation is therefore essential.
3. Delivery Quality Is More Than a Correct File Count
The reference material indicates that all 176 videos could be downloaded with the required filenames and extensions. Yet scripts or copies of source data left in the destination directory could still reduce delivery quality.
The general engineering lesson is not that one tool is better than another. It is that working files and deliverable files should be kept separate.
Give Each Directory a Clear Role
A task directory can be divided into three areas:
- Input area: Stores original data and should normally be read-only.
- Workspace: Stores execution scripts, temporary downloads, state records, and diagnostic information.
- Delivery area: Contains only validated final files that meet the agreed requirements.
This separation reduces the risk of deleting source files, overwriting original data, or mixing debugging artifacts with deliverables.
A clean delivery directory should not depend on an improvised cleanup at the end. Downloads should first enter the workspace and move to the delivery area only after validation. The final directory then accepts qualified outputs from the outset.
Translate Natural-Language Requirements into Acceptance Criteria
“Download complete” should be broken down into checkable conditions:
- Every valid record has an explicit processing outcome.
- Each successful outcome corresponds to a file that actually exists.
- Filenames match the expected values.
- Extension capitalization matches the original URL path.
- File contents are neither empty nor obvious error responses.
- The delivery area contains no unapproved extra files.
When moving temporary files, an atomic rename can reduce the risk of other programs reading incomplete outputs, provided the move occurs within the same filesystem and the underlying system supports it. Cross-filesystem moves require additional handling and should not be assumed to offer the same atomicity.
4. Reliable Downloads Require State Management
Generating a download loop is relatively easy. Keeping it recoverable through network instability, expired links, and execution interruptions is harder.
Use an Interpretable State Machine
Each record can move through the following states:
Pending → Downloading → Download Complete → Validated → Delivered
Exception states can include:
- Retryable failure
- Non-retryable failure
- Filename collision
- Awaiting human review
Each state must have a precise meaning. “Download Complete” means only that data transfer has ended. “Validated” means the file meets the defined checks. “Delivered” means it has entered the final directory.
Failure reasons should be recorded in a structured form rather than reduced to a generic “download failed” message. This supports both manual troubleshooting and evidence-based strategy changes.
Put Limits on Retries
Timeouts and interrupted connections can often be retried a limited number of times. Insufficient permissions, expired URLs, and missing resources may instead require corrected inputs or human intervention.
Retries should have a maximum attempt count, a backoff policy, and a reasonable request rate. Increasing concurrency indiscriminately can trigger access restrictions and reduce overall success.
Resumable downloads require confirmation that the remote server supports the necessary requests, along with verification that the resource has not changed between attempts. The presence of a partial local file does not establish that resuming is safe.
Make Repeated Execution Predictable
Batch tasks often need to be rerun. A robust workflow should be idempotent: executing it repeatedly with the same input should neither create unnecessary duplicates nor overwrite already validated results.
This requires a task manifest and state records. Before rerunning, check:
- Whether existing files pass validation.
- Whether the current record refers to the same target.
- Whether unfinished temporary files remain.
- Whether the target filename conflicts with another record.
If two records produce the same filename, stop any overwrite operation and report the conflict. If the naming requirements do not permit adding a sequence number, the agent should not change the naming convention on its own.
5. Building a Verifiable Improvement Loop
“Execute, inspect, correct” can create a feedback loop within one task. Continuous improvement also requires deciding which experiences deserve to be saved and whether they can be reused across tasks.
Use Evidence Instead of Self-Assessment
An agent’s statement that “everything is complete” is not acceptance evidence. Reliable feedback should come from file inventories, state records, and independent validation results.
Feedback can be organized into three levels:
- Outcome feedback: Missing files, naming accuracy, and content validity.
- Process feedback: Retry counts, failure categories, recovery behavior, and resource consumption.
- Delivery feedback: Directory compliance, manual remediation, and exposure of sensitive information.
Only observable feedback allows the system to determine whether a change actually improved the result.
Turn Failures into Rules, Not Memories of Individual Cases
If execution files are found in the delivery directory, the reusable lesson is not “delete this particular file next time.” It is:
All execution-support artifacts belong in the workspace. The delivery area accepts only target files that have passed acceptance checks.
Likewise, an extension-parsing error should become a rule to extract extensions from URL paths while excluding query parameters—not a memory of one specific URL.
Saved experience should include its scope, rationale, and validation history. Otherwise, a temporary workaround from one task may be incorrectly promoted into a general policy.
Require Regression Testing After Changes
Every workflow change should be tested against records covering key edge cases, including:
- Empty URLs
- Missing naming fields
- URLs with query parameters
- Extensions with different capitalization
- Duplicate target filenames
- Interrupted downloads
- Error pages returned instead of videos
- Unrelated files in the delivery directory
A revised workflow must do more than fix the latest issue. It must preserve behavior that was already correct. Failed updates should be reversible rather than allowing unverified policies to remain active permanently.
6. Privacy Is Part of Task Design
Tasks involving names, phone numbers, ID numbers, and facial videos should not be treated like ordinary public-content processing. These records require protection under applicable laws, authorization scopes, and organizational policies.
First, establish the processing purpose, access permissions, and retention period. Fields that the task does not need should not enter the execution context, and full personal records should not be written to logs.
Second, filenames themselves can expose sensitive information. A name-ID_number convention may simplify manual checks, but it can reveal identities through directory listings, screenshots, and shared records. Where business requirements allow, internal identifiers with a separately controlled mapping table are preferable. If the original naming convention is mandatory, directory access and delivery scope should be restricted.
Finally, define explicit operating boundaries for the agent:
- Do not send source data to unapproved external environments.
- Do not log complete URLs containing access tokens.
- Do not expand file read or write permissions arbitrarily.
- Do not delete input data without confirmation.
- Do not retain personal information as long-term, general-purpose experience.
An agent may retain rules about how to process data. It should not automatically retain information about whose data it processed.
7. How to Tell Whether an Agent Has Become More Reliable
One small-scale task cannot establish a general advantage, nor can it prove that a particular deployment approach will always succeed or fail. Model capabilities, instructions, runtime environments, tool permissions, and network conditions all affect outcomes.
Evaluation should use the same inputs, permissions, and acceptance rules across repeated tests. At minimum, measure:
- Coverage of valid records
- Filename and extension accuracy
- Content validation pass rate
- Delivery-area compliance rate
- Recovery after interruption
- Number of human interventions
- Total execution cost and elapsed time
- Security violations
Cost should include more than model usage fees. Runtime resources, network transfer, storage, and human review also matter. A one-time cost reported in the reference material should not be extrapolated directly to other environments.
Evidence of workflow improvement exists only when saved experience consistently reduces errors and manual intervention in similar tasks without compromising safety.
Conclusion: Self-Improvement Means Controlled Change
Batch downloading illustrates a central challenge in agent engineering: generating execution code is not the hardest part. Defining completion, handling exceptions, validating results, and maintaining delivery boundaries are harder.
Agents can become more reliable through feedback-driven workflow changes. That does not mean they autonomously alter the underlying model, nor does it justify unrestricted changes to their behavior.
The goal is not a black box that claims to “evolve.” It is an evidence-producing system with explicit execution states, verifiable results, scoped experience, regression-tested changes, and rollback when updates fail. With those elements connected into a controlled loop, an agent can move from occasional task success toward stable, auditable, and continuously improving automation.
