adaptive-learning-agentsCapture, store, and retrieve errors, corrections, and best practices locally to continuously improve AI agent workflows and knowledge.
Install via ClawdBot CLI:
clawdbot install vedantsingh60/adaptive-learning-agentsLearn from errors and corrections in real-time. Continuously improve by capturing failures, user feedback, and successful patterns.
Free and open-source (MIT License) β’ Zero dependencies β’ Works locally
Working with Claude or any AI agent means encountering:
But there's no systematic way to learn from these moments and apply the knowledge next time.
Adaptive Learning Agent captures every error, correction, and successful pattern automatically. Then retrieves relevant learnings before tackling similar problems again.
1. Record Learnings
agent.record_learning(
content="Use claude-sonnet for 90% of tasksβfaster and cheaper",
category="technique",
context="Model selection"
)
Capture successful patterns, insights, and best practices.
2. Record Errors
agent.record_error(
error_description="JSON parsing failed on null values",
context="Processing API response",
solution="Add null check before parsing"
)
Document failures and solutions automatically.
3. Search & Retrieve Learnings
results = agent.search_learnings("JSON parsing")
recent = agent.get_recent_learnings(limit=5)
by_category = agent.get_learnings_by_category("bug-fix")
Find relevant knowledge instantly when you need it.
4. View Summaries
summary = agent.get_learning_summary()
print(agent.format_learning_summary())
Understand what you've learned at a glance.
β Zero dependencies - Pure Python, works everywhere
β Local-only storage - All data on your machine, no uploads
β MIT Licensed - Free to use, modify, fork, redistribute
β Automatic categorization - Errors become learnings
β Search and filter - Find knowledge by keyword or category
β Export capability - Share learnings as JSON
β No API keys - Works without any external credentials
from adaptive_learning_agent import AdaptiveLearningAgent
# Initialize agent
agent = AdaptiveLearningAgent()
# Day 1: Discover a bug
agent.record_error(
error_description="Anthropic API rejects prompts with excessive newlines",
context="Testing prompt with formatted lists",
solution="Use \\n.strip() to clean whitespace before sending"
)
# Day 2: Same bug, but now you have the solution
similar_errors = agent.search_learnings("newlines")
# Result: [Previous learning with solution] β
# Week 1: Document successful pattern
agent.record_learning(
content="Always use temperature=0 for deterministic output in tests",
category="best-practice",
context="Prompt engineering"
)
# Get weekly summary
summary = agent.get_learning_summary()
print(f"You've recorded {summary['total_learnings']} learnings this week!")
print(f"Resolved {summary['error_statistics']['resolved']} errors")
No installation needed! The skill is pure Python with zero dependencies.
# Copy the adaptive_learning_agent.py file to your project
# Or import it directly:
from adaptive_learning_agent import AdaptiveLearningAgent
Record bugs you find and their fixes. Next time you hit a similar error, you have the solution ready.
agent.record_error(
error_description="Port 8000 already in use",
context="Running local dev server",
solution="Use `lsof -i :8000` to find process, then kill it"
)
Keep track of prompting techniques that work for your specific use cases.
agent.record_learning(
content="Chain-of-thought works better for math problems, direct answers for facts",
category="technique"
)
Remember quirky behaviors and workarounds for each provider.
agent.record_learning(
content="OpenAI API requires explicit 'assistant' role messages",
category="api-endpoint",
context="Chat completion endpoint"
)
Export learnings and share with your team or future projects.
agent.export_learnings("team_learnings.json")
# Share this file with teammates
Before major tasks, review what you've learned to avoid repeating mistakes.
summary = agent.get_learning_summary()
unresolved = summary['error_statistics']['unresolved']
if unresolved > 0:
print(f"β οΈ {unresolved} unresolved errorsβreview before proceeding")
When recording learnings, choose from these categories:
| Category | Use For |
|----------|---------|
| technique | Working methods, approaches, strategies |
| bug-fix | Solutions to errors and problems |
| api-endpoint | API-specific behaviors and quirks |
| constraint | Limits, boundaries, restrictions |
| best-practice | Recommended patterns and standards |
| error-handling | How to handle specific types of errors |
When recording learnings, specify the source:
user-correction - User told you something was wrongerror-discovery - You found the solution to an errorsuccessful-pattern - You discovered something that works welluser-feedback - User suggested an improvementrecord_learning(content, category, source, context)Record a successful pattern or insight.
Parameters:
content (str, required): What was learnedcategory (str): One of the category types abovesource (str): One of the source types abovecontext (str): Optional context about where this appliesReturns: Learning object with ID and timestamp
record_error(error_description, context, solution, prevention_tip)Record an error and optionally its solution.
Parameters:
error_description (str, required): What went wrongcontext (str, required): What was being attemptedsolution (str): How to fix itprevention_tip (str): How to avoid itReturns: Error object with ID
search_learnings(query)Search learnings by keyword or category.
Parameters:
query (str): Search termReturns: List of matching Learning objects (sorted by relevance)
get_recent_learnings(limit)Get the most recent learnings.
Parameters:
limit (int): Number to return (default: 10)Returns: List of Learning objects, newest first
get_learning_summary()Get comprehensive summary of learnings and errors.
Returns: Dictionary with statistics and recent items
export_learnings(output_file)Export all learnings and errors to JSON file.
Parameters:
output_file (str): Path to save JSON (default: "learnings_export.json").adaptive_learning/ on your machineThis is MIT Licensed and community-maintained. You're encouraged to:
MIT License - Free and open-source
Use, modify, fork, and redistribute freely. See LICENSE.md for full details.
Copyright Β© 2026 UnisAI Community
Last Updated: February 14, 2026
Current Version: 1.0.0
Status: Active & Community-Maintained
Free to use, modify, and fork. No restrictions.
Generated Mar 1, 2026
Developers record recurring bugs and their fixes, such as API errors or environment issues, enabling quick retrieval of solutions when similar problems arise during coding sessions. This reduces debugging time and improves code quality by preventing repeated mistakes.
AI practitioners document effective prompting techniques and model behaviors, like temperature settings or chain-of-thought strategies, to refine interactions with AI agents. This helps in creating more efficient and reliable prompts for tasks like content generation or data analysis.
Teams track quirks and workarounds for various APIs, such as authentication issues or rate limits, to streamline integration processes. This ensures smoother development cycles and reduces downtime caused by unexpected API behaviors.
Organizations export and share recorded learnings across projects or departments, fostering collective problem-solving and onboarding new members faster. This enhances collaboration and reduces knowledge silos in distributed teams.
QA engineers log test failures and resolutions, such as edge cases or environment-specific bugs, to build a repository of known issues. This accelerates future testing cycles and improves product reliability by preemptively addressing common pitfalls.
Offer a free version with basic features like local storage and error recording, then charge for advanced capabilities such as cloud sync, team collaboration, or analytics dashboards. This attracts individual users and converts them to paid plans for enterprise needs.
Sell licenses to companies for integrating the skill into their internal development or AI workflows, with added support, customization, and security features. This targets large organizations seeking to optimize team productivity and reduce operational errors.
Provide consulting and training services to help businesses implement and maximize the skill's usage, such as setting up learning repositories or optimizing prompt engineering. This leverages expertise to generate revenue beyond the tool itself.
π¬ Integration Tip
Start by importing the agent into existing Python projects and use simple record and search functions to capture common errors, then gradually expand to team-wide sharing for broader impact.
Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Clau...
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
Search and analyze your own session logs (older/parent conversations) using jq.
Typed knowledge graph for structured agent memory and composable skills. Use when creating/querying entities (Person, Project, Task, Event, Document), linking related objects, enforcing constraints, planning multi-step actions as graph transformations, or when skills need to share state. Trigger on "remember", "what do I know about", "link X to Y", "show dependencies", entity CRUD, or cross-skill data access.
Ultimate AI agent memory system for Cursor, Claude, ChatGPT & Copilot. WAL protocol + vector search + git-notes + cloud backup. Never lose context again. Vibe-coding ready.
Headless browser automation CLI optimized for AI agents with accessibility tree snapshots and ref-based element selection