# The Three-Layer Agent-Improvement Taxonomy <!-- ref: @knowledge/frameworks/three-layer-agent-improvement type: framework tags: [AI improvement, agent failure, continual learning, taxonomy] triggers: [agent fails, need to improve performance, deciding on a fix] trigger_prompt: When an AI agent encounters a failure and you need to determine the best approach to implement a fix without incurring high costs. version: 2 updated_at: 2026-07-18T22:55:36.896Z --> Any agent fix lands in one of three layers — model, harness, or memory — and a good learning engine makes the smallest durable change at the right layer, not a reflexive fine-tune. *Synthesized from Soheil Feizi, Continual Learning for AI Agents (AI Engineer World's Fair 2026).* When an agent fails, the fix can go into one of three layers, in decreasing cost: - **Model layer** — change the weights. Methods: SFT (imitate correct trajectories, needs labeled samples), RL post-training (DPO, GRPO, RLVR — sample, score against reward/preference, reinforce winners), LoRA (bounds the changed parameters, making updates cheaper and safer). Most expensive; needs benchmarks + explicit evaluators. - **Harness layer** — prompts, skills, tools, code, workflow. Methods: trace-to-harness (a coding agent reads a log and edits the agent) and GEPA / prompt-search (mutate prompts, score candidates, keep winners). Flexible. - **Memory layer** — session or persistent facts (Letta, MemZero) plus skill distillation (compress a successful trajectory into a reusable how-to). Cheapest and fastest; works directly off a log + feedback. When to apply: deciding how to respond to any agent failure. The governing rule: ask for *the smallest durable change at the right layer* rather than defaulting to the most powerful (and most expensive/risky) lever. Most useful updates live in harness and memory, not weights — continual learning is not synonymous with fine-tuning. Caveat on the cheap layers: trace-to-harness edits and memory writes are cheap but *unverified* and can silently regress other cases, which is why the fix must be paired with a replay + regression check (see Verifiable Continual Learning). --- *Related: `@content/youtube/sequoia/rich-sutton-and-khurram-javed-why-ai-models-stop-learning-and-how-to-start-it-again` · `@content/youtube/sequoia/memory-and-continual-learning-engrams-dan-biderman-and-jessy-lin` · `@content/youtube/latent-space/every-product-of-the-future-will-be-a-living-system-ronak-malde-trajectory-ai` · `@knowledge/syntheses/harness-level-continual-learning-2026` · `@knowledge/frameworks/two-loop-model-training-flywheel`* --- *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).*