Getting Started with Self-Evolving Agents: What to Learn First
This article explains what to focus on when learning to build self-evolving agents. It shows that evolution happens at the system level through human-readable external state files rather than model weight updates, then walks through the core learning areas: layered design for memory, skills, and knowledge bases; memory and user profile engineering; documenting skills as reusable assets; closed-loop learning with observability; and decoupling the entry point, platform, and model. A four-week learning path is included.
1. Start with the Right Mental Model: Evolution Happens at the System Level, Not in the Weights
When beginners first approach a “growing” agent, their instinct is to assume it quietly performs incremental training. The reality is the opposite: the base model’s weights stay frozen for the entire usage cycle. What changes is the set of human-readable, human-writable files around it. Memory gains a new preference, the skill library gains a few hard-won lessons, and the domain knowledge base accumulates business terminology. The model has not changed; the way the model is called has.
This distinction determines where your learning effort should go. If evolution came from weights, you would study training and fine-tuning. Since evolution comes from external state, you study state modeling, file contracts, retrieval strategies, and workflow orchestration. Put your effort into the wrong layer at the start, and the harder you work later, the further off course you drift.
2. Focus One: Layered Design of Three Types of External State
Self-evolving agents typically split state into three categories, all persisted as files:
- Memory: personal and task context, answering “who am I and what am I doing.”
- Skills: reusable methods, answering “how is this kind of task done.”
- Knowledge base: domain knowledge, answering “what are the rules and facts of this domain.”
The three cover different problem domains but share the same advantage: they can be inspected, modified, and version-controlled by humans. When learning, hold on to three boundaries. First, memory is volatile and personal, updated frequently, and needs compression and forgetting mechanisms. Second, skills are stable and reusable, and changes must go through validation. Third, the knowledge base is relatively static and shared, emphasizing structure and traceable references.
A minimal working directory layout:
agent_home/├── MEMORY.md # Long-term preferences, constraints, current project context├── USER.md # User profile: role, habits, taboos├── skills/│ └── <skill_name>/│ └── SKILL.md # A single skill, described in natural language└── wiki/└── <domain>.md # Domain knowledge, split by topic
3. Focus Two: Engineering Details of Memory and User Profiles
Memory is not about dumping entire conversations into one file. A practical approach has three layers: short-term context within a session, long-term preferences across sessions, and task-level working memory. Before writing to long-term memory, filter first and keep only signals that will change future behavior, such as output format preferences, tech stack constraints, and communication style taboos.
Three actions are worth mastering. First, compression: summarize lengthy history into structured entries so the context does not grow without bound. Second, conflict resolution: when a new preference contradicts an existing entry, define clear override rules with timestamps. Third, forgetting: expired or one-off information must be able to be retired, otherwise memory becomes a source of noise. The value of the user profile file is turning “repeated explanation” into “state it once, apply it long-term.”
4. Focus Three: Skills as Documents, the Highest-Leverage Thing to Learn First
Among the four capabilities, documenting skills is the longest lever. Each skill is a description file under the skill directory, written in natural language to spell out the applicable scenario, prerequisites, steps, failure fallback, and validation method, following an open skill description convention and loaded on demand rather than injected in full.
Why does it matter most? Because it turns a “one-time success experience” into a “reusable asset,” and the author of that asset can be the agent itself. Humans can edit it too; changes take effect immediately, and it can go into version control for review and rollback.
A skill file should include:
---name: Data cleaning pitfallswhen: Input contains missing values and outliers---1. Compute the missing rate first; if it exceeds the threshold, confirm the strategy with the user2. Mark outliers using the quantile method; do not delete them outright3. Provide a before-and-after comparison before outputFailure fallback: keep the original copy; in-place overwriting is forbidden
The learning focus is not syntax but writing quality: trigger conditions must be decidable, steps must be executable, and validation must be observable.
5. Focus Four: Closed-Loop Learning Workflow and Observability
The closed loop is “execute, record, distill, reuse, improve again.” After a task completes, distill a skill automatically; historical sessions support full-text search; next time a similar problem appears, retrieve before acting. At the start, draw this chain out and make the output and owner of each stage explicit.
Observability is also required learning: logging services record calls and latency, monitoring and alerting track failure rates, and a metrics dashboard shows skill hit rate and reuse counts. Without measurement, “getting stronger with use” is just a feeling.
6. Focus Five: Decoupling the Entry Point, Platform, and Model
The terminal is the most common workbench and needs multi-line editing, completion, history, streaming output, and interruption at any time; multi-platform deployment and containerized execution should also be supported. Keep the model side decoupled: it can go through an aggregation gateway or connect to services compatible with standard protocols. On Baidu AI Cloud, this is typically carried by model services and a container platform, with state files placed in object storage and paired with version management.
7. Suggested Learning Path
Week one: fully grasp state layering and the directory contract. Week two: hand-write three skills and validate reuse. Week three: integrate retrieval and measurement. Week four: switch across multiple models and multiple entry points. Keep one main thread in mind: what you are designing is the files and workflows that let capabilities accumulate, not changes to the model that will not change.
