Why AI Agents Need to Proactively Capture Experience
This article explains why an AI agent that remembers a past task may still fail to reuse it, and what it takes to turn one-off experience into reusable capability. It compares session memory, configuration memory, and capability memory, outlines the costs of configuration-driven behavior, and describes a closed loop of identification, proposal, consolidation, invocation, and evolution. It also covers task signatures for matching, vendor-neutral pseudocode, governance through versioning and metrics, and common pitfalls.
1. The Recurring Gap: Remembered, but Never Used
Start with a common scenario. You ask an agent to handle a structured data import: read a spreadsheet file, clean the fields, and write to a database. The first run goes smoothly, and you casually praise it. The second time a similar task comes up, it behaves as if it is seeing the task for the first time. It has not completely forgotten. It “knows we talked about this,” but it does not proactively pull up the previous workflow and reuse it. You end up digging through history yourself, summarizing what worked, restating the conclusion as an instruction, and correcting the agent step by step.
The key issue here is not memory capacity. It is the usability tier of memory. The industry usually divides agent memory into three rough layers:
- Session memory: stores the raw conversation. It can be retrieved and quoted, but it carries no execution semantics.
- Configuration memory: writes preferences, standards, and conventions into descriptive files that the model reads and follows during reasoning.
- Capability memory: turns one successful execution into an invocable skill unit with an entry point, preconditions, and validation logic.
The developer’s advice in the original text, to write preferences into instruction files or use a meta-skill to generate a new skill, essentially moves first-layer memory into the second layer by hand. This path works, but it shifts the cost onto the human.
2. The Benefits and Costs of “Configuration as Behavior”
The logic of the configuration-driven paradigm is clear: behavior is defined by files. The more detailed the files, the more stable the execution. If you do not write it down, the agent has to reason from scratch every time. The advantages are transparency, version control, and reviewability. Teams can accumulate their standards as text assets.
The costs are equally clear:
- Maintenance is a continuous liability. Preferences, environment differences, and table schema changes all require manual synchronization, and the files decay over time.
- Triggering depends on humans. The agent will not proactively say, “I have done this workflow before, want to reuse it?” It simply waits to be described again.
- Memory is disconnected from execution. Text describes constraints, not an executable workflow, so the model has to translate “from constraints to steps” every time, and that translation has variance.
- It is hard to evaluate. You cannot answer how many times a piece of memory was used last time or what its success rate was.
So the question should not be “which type of memory is better.” It should be: how do we move the trigger for capturing experience from humans to the system while preserving auditability?
3. The Target State: Making Capture a Closed Loop
A practical closed loop has five stages, and none can be missing:
- Identification: determine whether the current task is structurally similar to a past successful execution.
- Proposal: after the task completes, proactively ask whether to consolidate it into a skill instead of waiting for someone to speak up.
- Consolidation: write the workflow as a capability unit with a signature (inputs, outputs, preconditions).
- Invocation: when a structurally similar task appears next time, match the existing capability first instead of reasoning again.
- Evolution: allow controlled extension during reuse, for example automatically adding a precondition check for “does the target table exist,” and record that change.
The most noteworthy point in the original text is the last one: reuse is not replay. The extra check on the second run shows that the system treated the “workflow verified last time” as a baseline and made a reasonable enhancement on top of it. That is the difference between capability capture and video replay.
4. Judgment and Matching: How to Define Structural Similarity
To make identification reliable, you need to abstract the task into a comparable structure rather than compare natural language descriptions. A practical signature contains a four-part tuple:
SkillSignature = {intent: data import / file cleaning / batch sync ...,inputs: { format: csv, encoding: utf-8, columns: [...] },outputs: { target: relational_db, table: string },guardrails: { idempotent: true, dry_run: false }}
A layered matching strategy is recommended: first do a coarse filter by intent, then compare key fields of the input and output structures, and finally use a similarity threshold as a fallback. The threshold should not be too low, or “import CSV” and “export CSV” will be treated as the same. It should not be too high either, or adding or removing a single field will cause a miss. A more robust engineering approach is to allow “partial match plus parameter completion,” meaning the workflow skeleton matches and the user confirms the missing parameters.
5. Illustrative Implementation: Proposal, Consolidation, and Invocation
The following is vendor-neutral pseudocode that only expresses the control flow:
def run_task(task):hit = skill_store.match(task.signature(), threshold=0.82)if hit:return hit.execute(task, on_change=record_diff)result = agent.solve(task) # First run, using general reasoningif result.verified and is_reusable(task):proposal = Propose(name=task.name,signature=task.signature(),steps=result.trace,guards=result.guards)if user.approve(proposal): # The system triggers; the human decidesskill_store.save(proposal)return result
Three design constraints are worth emphasizing: the proposal must be initiated by the system after a success; the consolidated content must include validation and rollback strategies; and all reuse and changes must be logged so you can trace “why there was an extra step this time.”
6. Governance: Auditable, Rollback-Ready, and Convergent
The capability library will grow, so governance mechanisms are needed:
- Versioning: each automatic enhancement generates a new version, and old versions are kept for rollback.
- Permission boundaries: workflows that write to a database enable dry-run mode by default, and changes require explicit confirmation.
- Metrics: hit rate, reuse success rate, number of manual interventions, and average correction rounds.
- Deprecation: capabilities that go a long time without a hit or whose success rate declines are automatically downgraded and archived.
- Isolated environments: skills are first validated in a sandbox or on a test dataset before entering the production path.
If you deploy the agent in the cloud, these capabilities are usually provided by general categories: container platforms handle running and isolation, object storage holds skill packages and datasets, message queues decouple tasks, and logging services with monitoring and alerting provide traceability and threshold reminders. Which cloud provider you choose does not affect the architecture. What matters is keeping interfaces neutral and replaceable.
7. Common Pitfalls
- Treating session records as capability. Retrievable does not mean executable.
- Pursuing fully automatic consolidation. Without human confirmation, wrong workflows also get consolidated, creating bias at scale.
- Storing only steps and not preconditions. Without guard conditions, reuse becomes a gamble.
- Ignoring changes in data distribution. When the table schema changes, the old skill should trigger revalidation rather than fail silently.
- Using similarity instead of semantics. Tasks with similar strings often have opposite meanings.
8. Conclusion
Between “remembered” and “can use it” lies a proactive proposal, a structured consolidation, and a controlled evolution mechanism. Configuration-driven behavior is not wrong. It simply pushes the cost of capture onto the user. A more mature path is to let the system proactively initiate a capture request after a task succeeds, turning one-off experience into a capability unit with a signature, guardrails, and versioning, while allowing controlled enhancement during reuse. Whether an agent is truly “intelligent” is not measured by how much it remembers, but by whether it is willing to push what it did right last time one step further before you even ask.
