Two Paths for AI Agents: Instruction-Driven Execution vs. Experience-Driven Evolution
AI agents have evolved from conversational tools into systems that can call tools, operate files, and run scheduled tasks. This article compares two fundamental design approaches—instruction-driven agents whose capabilities are predefined by developers, and experience-driven agents that accumulate skills and memory over time. It examines their differences across architecture layers, maintainability, debugging costs, and governance, provides a reference implementation of the experience-accumulation loop, and offers a practical decision framework and operational checklist for engineering teams choosing between the two routes—or combining them.
1. The Starting Point: From “Answering Questions” to “Executing Tasks”
Over the past two years, large language models have evolved from conversational tools into agents capable of calling external tools, operating on files, and running scheduled tasks. The basic agent loop typically consists of understanding a goal, decomposing it into steps, calling tools, observing results, and refining the plan. Once this loop works, the core question facing engineering teams is no longer whether the model can produce an answer, but how the system can complete tasks reliably, stably, and under control over the long term.
At this stage, two distinctly different approaches have emerged. One treats the agent as an orchestratable execution unit whose capability boundaries are predefined by developers. The other treats the agent as a system that changes with use, with capability boundaries expanding gradually through task experience. Neither approach is inherently superior, but they place entirely different demands on staffing, debugging, and security governance.
2. Core Differences Between the Two Routes
2.1 Instruction-Driven: Capabilities Come from Human Design
The capabilities of instruction-driven agents come mainly from three kinds of human artifacts: prompt templates, tool inventories, and workflow configurations. Developers decide under what conditions the agent calls which tool, which channel messages enter through, and when scheduled tasks trigger.
The advantage of this approach is predictable behavior. Every step has a clear origin, and teams can understand the system’s state through code reviews and configuration audits. The drawback is that expansion costs grow linearly with the number of capabilities. Each new channel or tool requires additional adapter code, authentication configuration, and exception-handling logic.
2.2 Experience-Driven: Capabilities Come from Accumulated Tasks
After completing a task, an experience-driven agent abstracts effective steps into reusable skills, records the causes of failures as correction rules, and writes user preferences into long-term memory. When a similar task appears next time, it first calls on validated skills, skipping the plan-from-scratch step.
The advantage of such systems is that the cost of repeated work declines over time. Users only need to describe a goal once; afterward, the system requires fewer confirmations. The drawbacks are equally clear. Accumulated experience may contain wrong assumptions, and memory can be contaminated by bad inputs. System behavior drifts over time, which means teams need version management and behavioral regression testing capabilities.
2.3 Side-by-Side Comparison
| Dimension | Instruction-Driven | Experience-Driven |
|---|---|---|
| Capability source | Human-written workflows and configurations | Skills and memory accumulated from task execution |
| Behavioral stability | High; changes are traceable | Medium; requires constraints on the accumulation mechanism |
| Initial investment | Higher | Lower, but monitoring must be designed upfront |
| Long-term maintenance | Grows with feature count | Requires governance as experience accumulates |
| Debugging approach | Inspect configurations and code paths | Inspect experience sources and memory contents |
3. The Two Routes Through the Lens of Architecture Layers
A complete agent system can typically be decomposed into six layers: the entry layer, understanding layer, planning layer, tool layer, memory layer, and feedback layer. The differences between the two routes are concentrated in the memory and feedback layers.
The entry layer receives user messages, scheduled events, and external notifications. Multi-channel access is generally handled by a unified message adapter that converts platform-specific messages into a common event structure, decoupling upper-layer logic from channel details.
In instruction-driven systems, the memory layer is usually read-only, or stores only the current session’s context. The feedback layer is mainly for logging and alerting, with humans stepping in to analyze failures. In experience-driven systems, the memory layer is writable: task results, user corrections, and environmental facts are written to persistent storage. The feedback layer decides which experiences are worth keeping and which should be downgraded or deleted.
Understanding these layers helps pinpoint where a problem should be fixed. If a task fails because of a malformed tool parameter, the fix belongs in the tool layer. If the agent keeps forgetting preferences the user has already stated, the fix belongs in the memory layer. Assigning a problem to the wrong layer often leads to endless patching without real improvement.
4. Maintainability and Debugging Costs
When an agent misbehaves, debugging should first distinguish three categories of causes: configuration problems, model problems, and experience problems.
Configuration problems are the easiest to locate, and can be resolved through version comparison, configuration diffing, and unit tests. Model problems usually show up as inconsistent outputs for the same input across model versions; the solution is to maintain a fixed evaluation set and run before/after comparisons on every model switch. Experience problems are the most insidious. The system may have “learned” a wrong approach and keeps repeating it, while every step in the logs looks reasonable.
For this reason, experience-driven systems must provide interfaces to view, edit, and roll back the experience store. Each experience entry should carry at least the following information: the identifier of the source task, creation time, applicability conditions, invalidation conditions, and historical success/failure counts. With these fields, teams can trace anomalies back to a specific experience entry and decide whether it should be retired.
5. Reference Implementation: The Basic Experience-Accumulation Loop
The following code illustrates the basic structure of experience accumulation; it does not map to any existing library’s interface. In production, the matching logic could be replaced with a rule engine or vector retrieval.
from dataclasses import dataclass, fieldfrom datetime import datetime@dataclassclass Experience:trigger: str # Keywords describing the applicable scenariosteps: list[str] # Validated step sequencesource_task_id: str # Source task identifier for auditabilitycreated_at: datetime = field(default_factory=datetime.now)success_count: int = 0failure_count: int = 0class ExperienceStore:def __init__(self) -> None:self._items: list[Experience] = []def match(self, task_desc: str) -> Experience | None:# Illustrative implementation: keyword matching; replace with finer retrieval in productionfor item in self._items:if item.trigger in task_desc:return itemreturn Nonedef add(self, exp: Experience) -> None:# Before entering the store, new experience should pass human or rule-based reviewself._items.append(exp)def record(self, exp: Experience, success: bool) -> None:if success:exp.success_count += 1else:exp.failure_count += 1# Retire experience when failures exceed a threshold and outnumber successes,# preventing bad experience from staying in effect long termif exp.failure_count > 3 and exp.failure_count > exp.success_count:self._items.remove(exp)
This code highlights three key points. First, every experience entry can be traced back to its source task. Second, whether experience stays in effect or gets retired is decided by statistics, not by the model itself. Third, new experience should pass through a review gate before entering the store. These three principles are worth preserving in engineering practice more than any specific data structure.
6. A Decision Framework for Choosing a Route
Before choosing a route, teams can answer the following questions.
- Are tasks highly repetitive with relatively fixed steps? If so, the instruction-driven route is usually simpler to manage.
- Do results need to be auditable and reproducible? Finance, healthcare, and compliance scenarios generally require this; the drift risk of experience-driven systems needs additional controls.
- Does the team have the capacity to maintain the experience store long term? Without dedicated ownership, accumulated experience gradually becomes an incomprehensible historical burden.
- Do tasks involve sensitive data? Long-term memory expands the data exposure surface and needs separate evaluation.
- Do users want the system to understand them better over time? If so, experience-driven capabilities deliver real value.
In most real-world projects, a hybrid approach makes more sense: use instruction-driven design for core workflows, permission-related operations, and compliance steps to keep behavioral boundaries clear, and introduce experience accumulation for personalization preferences and highly repetitive auxiliary tasks, with limits on what can accumulate and under what conditions it takes effect.
7. Operational Best Practices
- Least-privilege permissions. Grant each tool its own authorization, and require human confirmation by default for write operations such as deletion, sending, and payments.
- Isolated execution. Run operations involving file system and network access in a sandbox, restricting accessible directories and domains.
- Model replaceability. Wrap model services behind a unified calling interface so business logic is not coupled to any model’s parameter formats or response structures. Switching models then only requires changes to the adapter layer.
- Experience review. Newly accumulated skills should first enter a pending-review state and take effect only after human confirmation, preventing a one-off accidental success from being treated as a general rule.
- Operation auditing. Log the input, output summary, and decision rationale of every tool call, and retain them for a sufficient time window to support post-incident review.
- Regression testing. Maintain a fixed set of representative tasks and run them after every change to prompts, model versions, or the experience store, comparing results each time.
8. Risks and Boundaries
The main risks of experience-driven systems fall into four areas.
The first is the solidification of wrong experience. Failure thresholds, validity periods, and periodic review mechanisms can limit the impact of erroneous experience.
The second is memory contamination. Web content, file contents, and third-party messages may all contain adversarial or manipulative text. The system should treat such external content as data rather than instructions, and prohibit external content from being written directly into the instruction layer or high-privilege configurations.
