Skip to content

Pattern

How AI agents learn new skills and improve their own procedures

Self-improving agents get better by writing down what worked as reusable skills: short procedures, checklists or scripts they load next time a similar task comes up. The model does not change; the library of procedures around it does, ideally with a person reviewing each change.

StudiedLast reviewed 3 min read

Explained from public sources. Mai has not built this yet.

On this page

In plain English

When a new member of staff works out the right way to raise a purchase order, a good manager asks them to write it down so the next person does not have to rediscover it. Self-improving agents do the same. After a task, the agent notes what worked, what went wrong and what it would do differently, and saves that as a procedure it can follow next time. The AI model underneath stays the same; what grows is the playbook it reads from.

How it works

A skill is a small package of know-how. In the form Anthropic describes for its agents, a skill is a folder holding a file with a name, a one-line description of when to use it, and instructions, plus optional scripts and reference documents. The agent keeps only the names and descriptions in view. When a task matches, it opens the full instructions, and it reads deeper files only if it needs them. That layered loading means an agent can carry many skills without filling its context.

Skills can contain code as well as prose. A step that must be exact every time, such as pulling fields from a form or reconciling two lists, is better as a script the agent runs than as instructions it interprets.

The self-improving part is a loop around those skills:

  1. Attempt. The agent does a task using whatever skills it has.
  2. Check. Something judges the result: a test, a validation rule, an error from a system, or a person’s correction.
  3. Reflect. The agent writes a short, specific lesson. Reflexion, a research approach, showed that storing these written reflections and feeding them into later attempts improves results without touching the model’s weights.
  4. Propose. The lesson becomes a change to a skill, or a new skill. Voyager, an agent that learned to play Minecraft, kept a growing library of working code for behaviours it had mastered and reused it to build more complex ones.
  5. Review and publish. The change is tested and, in a business setting, approved before other runs use it.

Attempt task. Then Check result, Reflect. Then Proposed change. Then Replay past cases. Then You approve. Then Skill library.

Lessons become proposed skill changes, and a person decides what goes live

Anthropic’s own write-up is candid that agents creating, editing and evaluating skills entirely by themselves is a goal rather than something to rely on today. The dependable version now is agent-drafted, human-approved.

Where it goes wrong

  • Learning the wrong lesson. One unusual case becomes a rule for every case. A lesson drawn from a single failure needs testing against the ordinary cases it might break.
  • Skill sprawl. Dozens of overlapping procedures with similar descriptions confuse the agent about which to load. Skills need owners, merging and retirement.
  • Bad feedback. If the “check” step is weak, the loop reinforces mistakes. The loop is only as good as the signal that says a result was right.
  • Untrusted skills. A skill is instructions plus code, so a malicious or careless one can leak data or take actions nobody intended. Anthropic advises installing skills only from trusted sources and auditing any others, including their scripts and any network access.
  • Silent drift. If skills change without versioning, nobody can say why the agent behaves differently this month. Every change needs a history and a way back.

How Mai AI uses it

In a Mai AI system, I treat skills as part of the client’s operating manual, written in plain language that staff can read. Each one has a description of when it applies, the steps, the systems it touches and who owns it. Where a step must be exact, I put it in a script rather than in prose.

I design the improvement loop so that agents propose and people decide. When a run fails, is corrected by a person or takes a slow route, the agent drafts a lesson and a suggested change to the relevant skill. That change is versioned, replayed against real past cases (see testing agents) and goes live only after approval through the same human approval gates used for any action that matters. Lessons that are facts rather than procedures go to agent memory instead.

The result I aim for is a system whose know-how belongs to the business and survives a change of model. If you would like your team’s procedures to become something agents can follow and improve, that is part of a custom AI operations system.

Questions and answers

Can AI agents improve themselves?

Yes, in a limited and useful way. Without retraining the model, an agent can record what worked and what failed as written procedures or code, and load those next time. The improvement lives in files you can read, test and roll back.

What is an agent skill?

A skill is a packaged procedure an agent can load when it is relevant: a short description saying when to use it, step-by-step instructions, and sometimes scripts or reference files. Only the description is kept in view until the skill is needed.

Do self-improving AI agents retrain the model?

Usually not. Approaches such as Reflexion and Voyager keep the model fixed and improve behaviour by storing written reflections or working code that the agent reuses on later attempts.

Is it safe to let an AI agent edit its own instructions?

Only with controls. Proposed changes should be versioned, tested against real past cases and approved by a person before they go live, because a bad lesson spreads to every future task.

Sources

  1. Equipping agents for the real world with Agent Skills (Anthropic engineering)anthropic.com
  2. Voyager: An Open-Ended Embodied Agent with Large Language Models (Wang et al., arXiv)arxiv.org
  3. Reflexion: Language Agents with Verbal Reinforcement Learning (Shinn et al., arXiv)arxiv.org