The Evolution of General AI Agents: From Task Execution to Controllable Self-Improvement
As general AI agents evolve rapidly, the focus shifts from simply demonstrating capabilities to establishing stable task execution loops. This article explores the architectural principles of reliable agent systems, including the separation of decision-making and execution, controllable self-improvement mechanisms, memory management, and tool invocation risk control. It also provides practical guidance on evaluation metrics and phased enterprise deployment strategies.
1. What Has Truly Changed with the Rapid Iteration of Agents?
The continuous emergence of general AI agents represents more than just updates in interaction and task capabilities; it signifies a fundamental shift in software organization. Previously, developers pre-orchestrated most business processes, with models handling recognition, generation, or judgment. Today, models participate in selecting execution paths, invoking tools, observing results, and adjusting plans to drive tasks toward their goals.
This does not mean traditional software engineering is obsolete. On the contrary, with models participating in decision-making, systems require even more explicit state management, permission boundaries, failure recovery, and quality verification mechanisms. An agent’s reliability is not judged by a single successful demo, but by whether it can maintain explainable behavior, verifiable results, and controllable risks when faced with incomplete inputs, tool anomalies, changing environments, and restricted permissions. Therefore, understanding this technological evolution requires a shift from “which system can better showcase its abilities” to “how to build a stable task execution loop.”
2. From Conversational Systems to Agents: The Execution Loop
A typical conversational system primarily outputs text. Even if it provides operational steps, the actual execution is usually left to the user. An agent, upon receiving authorization, can directly read materials, invoke business capabilities, generate intermediate results, and advance the task based on execution feedback.
A typical agent loop can be summarized as:
Goal Understanding → Task Planning → Tool Execution → Result Observation → State Update → Verification and Completion.
These stages do not strictly proceed linearly. If a tool returns an anomaly, the system may re-plan; if information is missing, it should ask the user; for high-risk operations, it should pause and request confirmation.
For example, if a user requests to “analyze recent support tickets and suggest improvements,” the agent should not immediately generate a seemingly complete conclusion. A logical process involves defining the statistical scope and classification criteria, reading authorized tickets, checking for duplicates and missing fields, completing the summary analysis, and finally presenting conclusions with their evidence sources.
The core difference here is not a longer response, but conclusions built upon real execution results.
However, not all tasks suit open-ended agents. For businesses with clear rules, fixed paths, and high error costs, deterministic processes are easier to test and audit. A more practical design solidifies stable steps while delegating segments requiring semantic understanding and dynamic selection to the model.
3. Production-Grade Architecture Must Separate Decision and Execution
A reliable agent system should not allow the model direct control over all resources. A more rational architecture separates model decision-making, tool execution, and security governance.
3.1 Task Entry: Translating Natural Language into Task Contracts
A task contract should at least describe the goal, input scope, allowed operations, delivery format, and acceptance criteria. “Organize customer data” is too vague. “Read authorized data in the specified directory, generate a summary table based on agreed fields, leave uncertain fields blank, and do not modify source files” is more executable.
The contract should also distinguish between hard constraints and preferences. Not deleting source data is a hard constraint; preferring concise output is a preference. In conflicts, the system must prioritize hard constraints rather than bypassing limits to complete the task.
3.2 Orchestration Layer: Managing State, Not Just Stitching Prompts
The orchestration layer records task progress, coordinates execution order, handles pauses and resumes, and decides when to end the task. Long tasks particularly require explicit state. Relying solely on an ever-growing conversational context to save progress easily leads to omissions, duplicate executions, or state confusion. Engineering-wise, information like “completed steps,” “pending confirmations,” “generated files,” and “failure reasons” should be saved as structured records.
For tasks with dependencies, a task graph can express the sequence. Independent read operations can execute in parallel, but writes to shared resources, dependent modifications, and irreversible operations cannot be simply parallelized.
3.3 Tool Layer: Providing Constrained Business Capabilities
Tools are not arbitrary execution entry points but encapsulated capability boundaries. Each tool should specify input formats, output structures, permission requirements, timeout behaviors, potential side effects, and error categories. For instance, querying records and modifying records should be exposed as different capabilities; obtaining read access should not implicitly grant write access. Parameters should be verified before execution, and return values checked after. The model’s generated invocation intent is merely a request, not an authorized instruction.
3.4 Verification Layer: Independently Checking Completion
A model claiming “task complete” does not mean the business goal is achieved. The verification layer should rely on checkable facts, such as whether files are generated, fields are complete, calculations are consistent, and data sources are traceable. For critical conclusions, rule validation or independent review can be added. Model review can supplement semantic judgment but should not replace permission checks, numerical verifications, or business rule validation.
4. “Self-Improvement” Must Be Decomposed into Verifiable Mechanisms
“Self-improvement” often evokes the idea of a system rewriting itself to become continuously stronger. In practical engineering, this concept requires layered discussion.
4.1 Intra-Task Adjustment: Changing Current Plans Based on Feedback
When an agent finds an execution path unviable and switches to another, this is intra-task adaptation. This typically does not involve changes to model parameters. The system merely uses observations from the current task to adjust decisions. While it improves execution flexibility, it can lead to infinite retries without budgets and termination conditions.
4.2 Cross-Task Memory: Reusing Confirmed Information
Systems can save user preferences, business terminology, and verified operational experiences, retrieving them as needed in subsequent tasks. This is memory enhancement, not equivalent to model training. Memory should include source, applicable scope, update time, and trust status. A temporary assumption in one task cannot become a long-term rule without confirmation; a specific user’s preference should not be misapplied to others.
4.3 Process Improvement: Adjusting Reusable Strategies
Systems can also summarize candidate processes from failure cases, such as adding data integrity checks before generating reports or filtering conditions before invoking high-cost capabilities. However, candidate strategies should not enter production directly. A rational approach involves saving the original version, comparing new and old strategies on a fixed test set to check for capability degradation or security risks, and then proceeding through approval and controlled release.
4.4 Model Updates: Requiring Independent Data and Training Pipelines
Changing model parameters requires an independent pipeline involving data filtering, privacy processing, training, evaluation, and deployment. One cannot claim a model has achieved continuous learning simply because the system saved experiences or modified prompt configurations. Therefore, controllable self-improvement is better understood as: continuously proposing, validating, and releasing improvements under explicit governance rules while retaining the ability to roll back.
5. Memory Systems: More Isn’t Always Better
Agent memory generally falls into three categories:
- Working memory: Serves the current task, recording recent observations and intermediate results.
- Task records: Save execution history for recovery, audit, and troubleshooting.
- Long-term knowledge: Stores confirmed, reusable business information or experiences.
These three types have different lifecycles and access policies and should not be mixed into an infinitely growing text repository. Working memory needs volume control to prevent irrelevant history from crowding the current decision space; task records should retain key evidence rather than just compressed conclusions; long-term knowledge needs update and deletion mechanisms to prevent stale information from affecting execution.
Retrieved information is not inherently trustworthy. Imperative text in documents or operational suggestions from external sources should be treated as data first and must not automatically gain control over the system. This is a critical boundary to prevent external content from interfering with agent behavior. In enterprise scenarios, memory must also comply with data isolation requirements. Visibility across different departments, projects, and users should be governed by access control, not by the model’s own judgment.
6. The Core Risk of Tool Invocation is Side Effects
A failed query can usually be retried, but operations like sending notifications, modifying records, or submitting approvals may have already taken effect. If a system judges failure solely by timeout and executes again, it may cause duplicate operations. Therefore, tools with side effects require explicit idempotency strategies. The system should record operation identifiers, execution status, and confirmation results, checking completion before retrying. In cases of uncertain results, manual review should be triggered rather than infinite retries.
Multi-dimensional budgets should be set for tasks, including execution time, invocation counts, resource consumption, and allowed retries. Budgets not only control costs but also prevent the system from continuously running in the wrong direction. High-risk operations can adopt a phased process: “generate proposal—manual confirmation—actual execution.” The confirmation content should display the operation target, specific changes, and potential impacts, rather than simply asking the user whether to continue. For partially failed tasks, predefined compensation strategies are necessary. However, compensation does not equal true rollback: once a notification is sent, the information acquired by the recipient usually cannot be erased. Therefore, the design phase must distinguish between reversible and irreversible operations.
7. Evaluation Cannot Just Count “Answers That Look Correct”
Agent evaluation should cover both result quality and execution process. Result quality includes whether the task is completed, whether conclusions are accurate, and whether deliverables meet agreements; the execution process includes whether there were privilege escalations, whether real evidence was used, whether unnecessary calls were made, and whether the system can recover from anomalies.
It is recommended to focus on the following metrics:
- Task completion rate: Judged by predefined acceptance criteria, not just model self-evaluation.
- Violations: Record unauthorized requests, dangerous executions, and boundary bypasses.
- Human intervention: Distinguish between normal approvals and interventions due to system inadequacy.
- Resource consumption: Track time and invocation costs per task, monitoring abnormally long tasks.
- Recovery capability: Observe whether the system can safely continue after tool timeouts, missing inputs, or interruptions.
- Result traceability: Whether key conclusions can be linked to inputs, tool outputs, and processing steps.
Test sets should not only contain ideal tasks but also situations like insufficient permissions, data conflicts, tool failures, expired memory, and malicious inputs. During version comparisons, test conditions should be fixed as much as possible. Otherwise, if models, prompts, tools, and data change simultaneously, it is difficult to determine where the improvement actually came from.
8. Enterprise Deployment Should Start with Narrow, Closed Loops
Building a general AI agent does not need to start with “handling all tasks.” A more prudent sequence is to select scenarios with clear boundaries, measurable benefits, and recoverable failures.
Phase One can be read-only, allowing the system to generate suggestions or drafts while humans complete the final operations. The focus here is to validate data understanding and result quality.
Phase Two opens up low-risk execution capabilities but restricts data scopes and operation types, refining logging, alerting, approval, and recovery mechanisms.
Phase Three gradually expands the scope of autonomous execution and adjusts permissions based on evaluation results, rather than granting long-term high privileges based on a single successful performance.
At the infrastructure level, depending on task needs, object storage can be used to save materials and deliverables, message queues to decouple long tasks, databases to manage state, and isolated runtime environments to execute restricted operations, supplemented by logging and monitoring to track anomalies. The selection of these components should serve the goals of recoverability, auditability, and isolation. The larger the deployment scale, the greater the need for unified identity management, configuration version control, and change approvals.
9. Long-Term Capabilities Developers Truly Need to Accumulate
Technological trends in the agent space will constantly change, but the core assets developers can consolidate remain relatively stable: clear business task contracts, reliable tool interfaces, reusable test sets, traceable execution records, and proven governance rules. When new models or execution strategies emerge, these assets help teams determine whether they actually improve business outcomes, rather than being attracted by new interaction effects and rebuilding the entire system.
Similarly, judging whether “self-improvement” is valuable should not depend solely on whether the system can generate reflective text, but on whether these reflections form effective improvements, are verified, can be safely released, and can roll back to older versions if degradation occurs.
The long-term direction of general AI agents is to connect language understanding with business execution. However, moving from being able to plan to being able to deliver, and from being able to try to being trustworthy, requires solid software engineering. A truly mature system not only knows what it can do next, but also knows which operations it must not perform, which results remain unconfirmed, and when it should stop and ask for help.
