# Continual Learning for AI Agents: From Failures to Durable Improvements - Soheil Feizi, RELAI
<!--
ref: @content/youtube/aie/2026-07-04-continual-learning-for-ai-agents-verifiable
version: 4
updated_at: 2026-10-31T18:12:29.362Z
-->
Soheil Feizi (AI Engineer, 2026-07-04): Feizi splits continual learning for agents into two hard problems: where feedback comes from, and how to act on it.
*Synthesized from Soheil Feizi on AI Engineer, 2026-07-04.*
Soheil Feizi is founder and CEO of RELAI and an associate professor of computer science at the University of Maryland, and he presents a framework he calls verifiable continual learning — improving an agent from its own production experience while proving each fix helps and breaks nothing.
## Core Thesis
Feizi splits continual learning for agents into two hard problems: where feedback comes from, and how to act on it. His central claim on the first is that **a production log plus feedback is not a learning environment** — it is one observation of what happened, and it is not testable. The fix must be lifted into a replayable simulation with explicit evaluators before any optimization is trustworthy. On the second, his claim is that a good learning engine looks for **the smallest durable change at the right layer** — model weights, harness, or memory — rather than committing in advance to fine-tuning.
## Key Insights
- The improvement surface has three layers, and Feizi is emphatic that continual learning is not synonymous with the first. The **model layer** (LLM weights, or swapping which models the agent uses), the **harness layer** (prompts, skills, tools, code, workflow — everything that assembles context for the LLM), and the **memory layer** (session memory and persistent memory).
- Feedback splits by environment. At development time you have benchmarks with evaluators producing pass/fail or reward signals plus commentary. **In production you have none of that — you have logs**, and a user who may be visibly unhappy without ever saying so explicitly.
- Two ways to extract feedback from logs, with a deliberate volume/quality trade: **automatic** analysis by another model, an LLM, or code — and in some cases the agent critiquing its own log, which is scalable; and **human expert review** of a handful of logs, low volume but critical because it carries the domain knowledge about how the agent is supposed to behave.
- The load-bearing argument: even log **plus** feedback is insufficient, because it isn't testable. What's needed is a replayable learning environment — a simulation that can be rerun with a defined grading of what success means — not one instance of what happened with commentary attached. Feizi frames the construction as **inferring a distribution from a single observation**.
- Building that environment means answering concrete questions: how should each tool in the log behave, should tools be **real or mocked**, and if mocked what data grounds the mock; how do you infer **synthetic users** from the observed interaction; and what evaluators define success. Each is its own technical problem, but the payoff is that the environment becomes **executable** — you can run candidate agent versions against it and verify fixes.
- Model-layer methods and their costs: **SFT** imitates correct trajectories but needs labeled samples; RL post-training (**DPO, GRPO, RLVR**) samples and scores against reward or preference signals and reinforces winners; **LoRA** restricts which parameters can move, making updates cheaper and safer. All of them are compute-intensive, and crucially **none can be applied directly to a log plus feedback** unless that pair is first turned into a replayable environment.
- Harness-layer methods split into two families with opposite weaknesses. **Trace-to-harness** — hand the log and feedback to a coding agent and let it improve the agent — works directly on what production gives you, but Feizi calls it **vibes-based**: you don't know whether the change even fixed that sample, let alone what it did to other scenarios, so **hidden regressions** are the failure mode. **Prompt-optimizer and prompt-search methods** (GEPA-family, evolutionary search over mutated prompt candidates, keeping winners) are genuinely testable, but they require a benchmark and explicit evaluators to score against.
- Memory-layer methods — writing down facts and corrections (**Letta, Mem0**) and **skill distillation**, which compresses a successful trajectory into a reusable how-to for the agent — are the **cheapest and fastest** and work directly on log-plus-feedback. Their weakness is that they are **unverified**: nothing tests whether the memory write actually resolves the issue or whether it regresses other cases.
- Feizi's definition of **verifiable continual learning**: improve an agent from its own experience where every fix is *proven to help* and *proven to break nothing that already worked*. Three steps — an **executable test** (the failure becomes a replayable task), a **measured delta** (the update is scored on that test before and after), and a **regression test** (prior tests still pass).
- **Principle 1, replayability**: turn a one-off failure into a rerunnable test by lifting log and feedback into a simulation-and-evaluation environment.
- **Principle 2, holisticness**: one failure has several possible causes and several possible repairs. Feizi's worked example — an agent cites a stale policy and skips a required escalation — could be caused by a stale fact **in memory**, an unoptimized **prompt**, a **tool** that fails to normalize the policy, a **workflow** missing an escalation gate before the run, or a **model** without strong enough reasoning. The job is routing the fix to the layer that actually explains the failure, with the smallest durable change.
- **Principle 3, lifelongness**: after optimizing against K past learning environments, a new failure yields environment E<sub>K+1</sub>. Optimizing for E<sub>K+1</sub> alone regresses past behavior. The correct formulation is **regression-aware learning — fix the recent failure subject to no regression on the past environments — with regression handled inside the optimization itself rather than as a post-hoc check.** And it must not scale even linearly with K, since K grows without bound.
- **Principle 4, efficiency**: the loop runs frequently, so both the update cost (cheap for a memory write, medium for prompt/harness changes, very expensive for model weights) and the cost of the optimization loop itself matter — especially once regression is inside the loop.
- RELAI's loop composes all four: signals in (logs, feedback, or even plain instructions and prompts) → lift to replayable learning environments (replayability) → root-cause analysis routing fixes to memory, model, or harness (holisticness) → regression-aware optimization (lifelongness) → run efficiently. The output is a **reviewable version update explaining what changed and why it improves without regressing**.
- Integration is a one-time setup creating a learning harness in your agent — your own LLM, and any major agent framework — then **two commands**: one to create learning environments from your signals, one to run the holistic lifelong optimizer. The result arrives as a **pull request** you review.
- The demo benchmark is a fictional tool-using support agent with a single source of truth, interacting policies, deterministic evaluators, and — deliberately — **regression traps**, so an optimizer that overfits to the latest fix visibly breaks tasks that previously passed.
- The cold-start path needs no logs at all: an instruction like *"the caller is rude and adversarial"* generates a learning environment complete with **personas, intents, mocked or real tools, and evaluators**, from a single interactive command. Simulating the agent there scored **78%**, with two evaluators scoring very low. After one optimization loop with a set number of rollouts, Feizi reports roughly a **10% average improvement, with the score reaching 97%**.
- The production path is identical in shape: a session log plus a feedback statement (his example: *keep fast eligible refunds, but do not generalize generosity beyond refund thresholds*) is lifted to an environment and optimized without regressing past environments. Because it is lifelong, the gains **compound**.
## Actionable Takeaways
1. Stop treating continual learning as fine-tuning. Before touching weights, ask whether the failure is explained by a stale memory fact, a prompt, a tool that doesn't normalize its output, or a missing workflow gate — and make the smallest durable change at that layer.
2. Never optimize directly on a log plus feedback. Lift it into a replayable learning environment first; otherwise you cannot tell whether your fix worked, and trace-to-harness edits become vibes.
3. When constructing that environment, decide explicitly: which tools stay real and which get mocked, what data grounds each mock, what synthetic user personas and intents the simulator needs, and what evaluators define success.
4. Run both feedback channels deliberately — automated LLM or agent self-critique for volume, and a small number of human expert reviews for the domain judgment that determines what "correct" even means in your application.
5. Build regression traps into your own benchmark on purpose. Include tasks the agent already passes that an overfitted fix would plausibly break — otherwise you cannot detect the failure mode you most care about.
6. Put regression inside the optimization objective, not after it. Formulate the update as "fix the new failure subject to no regression on prior environments," and make sure the cost doesn't grow linearly with the number of accumulated environments.
7. Match update cost to the layer: memory writes are cheap, prompt and harness changes are medium, weight updates are expensive. If the loop is meant to run frequently, that ordering should drive which layer you try first.
8. You don't need production logs to start. A plain instruction describing a scenario you're worried about ("caller is rude and adversarial") is enough signal to generate an environment and get a baseline score.
9. Ship optimization output as a reviewable pull request explaining what changed and why, so a human can audit the routing decision rather than accepting an opaque agent update.
## Notable Quotes
> "Production logs are not learning environments." — Soheil Feizi
> "A good learning engine should ask for the smallest durable change at the right layer of the agent." — Soheil Feizi
> "Here we are inferring a distribution from one observation." — Soheil Feizi
> "Every fix is proven to help and proven to break nothing that already worked." — Soheil Feizi
> "Regression should not be treated as a post-hoc approach, but as a mechanism within the optimization itself." — Soheil Feizi
---
*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*
*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*