How do people get better?
Not by having someone tell them "you should do it this way" over and over. It's by going through something yourself, realizing you didn't do it well, figuring out where the problem was, and trying a different way next time. That process has a name: reflection.
I've found that agents evolve by the same logic.
Today the "personality" of most agent products is static. The system prompt is written, the tool list is configured, and after launch nothing changes. Every improvement depends on developers tweaking things by hand. A user can use it ten thousand times, and the agent performs exactly as it did the first time.
That's probably wrong. A good agent should be adaptive. It should evolve on its own as usage changes and as users give feedback. Not passively waiting for someone to fix it, but, inside a controlled framework, finding its own problems, proposing its own improvements, and becoming a better version of itself after those improvements are verified.
An agent that can't reflect stays at its creator's level of understanding forever. An agent that can reflect can surpass its creator.
That's what this article is about: how can an agent achieve controlled self-evolution?
A self-evolution loop
I've abstracted agent self-evolution into an eight-step loop. No single step is complicated, but strung together they form a closed loop of continuous improvement.
This loop is strikingly similar to how people grow. In school, teachers had us keep a notebook of the problems we got wrong. Not to punish us, but because learning from failure is the most efficient way to improve. Agents are the same. They need a structured "mistake notebook." Once I saw it this way, a lot of things made more sense to me.
Now let's take each step apart.
Chat
Everything starts with conversation. Every interaction between the agent and a user is a round of practice. In practice, some answers are good, some are bad, and some look fine but actually drift away from the best answer. The agent's practical experience is what makes finding problems possible. These conversations are the raw material of evolution.
History
Conversations can't be thrown away after use. They need to be recorded, indexed, and traceable. This is the agent's "experience." Without experience, there's nothing to reflect on.
Focus
Not every conversation is worth a review. The key is to find the cases that "weren't done well enough." You can flag them through explicit user feedback (ratings, likes, and so on), or filter them with automated evaluation. Just like a student's mistake notebook: first pick out the problems you got wrong, instead of redoing every problem.
Judge
Once the mistakes are picked out, you need a "grader" to diagnose them. The Judge can be another LLM, or a rules engine. The point isn't to mark right or wrong, it's to find the cause: missing knowledge? A misunderstanding? The wrong tool? Or is the prompt instruction itself ambiguous?
The granularity of the diagnosis determines how precise the later improvements can be.
Reflection
This is the core step of the whole loop. Based on the Judge's diagnosis, the agent generates concrete improvement suggestions. Not a vague "I should do better," but an actionable Prompt Patch: "When the user asks an X-type question, add a check for step Y." "In scenario Z, prefer knowledge base retrieval over direct generation."
The quality of reflection directly determines the quality of evolution. Good reflection is specific, verifiable, and bounded. Bad reflection is vague, overgeneralized, or even wrong.
Eval
Does the new approach from reflection actually help? Not necessarily. It has to be verified through evaluation: did it really get better after the change? Did it introduce new problems?
Eval is the safety valve of the whole loop. Self-evolution without Eval isn't evolution, it's random drift.
This step needs an evaluation dataset with broad enough coverage, and a full regression run. You can't just check that the score on "the problem you fixed" went up. You also have to check that nothing else dropped.
Version
A Patch that passes Eval gets packaged into a new version. Versioning means it's traceable, comparable, and reversible. Every evolution leaves a trail: you know where a change came from, why it was made, and how it worked. Not every change will be an improvement. Results may go up and down, and people are the same. But the overall direction should be progress.
Publish
The new version goes live, and the agent keeps talking to users with its new understanding. Then the loop starts again.
The whole process is like a person growing on the job: do the work, make mistakes, review, draw lessons, verify the improvement, apply it next time. The difference is that an agent can run this loop faster and more systematically, and it won't skip reflection out of emotion or laziness.
What the industry is doing
Self-evolving agents became a hot research direction in 2025. A batch of related work came out at NeurIPS 2025, and Stanford launched a dedicated course, CS329A "Self-Improving AI Agents." I went through a few representative studies and sorted them into four schools by approach.
The reflection loop school
Reflexion (Shinn 2023) is the pioneering work. After the agent fails a task, it writes a reflection in natural language, stores it in memory, and injects it into the context on the next retry. It pushed GPT-4's pass@1 on HumanEval to about 91%. Simple and effective, but the improvement is temporary, not persistent.
The self-generated training school
Self-Challenging Agents (NeurIPS 2025) has the agent act as both question-setter and solver. The setter generates tasks with test code, the solver solves them, and successful cases become training data. LLaMA-3.1-8B doubled its performance on tool-use benchmarks. SEAL (NeurIPS 2025) has the model generate natural-language "self-edit instructions," which are turned into fine-tuning data to update itself.
The self-modifying code school
SICA (Robeyns 2025) is the most aggressive: the agent directly edits its own source code (prompts, heuristics, architecture), checks the effect with benchmarks, and keeps the changes that make it better. It improved coding tasks by 17% to 53%. Voyager (Wang 2023) takes the skill accumulation route: successful skills are stored as executable code in a Skill Library and reused directly next time.
The framework and memory school
Gödel Agent (Yin 2024) proposes a self-referential framework: the agent proposes changes to itself, but they must pass predefined improvement tests. DSPy (Stanford) turns prompt optimization into a programmatic process: define the goal, automatically search for the best prompt, and use evaluation as feedback. Mem0 and Letta do layered management at the memory level, providing the data foundation for self-evolution.
Side by side
| Dimension | Reflection loop | Self-generated training | Self-modifying code | Framework and memory |
|---|---|---|---|---|
| Representative work | Reflexion, Self-Refine | Self-Challenging, SEAL, STaR | SICA, Voyager | Gödel Agent, DSPy, Mem0 |
| What changes | Runtime context | Model weights | Agent source code and policy | Prompt config and memory |
| Persistent? | No (session level) | Yes (weight level) | Yes (code level) | Yes (config/data level) |
| Verification | Whether the task succeeds | Training loss + benchmark | Code tests + benchmark | Eval dataset |
| Deployment complexity | Low (inference only) | High (needs a training pipeline) | Medium (needs a sandbox) | Medium (needs an eval system) |
| Risk level | Low | Medium (bias amplification) | High (code safety) | Low to medium |
| Best for | Fast iteration, one-off tasks | Tasks with clear labels | Coding and structured tasks | Product-grade agents |
Consensus and direction
The four schools look like different routes, but a few things are already consensus.
First, reflection is the foundation
Whether it's Reflexion's verbal reflection, SEAL's self-edit instructions, or SICA's code self-review, the core is the same: the agent can see where it didn't do well. Without that ability, self-evolution is out of the question.
Second, verification is indispensable
Every approach has some kind of "exam gate." Reflexion checks whether the task succeeded, Self-Challenging uses test code, SICA runs benchmarks, DSPy uses evaluation metrics. Unsupervised self-improvement doesn't exist. Only a change that's verified to be better counts.
Third, improvements must persist
Reflexion's limitation is exactly that its reflections are temporary and vanish when the session ends. Later research is all about solving this: capturing valuable improvements and turning them into the agent's "long-term memory."
I think the right direction is the framework and memory school's approach, combined with the reflection loop school's capabilities. The reason: for most product-grade agents, changing model weights is too heavy (you need a training pipeline), and changing source code is too dangerous (you need very strong sandboxing). Changing prompt config and memory is the most pragmatic path. Cost is controllable, risk is controllable, and the effect is verifiable.
Reflection provides the direction of improvement, evaluation provides the standard of verification, and memory provides persistence. Put the three together and you have the minimum viable architecture for product-grade self-evolution.
Yohei Nakajima reached a similar conclusion in "Better Ways to Build Self-Improving AI Agents": the practical route is to build the reflection loop first, then experience persistence, and only last consider weight-level self-training.
Where the risks are
Self-evolution done badly is worse than no evolution. There are three risks you have to face squarely.
Prompt regression. You fix scenario A, and performance in scenario B drops. This is extremely common in prompt engineering, because a prompt is a whole, and local optimization can break the global balance. The fix is to run a full regression eval on every change, not just look at the case that got fixed.
Hallucinated reflection. The agent can produce a wrong self-diagnosis. The Reflexion paper names this risk explicitly: the model can hallucinate bad reflections and reinforce them. If an agent "reflects" that "I was too conservative, so I got it wrong" and then becomes more aggressive, the results will only get worse.
Eval overfitting. The agent learns to "ace this test set" instead of "handle this class of problem." The evaluation dataset has to be updated continuously with new real-world scenarios, so the agent isn't just gaming the score.
The core principle of safe design: reflections can be generated freely, but changes only take effect after they pass verification. Autonomy lives in reflection, control lives in verification. Every version is traceable and reversible. This is exactly how permissions work for people in an organization: you can propose anything, but shipping it needs approval.
My take
While writing this, I kept coming back to one question: why does self-reflection matter so much?
For people, reflection is the core driver of growth. Whether someone gets better doesn't depend on how smart or how hard-working they are. It depends on whether they can honestly face their shortcomings and know how to improve. Plenty of people work for ten years and just repeat their first year's experience ten times. The people who really improve ask themselves after every failure: what didn't I do well? Why? What will I change next time?
The same goes for agents. An agent that handles ten thousand conversations a day, without a reflection mechanism, is repeating the same mistakes ten thousand times. With a reflection and evolution loop, every mistake becomes nourishment for the next version.
Self-criticism is the precondition for progress, whether you're a person or an agent.
But there's one key difference between people and agents. Human reflection is internally driven: you want to get better. Agent reflection, for now, is designed in, and needs an external framework to drive it. That's also why I put Eval at a key position in the loop: people have internal standards, agents need external ones. At least for now.
From a longer view, "learning to improve" can itself become a training objective. RISE (Recursive Introspection) is already doing this: not just training the model to give the right answer, but training it to "correct itself from its mistakes." If that direction works out, future agents may really develop some kind of "inner drive." By then, the line between humans and agents will get even blurrier.
Until that day comes, though, my rule is simple: don't flip the self-evolution switch until you have good enough Eval coverage. Better to be a step slower than to let an agent change itself without a safety net.
After all, an agent that has learned the wrong lesson may be more dangerous than one that never reflects at all.
References
- Shinn et al., "Reflexion: Language Agents with Verbal Reinforcement Learning", 2023, arXiv:2303.11366
- Zhou et al., "Self-Challenging Language Model Agents", NeurIPS 2025
- Zweiger et al., "Self-Adapting Language Models (SEAL)", NeurIPS 2025
- Robeyns et al., "SICA: A Self-Improving Coding Agent", 2025
- Wang et al., "Voyager: An Open-Ended Embodied Agent with Large Language Models", 2023, arXiv:2305.16291
- Yin et al., "Gödel Agent: A Self-Referential Agent Framework for Recursive Self-Improvement", 2024, arXiv:2410.04444
- Qu et al., "Recursive Introspection: Teaching LLM Agents How to Self-Improve", 2024
- Khattab et al., DSPy: Compiling Declarative Language Model Calls into Self-Improving Pipelines, Stanford 2024
- Yohei Nakajima, "Better Ways to Build Self-Improving AI Agents", December 2025
- Stanford CS329A: Self-Improving AI Agents, Autumn 2025
- Xiang et al., "A Systematic Survey of Self-Evolving Agents", 2026