Experience-Accumulating AI Agents: From Task Execution to Continuous Improvement
This article explores the evolution of AI agents from simple task execution to systems capable of continuous improvement through experience accumulation. It distinguishes between context, memory, and skills, and outlines a five-step process for refining successful task executions into reusable skills. Furthermore, it covers feedback mechanisms, skill library governance, engineering architecture, security boundaries, and metrics for evaluating an agent's long-term effectiveness, providing a practical guide for building reliable and auditable AI agent systems.
1. Understanding AI Agents: Starting with “Can It Deliver Results?”
When discussing AI agents, people often focus on model size, API call volumes, or the popularity of a specific application. However, these metrics do not directly answer the core questions enterprise users care about: Can it complete tasks reliably? Does it require constant guidance? Can it recover safely from errors?
Standard conversational systems primarily generate responses based on input. Agents, however, introduce goal understanding, task planning, tool calling, state management, and result verification, enabling the system to execute multi-step operations toward a specific objective.
For example, “help me compile yesterday’s industry updates” is not a task achievable in a single text generation. A functional agent typically needs to:
- Confirm the topics of interest, time range, and information sources;
- Access authorized materials;
- Remove duplicates and distinguish between facts, commentary, and unverified information;
- Filter key points based on user focus;
- Generate a briefing with source citations;
- Verify that the content matches the requested time range;
- Send or save the results within authorized boundaries.
Therefore, an agent should be understood as a goal-oriented execution system, not merely a “chat assistant with longer responses.”
However, completing a task is only the first tier of capability. A more worthwhile question is: After completing a task once, can it reduce the repetitive labor required for subsequent executions?
2. The Essence of Continuous Improvement: Accumulating Experience, Not Changing the Model
“Becoming more proficient with use” might suggest that the model automatically trains after each conversation to permanently acquire new knowledge. In actual engineering, this is rarely the primary implementation method for continuously improving agents.
A more common approach is to build an updatable memory and skill system external to the model. The model handles understanding, reasoning, and generation; the external system stores preferences, task experiences, execution logs, and verified operational methods.
This means we need to distinguish between three concepts.
1. Context: Temporary Information Supporting the Current Task
Context includes the current goal, recent conversations, tool execution results, and intermediate states. It primarily serves the task currently being executed.
As a task extends, the context can become massive, requiring the retention of important information through summarization, state snapshots, and structured records. However, summaries may lose details and should not be treated as a substitute for raw evidence.
2. Memory: Facts and Preferences Retained Across Tasks
Memory stores stable information, such as the user’s preferred report format, business term definitions, and confirmed project backgrounds.
Memory should not be written simply because “the model thinks it’s important.” The system should record the information source, confirmation time, applicable scope, and expiration date. When dealing with sensitive information, explicit access control and deletion mechanisms are required.
3. Skills: Reusable Task Methods
A skill is not simply saving a chat log; it is organizing a successful experience into a retrievable, executable, and verifiable method.
For example, an “industry briefing generation” skill might include material filtering principles, deduplication methods, output structures, quality checklists, and how to handle insufficient materials.
Without changing model parameters, the system can reduce repetitive exploration by retrieving more appropriate memories and skills. This is the actual source of many continuous improvement mechanisms.
3. From a Successful Execution to a Reusable Skill
A successful task execution does not mean the entire process is worth retaining. A single result might depend on accidental conditions or include unnecessary steps. Directly copying all operations can easily solidify inefficient behaviors or even errors.
A more reliable skill codification process can be divided into five steps.
Step 1: Record Process and Evidence
The execution trace should cover the task goal, tools used, key inputs, result verification, and failure reasons. Sensitive content in logs involving credentials, personal information, or trade secrets should be desensitized according to rules.
Saving only the final answer is insufficient, as it cannot explain how the result was produced and is not conducive to post-mortem review.
Step 2: Filter Reusable Experience
Tasks suitable for codification usually possess a degree of repetitiveness and have relatively clear goals and acceptance criteria. Examples include weekly reports with fixed formats, periodic data checks, and document archiving.
Highly sporadic operations that rely on temporary context or are unverified should not be directly upgraded to general skills.
Step 3: Abstract Methods, Strip Incidental Details
Skills should retain transferable steps rather than hardcoding specific objects from a particular task.
For example, you should codify “compare current content with historical snapshots to identify new additions and substantive modifications,” rather than “check the third paragraph of a specific page.” The latter easily fails when the page structure changes.
Step 4: Complete Boundaries and Failure Handling
A skill should at least specify:
- What tasks it applies to;
- What inputs and permissions are required;
- Under what circumstances it should not be used;
- How to determine successful execution;
- How to retry, degrade, or hand off to a human on failure;
- Which actions must wait for user confirmation.
Without these constraints, a so-called skill is merely an instruction manual that looks complete but cannot be reliably executed.
Step 5: Verify, Publish, and Version
New skills should first pass historical case replay or isolated environment testing before entering the production environment. Modified skills also require re-verification and the ability to roll back.
Below is an illustrative skill description structure, not representing any specific system interface:
Skill Name: Periodic Information BriefingApplicable Scope: Periodic information compilation from authorized sourcesInputs: Topic, time interval, source scope, output requirementsExecution Steps: Retrieve materials -> Deduplicate -> Categorize -> Summarize -> VerifyAcceptance Criteria: Accurate timing, traceable key conclusions, no obvious duplicationFailure Handling: Flag missing sources, do not infer missing contentPermission Limits: Default to draft generation only, external sending requires separate authorizationVersion History: Modification reason, verification result, release time
4. Feedback Loops Cannot Rely on “Guessing User Dissatisfaction”
Agents cannot reliably determine a user’s true intent from silence or vague expressions. Using “it will sense your dissatisfaction and automatically adjust” as a design premise easily leads to incorrect memories and preference drift.
Feedback should be converted into explicit, trackable signals as much as possible.
1. Explicit Feedback
Users can directly point out “reduce background introduction,” “keep original sources,” or “do not treat commentary as fact.” This type of feedback is best suited for revising output rules.
However, a single request might only apply to the current task. The system should distinguish between temporary instructions and long-term preferences, asking whether to save them when necessary.
2. Objective Verification Signals
For structured tasks, you can check whether fields are complete, values match, files are generated, and duplicates are eliminated.
Objective verification is usually more reliable than the model’s self-evaluation, but it also has boundaries: correct format does not mean correct conclusion, and completed operation does not mean achieved business goal.
3. Human Review and Exception Feedback
High-risk businesses should retain human review. Human revisions can help locate whether a problem stems from material quality, planning errors, tool failures, or unreasonable skill rules.
You cannot attribute all failures to prompts, nor should you let the system unconditionally rewrite skills after every failure. Otherwise, the skill library may constantly oscillate, where one fix breaks another scenario.
5. Skill Libraries Require Governance, Not Infinite Accumulation
As usage time increases, the skill library may experience duplication, conflicts, expiration, and retrieval difficulties. A large number of skills does not necessarily mean strong capability.
A periodic maintenance mechanism can be established, but maintenance itself should also be governed by rules rather than letting the model arbitrarily delete and merge.
Duplicate Governance
Multiple skills might solve similar problems but with different permission requirements or applicable scopes. Before merging, confirm whether they are truly equivalent to avoid losing special boundary conditions.
Expiry Governance
Business processes, data structures, and access methods can all change. Skills should record their last verification time and trigger a re-inspection when dependencies change or after consecutive failures.
Conflict Governance
When multiple skills provide different rules for the same task, priority should be clear. For example, current user instructions should generally override general output preferences but should not override system security constraints.
Archiving and Rollback
Long-unused skills can be archived, and skills with obvious risks should be suspended. Deletion, merging, and replacement should all retain audit records to track changes and restore historical versions.
6. Three Suitable Scenarios for Getting Started
Scenario 1: Periodic Information Briefings
This type of task is highly repetitive and easy to manually check, making it suitable for a pilot.
The system can gradually codify topic classification, material deduplication, summary formatting, and source verification methods. Special attention is needed: collection failure does not mean there is no information for the day; the system should explicitly disclose the coverage scope and missing sources.
Scenario 2: Public Information Change Monitoring
Regular checks on authorized pages or documents can adopt a “retrieve snapshot - identify changes - assess impact - generate notification” workflow.
The real challenge is not just finding text changes, but filtering out irrelevant modifications like navigation adjustments or time updates. Agents can assist in explaining changes, but important judgments should retain original snippets and time records to avoid sending unverifiable conclusions.
Scenario 3: Internal Reports and Process Assistance
Weekly report compilation, document archiving, inbox classification, and research summarization can all leverage historical templates and experience to reduce repetitive work.
However, “generating suggestions” and “executing operations” should be separate. Actions like deleting files, sending external emails, modifying business records, or incurring costs require stricter permission checks and confirmation mechanisms.
Especially for tasks like bookings or payments, the system cannot assume authorization for the next execution simply because it succeeded once before.
7. Engineering Architecture: Separating Reasoning, Execution, and Governance
A maintainable solution can be divided into the following layers:
Interaction Layer: Responsible for receiving goals, displaying progress, and collecting confirmations and feedback.
Orchestration Layer: Responsible for splitting tasks, managing states, arranging execution sequences, and handling timeouts, interruptions, and recoveries.
Tool Execution Layer: Responsible for accessing data and executing operations. It should restrict permissions, control resource consumption, and isolate untrusted inputs.
Memory and Skill Layer: Responsible for saving, retrieving, and updating experiences, ensuring access isolation between different users and business scopes.
Verification Layer: Responsible for checking whether results meet task requirements. For key conclusions, rule checks, source verification, and human review should be combined whenever possible.
Governance Layer: Responsible for permissions, auditing, version management, monitoring alerts, and sensitive information protection.
If elastic operation is needed, container platforms can be used to host execution tasks, message queues to schedule asynchronous work, object storage to save material snapshots, and logging services with monitoring alerts to locate anomalies. These infrastructure components solve operational and management issues but cannot replace business acceptance and security design.
8. Continuous Improvement Must Prevent “Errors Being Remembered”
Long-term memory and skill updates introduce new attack surfaces. External materials may contain prompt injection instructions. If the system treats this content as operational rules and even writes it into long-term memory, the risk spreads from a single task to subsequent executions.
Therefore, it is necessary to distinguish between trusted instructions and data to be analyzed:
- External pages, emails, and documents are by default data and cannot be self-elevated to system rules;
- Sensitive credentials should not enter general skills or broadly retrievable memory;
- Skill updates should pass source inspection and verification;
- Tool permissions should follow the principle of least privilege;
- High-risk actions should be re-confirmed before execution;
- Memories of different users should be strictly isolated.
Continuous improvement is not about relaxing controls, but about improving reuse efficiency within a controlled scope.
9. How to Prove It “Gets Better with Use”
Effectiveness cannot be judged solely by usage frequency, generated content length, or skill library size. It is more valuable to observe under the same task conditions:
- Task Success Rate: Whether the goal is achieved according to acceptance criteria;
- Human Intervention Frequency: Whether repetitive explanations and corrections are reduced;
- Execution Cost: Whether model calls, tool calls, and time consumption are reasonable;
- Reuse Effectiveness: Whether calling an existing skill is more stable than re-planning from scratch;
- Error Recurrence Rate: Whether previously fixed issues reappear;
- Security Boundary Performance: Whether unauthorized access, erroneous sending, or sensitive information leakage occurs.
Evaluation should include familiar tasks, similar tasks, and inapplicable tasks. A mature agent must not only know when to reuse skills but also when to refuse applying old methods.
10. Implementation Advice: Start with an Auditable Closed Loop
In practice, there is no need to pursue a “digital colleague” covering all work from the start. A more rational sequence is to select a low-risk, highly repetitive task with clear acceptance criteria, establish a reliable process first, and then gradually introduce experience accumulation.
It is recommended to advance along the following path:
- First define the goal, input scope, and acceptance criteria;
- Establish execution logs and source records;
- Use human-reviewed skills to handle repetitive tasks;
- Set scopes, deadlines, and deletion mechanisms for memory;
- Include skill modifications in testing and version management;
- Decide whether to expand autonomous execution permissions based on actual results.
The long-term value of an agent lies not in claiming “no guidance needed,” but in making guidance accumulable, reusable, and verifiable. It still requires clear goals, reliable tools, and permission boundaries, but it does not need to relearn the same workflow in every task.
When experience can be structurally saved, feedback can be transformed into controlled improvements, and execution results can be independently verified, an agent has the opportunity to evolve from a one-time task assistant into a stable, maintainable working system.
