How AI Agents Turn Experience into Reusable Skills
Agents often remember past conversations but fail to repeat verified workflows. This article explains why memory and skills are different, what fields a reusable skill should contain, when to prompt users to save one, and how to govern and operationalize a skill library so agents can safely reuse proven processes instead of re-inventing them each time.
Why “Remembering” Isn’t the Same as “Doing It Again”
After teams introduce AI agents, they often run into the same frustration: yesterday the agent cleaned a spreadsheet and wrote it to a database, and did it well. Today, when given a similar request, it starts explaining the steps from scratch, only admitting after being pressed that “we discussed something like this before.” It confirms the memory exists but never turns that memory into executable action.
This isn’t the model suddenly getting dumber—it’s the wrong form of memory. Chat-log memory answers “what happened”; engineering needs “the next time this kind of input appears, which verified path should be followed?” Between those two, a structured layer of accumulated experience is missing: trigger conditions, inputs and outputs, steps, failure handling, and human confirmation points. Without this layer, the “intelligence” stays at the level of casual chat, and all the maintenance burden falls on humans.
Two Main Approaches
Configuration as Behavior
Write preferences, constraints, and processes into memory files or system prompts, and the agent follows the text. The advantages are transparency, version control, and predictable behavior. The disadvantages: the more detailed the writing, the more accurate it is, but if you’re too lazy to maintain it, everything starts from zero each time. Ordinary users often don’t know what to record, where to record it, or when it becomes stale. The result is that the “agent” becomes an executor that needs a human to keep feeding it instructions.
Configuration is suited for stable, low-frequency rules: output language, safety boundaries, directory conventions, and operations that must never be automated. It is not suited for operational details that are only discovered during each task.
Distilling Processes into Skills
After a task succeeds and the user confirms it, abstract that run into a callable skill: name, applicable scenarios, prechecks, steps, validation, and rollback guidance. The next time a similar intent appears, retrieve the skill first and execute it instead of re-inventing the workflow. Humans still retain veto power, but they no longer have to verbally translate memory every time.
The key difference is proactivity. Configuration-based systems wait for a person to write experience into files; accumulation-based systems ask whether to save at the end of a task and proactively propose reuse when a match succeeds next time.
What a Skill Should Contain
A reusable skill should have at least these fields, to avoid becoming yet another chunk of unexecutable notes:
- Intent description: state in business terms what problem it solves, e.g., “clean tabular data and import it into a target table.”
- Trigger conditions: file type, whether fields are complete, whether the target table exists, whether the user has explicitly authorized writes.
- Inputs and outputs: input examples, required columns, and whether the output is a script, a change description, or execution results.
- Prechecks: whether targets exist, primary key conflicts, null/type convertibility, and anomalous affected-row counts.
- Execution steps: cleaning rules, mapping relationships, transaction boundaries, and stopping on failure rather than partially committing.
- Validation: row-count comparison, sampling checks, and constraint checks; if validation fails, the task must not be marked as successful.
- Human confirmation points: overwrites, deletions, and permission changes require a second confirmation.
- Version and provenance: which task generated it, when it was verified, who confirmed it, and which older version it replaces.
The following sketch expresses only the field relationships, not any particular product’s interface:
skill:name: tabular_importintent: Clean a spreadsheet and import it into an existing data tabletriggers:- User asks to import a spreadsheet or similar file- A clear target table existsprechecks:- Confirm the target table exists- Check primary keys and null valuessteps:- Identify columns and generate mappings- Write within a transaction- Commit after sampling validationconfirm_required:- Overwrite or delete existing dataversion: 3
When to Ask “Should This Be Saved?”
Not every conversation should generate a skill. Saving too early can cement an accidental operation into a flawed standard. Safer trigger conditions are:
- The task is complete and validation passed—not merely that a suggestion was produced.
- The user expresses a repeated intent, or the workflow has already appeared a second time within a short period.
- The steps contain error-prone details: field mappings, filter conditions, target locations, transaction strategy.
- The task does not involve one-time secrets, personal data in plain text, or non-reusable temporary paths. Sanitize when saving—keep only the rules.
The ask itself should be specific: “Save ‘check target table, merge by primary key, sample validation’ as a reusable workflow?” rather than a vague “Want me to remember this chat?” If the user agrees, write it into the skill library; if they decline, keep only a regular session summary.
How to Invoke It Next Time, Not Just Recite It
When a similar request arrives again, the recommended order is:
- Intent matching: retrieve skills using the task description, not by searching the full chat history.
- Show the difference: state which version will be reused and how the inputs differ from last time.
- Re-run prechecks: the environment may have changed; never assume the target table still exists or the schema is unchanged.
- Execute only after checks pass; pause at high-risk steps for confirmation.
- Record whether this run deviated from the skill. If the user changed the rules, generate a candidate new version instead of silently overwriting the old one.
In the original scenario, the second import pulls up the previously verified workflow and additionally checks that the target table exists—this is “reuse + re-validation,” not blind replay. Checking whether the target exists is a precondition that belongs before the write; if the table doesn’t exist, suggest creating it or stop, to avoid writing data to the wrong location.
How to Divide Labor with Memory Files
Don’t stuff everything into one kind of memory.
- Stable preferences: forms of address, output format, default time zone, prohibitions → configuration.
- Reusable processes: skills, with versions and validation.
- Session facts: this run’s file names, ad-hoc decisions → short-term context, discarded when stale.
- Organizational policies: permissions, auditing, data classification → policy, which skills must not bypass.
Configuration answers “who am I and where are my boundaries”; skills answer “how was this kind of thing done correctly last time.” Mixing them into one long file creates retrieval noise and makes it hard to audit who changed the import rules.
Governance: Skills Can Go Bad Too
Self-iteration without guardrails will burn flawed processes deeper and deeper into memory. Recommended constraints before going live:
- Skills start as drafts; only after one successful validation or human confirmation can they be auto-matched.
- Keep versions and diffs; forbid silent overwrites.
- Set expiry conditions: if the target structure changes, failures recur, or a skill goes unused beyond a threshold, downgrade it to “pending review.”
- Log invocation counts, failure reasons, and human vetoes to clean up low-value skills.
- Least privilege: skills may only suggest commands or execute in a sandbox; writes to databases, message sending, and permission changes require explicit authorization.
- Logs record only rules and result summaries—never sensitive data in plain text.
These requirements can be met with generic object storage for skill documents, version control to track changes, and logs and monitoring to watch failure rates—no need to bind to any vendor’s proprietary interface. If a team already uses Baidu AI Cloud’s storage, containers, and logging capabilities, skills can simply be managed as versionable configuration artifacts rather than writing business rules into conversations.
Implementation Steps
- Pick one recurring pain point—e.g., spreadsheet ingestion, daily report compilation, or environment checks—rather than trying to cover all tasks at once.
- Have a human write the first skill and run it through prechecks and validation as a template.
- Let the agent propose saving when a task completes successfully, with a human confirming the fields are complete.
- The second time, allow only “retrieve skill, then execute”; forbid inventing a new set of steps without declaration.
- Compare manual interventions, rework, and erroneous writes between the two runs before deciding whether to expand the scope.
When evaluating, look at just three things: whether the agent proactively proposes reuse, whether it re-checks the environment before reusing, and whether it stops and explains the reason after a failure. If a human still has to translate the chat log into instructions, the accumulation layer isn’t built yet.
Summary
An agent’s value lies not in acknowledging “we’ve talked about this,” but in turning verified workflows into skills with triggers, checks, and versions—and proactively and safely invoking them next time. Configuration files remain necessary, but they’re for boundaries and preferences; repetitive operations belong in a skill library. Closing the loop across saving, matching, re-validation, and expiry means ordinary users don’t have to maintain long memories, and developers can audit where every automatic reuse came from.
