So I built slagent — a CLI that sits in the background, watches your agent sessions, and learns from them.
How it works:
1. It monitors agent log directories and records events — file edits, commands run, test failures, your corrections 2. When you run /review, it sends the session to an AI that identifies patterns like repeated failures, unnecessary retries, or missing project context 3. Each suggestion comes with a target file, rationale, and confidence score. You approve or reject, and approved rules get written into your instruction files automatically (with backups)
Currently supports Claude Code and Codex. Everything is stored locally in ~/.slagent/.
npm install -g self-learning-agent
Still early (v0.1.0) — I'd appreciate feedback on the approach and what you'd want to see next.