Self-reflecting AI agent that learns from corrections, stores preferences locally, and permanently improves through tiered memory management.
npx clawhub@latest install self-improvingSelf-Improving Agent adds a persistent learning loop to your AI agent: it evaluates its own output, logs user corrections, and stores distilled lessons in a structured local memory system at ~/self-improving/. Knowledge is organized into hot, warm, and cold tiers so the most relevant patterns are always in context without bloating memory. Unlike one-session memory, improvements compound permanently — the agent gets measurably better at your specific workflows over time without manual maintenance.
npx clawhub@latest install self-improvingClick the Install button at the top of this page for one-click setup
~/self-improving/ is not permitted or possible.Memory is split across three tiers: memory.md (HOT, ≤100 lines, always loaded), per-project and per-domain files (WARM, loaded on context match), and an archive (COLD, loaded on explicit query). This keeps the most relevant knowledge in context without exceeding limits.
Patterns used 3 times in 7 days are automatically promoted to HOT storage. Unused patterns decay to WARM after 30 days and archive to COLD after 90 days. Nothing is deleted without explicit user confirmation.
After completing multi-step tasks, receiving feedback, or fixing bugs, the agent pauses to evaluate: did the outcome meet intent, what could be better, and is this a repeatable pattern? Lessons are logged in a structured format and promoted by the same rules as user corrections.
The agent recognizes correction signals ("No, that's wrong", "I told you before…", "Stop doing X") and preference signals ("I like when you…", "Always do X") and routes them to the correct memory tier automatically. One-time or context-specific instructions are intentionally ignored.
Project-specific patterns stay in projects/{name}.md, global preferences in HOT, and domain patterns (code, writing) in domains/. When patterns conflict, the most specific and most recent rule wins — with a prompt to the user if ambiguity remains.
Every action sourced from memory cites its file and line (e.g., "Using X (from projects/foo.md:12)"). A weekly digest of learned, demoted, and archived patterns is available on demand. The skill never stores credentials, health data, or third-party information, and never reads files outside ~/self-improving/.
A developer corrects the agent's formatting or architecture choices once. The agent logs the correction to corrections.md, and after the third recurrence promotes it to domains/code.md. Future sessions apply the rule automatically without reminders.
For a multi-week project, the agent stores conventions, naming decisions, and workflow preferences in projects/{name}.md. Each session loads that warm-tier file when the project is mentioned, keeping the agent consistently aligned with project rules.
After generating a multi-file feature or a long document, the agent reflects on whether spacing, structure, or tone could have been better, logs a lesson, and applies it the next time a similar task is triggered — without the user having to point out the same issue twice.
A user states "I prefer concise replies with no preamble." The agent logs this as a global HOT preference and cites it on every response, ensuring the style is maintained across all future conversations without re-stating the preference.
npx clawhub@latest install self-improvingLog in to write a review
No reviews yet. Be the first to share your experience!