# "Agent Experts Finally Agents That ACTUALLY Learn"
<!--
ref: @content/youtube/indy-dev-dan/2025-12-15-agent-experts-finally-agents-that-actually-learn
triggers: [agents forget previous tasks, need for continuous learning, high-stakes decision making, repetitive manual workflows]
trigger_prompt: When you want your agents to not only execute tasks but also learn and adapt from their experiences, ensuring they remain up-to-date with the evolving codebase.
version: 4
updated_at: 2026-10-31T18:12:55.652Z
-->

From Indy Dev Dan, 2025-12-15: Generic agents execute and forget; agent experts execute and learn.

Indy Dev Dan walks through his "agent expert" pattern — a self-improving template metaprompt built on top of a meta-agentics stack (meta-prompts, meta-agents, meta-skills).

## Core Thesis
Generic agents execute and forget; agent experts execute and learn. The defining trait isn't memory files, sub-agents, or skills — it's a self-directed learning loop where the agent maintains and updates its own "expertise file" (a mental model of a problem space) and validates that model against the actual code, which remains the only source of truth. Without the self-improve step, every meta-tool is just acting expert, not being one.

## Key Insights
- **Memory files, prime prompts, and skills aren't enough** — they're global, manually updated, and can't break rules contextually. They make agents capable, not expert.
- **Meta-agentics is the foundation**: meta-prompts (prompts that write prompts), meta-agents (agents that build agents), and meta-skills (skills that build skills) should live in every codebase.
- **Expertise file = mental model, not source of truth.** Stored under `.claw/commands/experts/`, it's loaded *first* so the agent knows where things live before touching code — then validated against the actual code.
- **Three-step agentic workflow: Plan → Build → Self-Improve.** The self-improve step is the differentiator — it keeps the expertise file in sync as code changes, with no human in the loop.
- **Context delegation protects the orchestrator.** A plan step can burn 80k tokens in a sub-agent while the top-level agent's context stays lean, only receiving the returned plan/diff.
- **Compute scaling via parallel experts.** Running the same prompt across 3/5/10 experts produces consensus when correctness matters more than speed; redundancy means "sometimes only one makes it" but finds what others missed.
- **The Core Four**: Context, Model, Prompt, Tools. Skills vs. sub-agents vs. MCP — the abstractions don't matter; the foundational units do.
- **Rule of three**: three repetitions marks a pattern worth automating with a meta-prompt.

## Actionable Takeaways
1. Build an `experts/` directory of domain-specific expert agents (database, websocket, API), each paired with an expertise/mental-model file the agent reads before any work.
2. Structure every expert prompt to: (1) load the expertise file, (2) validate assumptions against the actual codebase, (3) only then report.
3. Always chain a self-improve step after build — without it, expertise rots as the codebase drifts.
4. For high-stakes questions, fan out to N parallel expert agents and synthesize results rather than trusting a single run.
5. Keep the top-level orchestrator's context lean — pass only artifacts (plans, diffs) between sub-agents to extend the agent horizon.
6. Maintain a meta-agentics stack (meta-prompts, meta-agents, meta-skills) as table stakes in every codebase.
7. Focus expert agents on the *one problem that matters most* to the business, not every problem.
8. Trigger automation on the third repetition of any manual workflow.

## Notable Quotes
> "Your agents forget. And that means your agents don't learn."

> "One executes and forgets, the other executes and learns."

> "Agent experts must learn on their own."

> "The expertise file is the mental model of the problem space for your agent expert."

> "The true source of truth is always the code… not the comments, not the documentation, not the plans."

> "There's no searching here. There's just validating its mental model."

> "Instead of having one agent answer something for you, have three, have five, have 10, depending on how important it is that the answer is correct."

> "Three times marks a pattern."

> "We are reducing and delegating our context."

> "I always focus on the foundational units... Context, model, prompt, tools, the core four."

---

*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).*