01: Self-Improving Debugger¶
Overview¶
An AI debugging agent that learns from each bug it encounters, building an evolving knowledge base of solutions. Each time the same error is encountered, OntoMem consolidates previous experiences using LLM-powered merging to generate better solutions.
Theme¶
Error Learning & Consolidation
Strategy¶
LLM.BALANCED merge with intelligent consolidation
Key Features¶
- ✅ Multiple error encounters of the same type
- ✅ LLM-based intelligent merging of solutions
- ✅ Cross-encounter learning and synthesis
- ✅ Memory persistence for future debugging sessions
- ✅ Progressive refinement of debugging wisdom
Data Structure¶
DebugLog¶
error_id: str # Unique error identifier
error_type: str # Type of error
error_message: str # Error message
stack_trace: str | None # Stack trace
solutions: list[str] # Multiple solutions found
attempted_fixes: list[str] # Fixes tried so far
root_cause: str | None # Inferred root cause
Use Case¶
AI Development & Debugging: A debugging assistant that learns from each error, automatically consolidates solutions, and synthesizes debugging wisdom to help developers solve problems faster.
Benefits: - Automatic knowledge accumulation - Cross-project error pattern recognition - Synthesized best practices over time - Reduced time to resolution
Running the Example¶
cd examples/
python 01_self_improving_debugger.py
Output¶
Results are stored in temp/debugger_memory/:
- memory.json: Consolidated error records with merged solutions
- metadata.json: Schema and statistics
What You'll Learn¶
- Error Consolidation: How to merge information from multiple error encounters
- LLM-Powered Merging: Using LLM to intelligently synthesize conflicting solutions
- Cross-Encounter Learning: Building wisdom from multiple similar problems
- Memory Persistence: Saving and retrieving consolidated knowledge
Related Concepts¶
Next Examples¶
- 02: RPG NPC Memory - Field-based profile building
- 04: Multi-Source Fusion - Advanced conflict resolution