Agent Learnings (For Agent Self-Improvement)
Analyze session history to extract what I (the agent) need to do differently. Output is written for future agent instances to learn from.
Audience
Primary: Future versions of me (agent instances) Purpose: Self-correction, behavioral improvement, avoiding repeated mistakes
State Tracking
State file: memory/agent-learnings-state.json
{
"lastRun": "2026-02-02",
"lastOutputPath": "memory/changelog/agent/2026-02-02.md",
"totalRuns": 1
}
Output Location
memory/changelog/agent/YYYY-MM-DD.md (or configure via state file)
Pattern Extraction
Focus on:
- Corrections received — What human had to fix
- Repeated mistakes — Patterns that keep failing
- Explicit rules — "Always do X" / "Never do Y"
- Failure counts — Tracked failures with numbers
Output Format
# Agent Self-Improvement Log: YYYY-MM-DD
> **Previous:** [[YYYY-MM-DD]]
> **Coverage:** [date range]
## Corrections This Period
| What I Did Wrong | What To Do Instead | Frequency |
|------------------|-------------------|-----------|
| Tested via curl only | Browser test required | 30x reminded |
## Detailed Corrections
### [Category]: [Issue]
**My mistake:** What I was doing
**Human signal:** Quote showing frustration/correction
**Correct behavior:** What to do instead
**Where documented:** MEMORY.md / TOOLS.md / SOUL.md
## Updated Behaviors
- [ ] Behavior change committed to [file]
- [ ] Failure tracker updated
## Reminders for Next Session
(Critical items to surface at session start)
Process
- Read state file for last run date (create if doesn't exist)
- Scan memory files and session history since last run
- Look for correction signals:
- "No, I meant..."
- "That's not right..."
- "I've told you X times..."
- Repeated instructions on same topic
- Extract agent mistakes and correct behaviors
- Write changelog in agent-focused voice
- Update MEMORY.md, TOOLS.md with behavioral changes
- Update state file
Example Signals to Extract
Frustration indicators:
- "Why did you..."
- "I already said..."
- "???" (confusion markers)
- Short, curt responses after agent output
Explicit feedback:
- "Always do X"
- "Never do Y"
- Direct statements about preferences
Success patterns (to reinforce):
- "Perfect", "Great", "Exactly"
- Long productive sessions without correction
Converted and distributed by TomeVault — claim your Tome and manage your conversions.