Growable Agents: Memory, Evaluation, and Skill Accumulation
This article explores how to evolve AI agents from stateless tool orchestrators into growable systems through effective state management. It covers layered memory design, executable skill accumulation, feedback loops, and governance, providing a practical roadmap for building agents that learn from experience while remaining auditable and secure.
Moving agents from “listen once, do one task” to “remember what was done and perform more reliably next time” relies on state management, not just slogans. Many demo agents are essentially stateless tool orchestrations: they receive a goal, select a tool, return a result, and discard intermediate judgments when the session ends. This suits tasks with clear boundaries, high repeatability, and low failure costs. However, once tasks span multiple days, depend on organizational routines, or require error convergence, stateless agents will repeatedly need to be taught the same things, leading to prompt bloat and unstable results.
Growth does not mean modifying model weights online. A more robust engineering approach is to write reviewable experience into external states without altering the base model, and to retrieve and constrain its use in subsequent tasks based on permissions. Growth should manifest as fewer repetitive clarifications, higher first-pass success rates, and more explainable decision bases, rather than unauditable “self-learning.”
1. Two Execution Models
Tool-based execution emphasizes correctness for the current task. Input, tool return, and final reply form a closed loop, retaining no preferences, failure reasons, or business specs by default. Its advantages are simple implementation, good isolation, and easy horizontal scaling; its disadvantage is the inability to accumulate implicit rules (e.g., specific field specs for certain reports, prohibition of automatic changes in certain environments, or the requirement to add tests for certain code).
Growable execution adds three edges to this loop: write, retrieve, and evaluate. “Write” determines what information is worth keeping; “retrieve” decides when and at what granularity to put it back into the context; “evaluate” determines if this action was better than the last and whether erroneous experiences should be downweighted or deleted. Memory without evaluation is just log accumulation, feeding outdated practices back to the model.
2. Layered Memory Instead of Chat Log Piles
Storing entire conversations as-is into a database is expensive and noisy. A more reasonable approach is to layer memory by timeliness and credibility.
Working memory only serves the current task: goals, constraints, tools called, incomplete steps, and pending assumptions. Upon task completion, summaries can be archived, while raw trajectories are kept short-term for compliance and troubleshooting, not for default recall.
Episodic memory records “what was done”: task types, key decisions, user-confirmed trade-offs, failures, and rollbacks. It answers why something was done at the time, rather than treating all intermediate outputs as absolute truth.
Semantic memory accumulates stable facts and specs: terminology definitions, environment boundaries, and approved operating procedures. Before writing, there should be a source and update time to avoid solidifying a one-time guess into a long-term rule.
Procedural memory, or skills, saves reusable practices: checklists, input-output contracts, preconditions, and stop conditions. It should be versionable and human-reviewable, not hidden in unreadable long prompts.
During retrieval, filter first by task type and permissions, then sort by relevance, and limit the injection length. Memory entries should carry source, time, and applicability scope; expired, conflicting, or low-confidence entries default to not entering the decision path, visible only in the audit view.
3. Executable and Deprecable Skill Accumulation
“Doing better next time” relying solely on longer system prompts quickly becomes unmaintainable. Skills are better designed as small, explicit procedures: applicable scenarios, inapplicable scenarios, required inputs, allowed tool categories, completion criteria, and fallback strategies upon failure. The model plans within the procedure and is not responsible for arbitrarily expanding permissions.
A skill’s lifecycle should include proposal, trial, promotion, degradation, and deprecation. One success is not enough for promotion; it should at least be benchmarked against a baseline on several similar tasks to see if it reduces rework or introduces new error types. Outdated skills must be able to be taken offline; otherwise, the system will stubbornly execute old processes.
As an illustration, a skill does not need to bind to any specific product, only expressing a contract:
- Name and version: Explaining which set of practices this is
- Trigger conditions: Which tasks can use it
- Constraints: Which operations require manual confirmation
- Step highlights: Sequence of check, execute, verify
- Completion criteria: What counts as done and reviewable
4. Feedback Loops Are More Important Than “Remembering”
Growth comes from comparison, not just storage. After each task, at least three types of signals should be left: whether the result was accepted, which step caused rework, and which memory or skill was actually used. Accepted results can be distilled into candidate rules; rejected results should record the reason to avoid repeating them with higher confidence next time.
Evaluation should not blindly trust a single automatic score. For tasks with side effects like writing code, modifying configs, or sending notifications, verifiable checks should dominate: whether tests pass, whether diffs are within scope, whether forbidden operations were touched, and whether confirmation was obtained. Subjective preferences can be recorded but should not override hard constraints.
Metrics should be few and stable: repeat clarification count, first-pass success rate, human takeover rate, rollback count, and the adoption rate after a memory hit. These metrics describe process quality and cannot be packaged as absolute cross-scenario performance promises. Task difficulty varies greatly, so horizontal comparisons must specify samples and criteria.
5. Context, Cost, and Consistency
More memory is not automatically better. Context windows are limited; irrelevant memory occupies the task’s space and increases API costs. In practice, prioritize summaries and expand raw text on demand; keep only the latest valid version of the same fact, archiving old versions instead of injecting both.
During multi-session concurrency, write conflicts must be handled. If two tasks update the same spec simultaneously, use version numbers or optimistic locking to reject silent overwrites. Personal preferences and team specs must be stored separately: personal habits cannot override release processes and security policies.
6. Permissions, Privacy, and Failure
A growable system holds more sensitive information than stateless calls, making memory itself a data asset. Default to minimal collection: keys, tokens, PII, and unpublished business data should not enter long-term memory; necessary content must be encrypted, access-controlled, and deletable. Cross-project retrieval should isolate tenants and roles to prevent internal agreements from Task A being recalled by Task B.
Models might write memory incorrectly or treat an exception as a rule. Mitigations include: structured extraction with confidence scores before writing; mandatory human confirmation for high-impact rules; prioritizing current explicit instructions and security policies when retrieved results conflict with current commands; and providing one-click forget and scope-level undo. For tools with side effects, memory can only suggest steps, not replace approvals.
7. Implementation Sequence
There is no need to build full “self-evolution” from day one. Roll out by risk, from low to high: start with task summaries and retrievable logs to make failures reviewable; then consolidate recurring, confirmed practices into a skill list; next, add automatic checks and human spot-checks for critical tasks; finally, consider cross-session preferences and long-term specs. At each step, it should be possible to turn off memory injection and fall back to stateless execution to compare benefits.
If running in the cloud, general capabilities are usually sufficient for this path: object storage for traces and versioned skills, message queues for async evaluation, container platforms for isolated execution environments, and logging/monitoring to observe hit rates, failure rates, and abnormal writes. These are category-level capabilities; specific quotas, interfaces, and billing depend on the official documentation of the actual chosen service and should not be assumed based on concepts.
8. Conclusion
Topping leaderboards or going viral does not prove an agent framework is reliable. The truly reusable difference is: stateless tools excel at single-shot completion, while growable systems turn experience into bounded, evaluable, and revocable state. Designing four things clearly—what to remember, when to use it, how to prove improvement, and how to delete it upon error—will move agents from repetitive teaching to stable reuse. Merely adding a memory store without evaluation and permissions will turn growth into a harder-to-clean historical burden.
