The Agent That Trains Its Replacement: Inside icarus-plugin
Moving beyond simple RAG, this Hermes extension uses a local Markdown filesystem to help AI agents evaluate their own work and automatically fine-tune their cheaper successors.

Self-memory and replacement models for Hermes agents. Remember your work. Train your replacement.
- Icarus shifts agent memory from simple context retrieval to an automated model distillation pipeline.
- The system abandons vector databases for a human-readable Markdown filesystem that integrates natively with Obsidian.
- Autonomous hooks monitor agent decisions and automatically flag high-value outcomes for fine-tuning without explicit tool calls.
Building Wings to Escape the API
Most AI agent memory systems are built to solve amnesia. They use vector databases and retrieval-augmented generation to ensure the agent remembers what happened yesterday. Icarus operates on a completely different, much more ambitious thesis. An agent should not just remember its work. It should use its successful workflows to generate the training data needed to make itself obsolete.
It is an automated model distillation pipeline disguised as a memory plugin. Icarus turns expensive parent model API calls into training data for cheaper, faster, fine-tuned replacement models using tools like fabric_eval and fabric_switch_model.
The Database is Just Markdown
Icarus rejects opaque vector embeddings. The author built the "Fabric" as a local directory of Markdown files with YAML frontmatter. This creates a Directed Acyclic Graph of memories. Humans can natively browse and edit this graph using Obsidian, establishing a seamless human-in-the-loop verification process.
| Feature | Standard RAG Memory | Icarus Protocol Memory |
|---|---|---|
| Storage | Opaque Vector Embeddings | Plaintext Markdown & YAML |
| Human Auditability | Requires querying a DB | Natively readable in Obsidian |
| Relational Mapping | Nearest-neighbor proximity | Explicit DAG (review_of, revises) |
| End Goal | Better prompt context | Automated dataset generation |
The Autonomous Observer
The elegance of Icarus lives in its hooks. Instead of relying on the LLM to remember to call a save tool, a background observer silently watches the agent in hooks.py.
It monitors token overlap to detect topic shifts, triggering automatic recall. It uses regex to scan assistant responses for successful outcomes, automatically flagging them for the training pipeline without distracting the agent with explicit tool schemas.
The End of the Goldfish Era
Contextualizing Icarus within the broader landscape of agent development reveals a shift. Simply doing work should automatically generate the data needed to make that work cheaper and faster in the future. We are moving from prompt engineering to automated model distillation.