AI Agent Architecture Evolution: From Tool Orchestration to Experience Accumulation

    This article explains how AI agents can evolve from one-time task executors into manageable, auditable, and portable long-term systems. It compares tool orchestration with experience accumulation, analyzes cost drivers, describes memory layers and governance requirements, outlines security controls, provides architecture selection guidance, and proposes evaluation metrics and a phased implementation path.

    1. What Is Really Being Compared in the AI Agent Architecture Debate?

    When an AI assistant moves from answering questions to executing tasks, the evaluation criteria change. Connecting to tools, processing files, and calling business APIs only proves that a system has execution capability. Whether it can reduce repeated communication, maintain permission boundaries, and complete tasks reliably over time determines whether it deserves long-term investment.

    Therefore, instead of asking which architecture can “beat” another, it is more useful to distinguish two design priorities:

    • One focuses on tool integration and task orchestration. It converts user intent into multiple execution steps and coordinates different tools to complete work.
    • The other focuses on experience accumulation and reuse. It aims to preserve user preferences, task constraints, effective workflows, and lessons from failures for future tasks.

    These capabilities are not mutually exclusive. Orchestration answers “how to do it now,” while memory and skill accumulation answer “how to avoid detours later.” Mature systems usually need both, although different applications allocate resources differently.

    Temporary queries and one-off data organization may not require complex long-term memory. Tasks such as continuously processing project materials, generating recurring reports, or supporting team collaboration depend more on stable context management and experience reuse.

    The real question is how to evolve an agent from a one-time executor into a long-term work system that can be managed, audited, and migrated.

    2. Why Does Tool Orchestration Often Create Cost Pressure?

    A typical agent execution flow can be abstracted as:

    User request → intent understanding → plan creation → tool selection → operation execution → result checking → response output.

    When a task involves multiple systems, this process may repeat. For example, generating a business report may require reading data, performing calculations, checking anomalies, and finally organizing the text.

    Each model call may carry system rules, tool descriptions, conversation history, execution plans, and tool outputs. If a system always places large amounts of material into the context, the same information may be processed repeatedly.

    However, this does not mean that a gateway-style design is inherently expensive. Gateways mainly handle entry, routing, and control. Actual consumption depends on model invocation strategy, context organization, tool output size, and the number of loops. Attributing all cost problems to an architecture label can hide the real optimization targets.

    1. Costs Should Be Calculated per Complete Task

    A cheap single call does not mean the whole task is cheap. A workflow that requires multiple retries may be more expensive than a workflow with a higher single-call price but a more stable success rate.

    A general relationship can help explain total cost:

    Total task cost = model invocation cost + tool execution cost + storage and retrieval cost + retry cost + human intervention cost.

    Billing methods differ across services. Actual calculation should be based on real bills and execution records. In particular, it is important to avoid counting only input and output tokens while ignoring the time humans spend fixing errors.

    A more meaningful business metric is the average cost per successful task. Success must have clear criteria, such as complete data, conclusions that meet requirements, or operations that are authorized. It should not be based only on the model claiming that it has finished.

    2. Optimization Should Start by Reducing Ineffective Information

    Common measures include:

    • Providing tool descriptions dynamically based on the task instead of loading all tool instructions.
    • Filtering and aggregating large tool outputs before asking the model to interpret them.
    • Setting limits on the number of execution loops, time, and budget.
    • Using ordinary programs for deterministic calculations instead of making the model perform unnecessary reasoning.
    • Caching stable information that is read repeatedly, while defining clear expiration conditions.
    • Retrieving historical information on demand instead of accumulating the full conversation history indefinitely.

    History summarization also has a cost: it may lose key constraints. Therefore, task goals, permission limits, and acceptance criteria should be stored separately and should not rely entirely on compressed natural-language summaries.

    3. Long-Term Memory Is Not “Saving All Chat Records”

    Chat records are only raw material. Useful memory should be retrievable, interpretable, updatable, and deletable. It should also know who it applies to, which task it applies to, and which time range it covers.

    For example, “the user prefers concise output” may be a long-term preference, while “this report requires detailed explanation” is a current task requirement. If a system confuses the two, it may use historical preferences to override explicit instructions.

    Memory can be divided into four layers.

    1. Working Memory: Serving the Current Task

    Working memory stores the current goal, step status, intermediate results, and items awaiting confirmation. It is mainly used to maintain task continuity.

    It usually should not automatically become long-term knowledge. A temporary failure, an unverified assumption, or an unapproved operation is not suitable for direct writing into persistent memory.

    2. User and Organization Preferences: Reducing Repeated Communication

    This type of memory includes output formats, terminology habits, language preferences, and confirmed working conventions.

    Preferences must have scope. Personal habits should not automatically become team standards, and requirements from one project should not be applied to all projects. Explicit current instructions should take priority over general historical preferences. Rules involving security and permissions should not be overridden by ordinary preferences.

    3. Task Experience: Storing Verifiable Facts

    Task experience can record what workflow was used for a certain type of task, what problems occurred, and whether the result passed acceptance.

    Its value is not to make the system “remember what it did,” but to provide sourced references for later decisions. One success does not prove that a workflow is universally effective. The system should still check whether data scope, environment, and business rules have changed.

    4. Procedural Skills: Accumulating Reusable Methods

    A skill is not only prompt text. It can also be a workflow with applicable conditions, execution steps, validation rules, and stopping conditions.

    For example, a recurring report skill should specify data sources, statistical definitions, anomaly handling methods, output structure, and acceptance requirements. Without these boundaries, even an executable skill is difficult to reuse safely.

    4. How Can Experience Become a Manageable Asset?

    “Saving something” is not the same as “forming an asset.” Only information with quality control, ownership boundaries, version management, and migration capability is suitable for long-term accumulation.

    A memory entry should contain at least:

    • Content: what information is stored.
    • Type: preference, fact, task experience, or process rule.
    • Source: user confirmation, business material, or execution record.
    • Scope: personal, project, team, or organization.
    • Time: when it was created, when it was verified, and whether it has expired.
    • Status: pending confirmation, active, replaced, or deleted.
    • Sensitivity level: whether it involves privacy, confidential data, or restricted data.

    If a system uses confidence scores, their source should also be clear. A high confidence score generated by the model itself does not mean the fact has been verified.

    1. Pre-Write Checks

    Not every interaction is worth writing into memory. The system should determine whether the information has reuse value, whether it has been confirmed, whether it contains sensitive content, and whether it conflicts with existing memory.

    For explicit statements such as “I want to use this format from now on,” the system can record the preference under appropriate permissions. For habits inferred from a single behavior, a safer approach is to wait for confirmation or keep them only as short-term candidates.

    2. Pre-Use Verification

    Long-term memory should not become an instruction source that overrides current facts. After retrieval, the system needs to check scope, validity period, and source. If necessary, it should query the business system again.

    Information that changes easily, such as amounts, addresses, permissions, and contract status, should rely first on authoritative data sources rather than historical memory.

    3. Updating and Deleting Are Equally Important

    The system should support correction, revocation, and change tracking. Deletion may involve not only the main store but also retrieval indexes, caches, summaries, and copies in backups. The applicable policy should define the processing scope.

    A memory system without a forgetting mechanism can easily become a pile of outdated information.

    5. What Security Issues Does Long-Term Memory Introduce?

    The more tools an agent connects to and the longer it retains information, the larger the potential risk surface. Security cannot rely only on adding passwords during deployment, nor only on the model “understanding the rules.”

    1. Tool Permissions Must Be Controlled by the Execution Layer

    Reading materials is not the same level of operation as sending messages, modifying records, or deleting files.

    Systems should follow the principle of least privilege and provide different permissions for different tasks. High-impact operations should use human confirmation, explicit authorization, or staged execution. The model can propose actions, but it cannot expand permissions by itself.

    2. External Content Must Not Automatically Become System Instructions

    Documents, web pages, emails, or tool outputs may contain misleading text. Agents must distinguish user-authorized goals from instructions in external material.

    Likewise, external text should not gain a higher trust level simply because it is written into memory. Otherwise, one untrusted input may affect multiple later tasks and create persistent memory pollution.

    3. Credentials Do Not Belong in Ordinary Memory

    Access credentials should be managed by dedicated security mechanisms. They should not enter prompt context, long-term memory, or skill documents as ordinary text.

    Memory may retain a description such as “this task requires a certain type of authorization,” but it should not store the authorization secret itself.

    4. Multi-User Environments Require Isolation

    Personal preferences, project materials, and organizational knowledge must be isolated by identity and permission. During retrieval, the system must check not only whether content is relevant, but also whether the current user has permission to read it.

    Audit records should cover tool calls, memory writes, access to sensitive information, and permission changes. At the same time, logs themselves should avoid exposing full sensitive content.

    6. How Should the Right Architecture Be Selected?

    Architecture selection should start from task characteristics, not from the number of features.

    Scenario 1: Low-Frequency, One-Time Tasks

    Prioritize simple orchestration, limited context, and clear acceptance mechanisms. Long-term memory can retain only a small number of user-confirmed preferences to avoid unnecessary governance costs.

    Scenario 2: High-Frequency, Repetitive Tasks

    It is suitable to build stable workflows and a controlled experience base. The focus is not on making the agent replan every time, but on reusing verified steps and entering more complex reasoning only when inputs are abnormal or rules change.

    Scenario 3: Cross-Team Tasks Involving Sensitive Data

    Prioritize identity authentication, permission isolation, data retention policies, auditing, and human approval before expanding autonomous execution.

    In these scenarios, “remembering more” does not necessarily mean “performing better.” It is more important to remember only necessary information and use it only within authorized scope.

    Scenario 4: Open Tasks with Frequently Changing Environments

    Flexible planning capability should be retained, but tool invocation boundaries, stopping conditions, and failure fallbacks should be set. Experience can assist planning but cannot replace real-time checks.

    Overall, a sustainable combination is usually: tool orchestration handles execution, memory provides context, skills carry stable workflows, and the governance layer enforces permissions and quality constraints.

    7. How Can We Verify That Memory and Skills Actually Deliver Benefits?

    Judgments should not be based only on demo results. A fixed task set should be established to compare performance before and after introducing memory and skills.

    At least the following metrics should be considered:

    • Task success rate: whether predefined acceptance conditions are met.
    • Average cost per successful task: total input required to complete a qualified result.
    • Completion latency: actual time from request to usable result.
    • Number of human interventions: how many times users need to correct, supplement, or approve.
    • Effective memory usage rate: whether retrieved information truly helps complete the task.
    • Outdated information misuse rate: whether old information causes wrong decisions.
    • Repeated error rate: whether recorded failures occur again.
    • Permission violation rate: whether unauthorized reading or execution occurs.

    Evaluation should include cases such as conflicting old and new preferences, expired materials, malicious external text, tool failures, and insufficient permissions. Testing only smoothly completed tasks cannot reflect reliability during long-term operation.

    8. Migration Capability Is an Important Test of Asset Value

    When changing devices or runtime environments, exporting configuration alone does not guarantee complete migration. Three types of objects need to be distinguished:

    • Runtime configuration: model selection, tool connection methods, and budget policies.
    • Knowledge and experience: confirmed preferences, task experience, skill versions, and source information.
    • Security authorization: identity, access scope, and credentials. Security authorization usually needs to be reconfigured or verified in the new environment. It cannot be assumed that copying configuration allows continued use.

    Migration acceptance should check whether memory is complete, whether scope is preserved, whether expired information is still filtered, whether skills depend on old environment paths, and whether permissions meet new environment requirements.

    Retrieval indexes can be rebuilt from migrated data. Business sources and version records should not be lost. Encrypting memory backups also does not mean access control and deletion requirements can be ignored.

    Phase 1: Connect a small number of high-value tasks first. Establish task records, cost statistics, and result acceptance. Do not rush to enable long-term automatic learning.

    Phase 2: Introduce controlled memory. Store only explicit preferences and verified facts. Provide entry points for viewing, modifying, and deleting memory.

    Phase 3: Turn high-frequency successful workflows into versioned skills. Add preconditions, validation steps, failure exits, and necessary approvals.

    Phase 4: Expand coverage with support from evaluation data. At the same time, improve migration, security auditing, and fallback mechanisms.

    Each phase should answer three questions: Did the new capability improve the success rate? Is the total cost controllable? When errors occur, can they be located and recovered? If the answers are unclear, expansion should not continue merely to increase “autonomy.”

    Conclusion: Long-Term Value Comes from Verifiable Accumulation

    Tool orchestration and experience accumulation are not replacements for each other. They are two layers of agent capability. Without execution capability, memory is hard to turn into results. Without governance capability, long-term memory may amplify errors, leaks, and maintenance costs.

    An agent worth building is not the system that calls the most tools or stores the longest history. It is the system that can complete tasks at reasonable cost, turn effective experience into controlled workflows, and allow users to verify, correct, delete, and migrate accumulated assets.

    Whether an architecture is advanced should ultimately be judged by a simple standard: does it make the next task more reliable and less labor-intensive without sacrificing security and controllability?