1
0 Comments

Tired of fixing the same AI agent mistakes? I built a tiny Python library so it never happens again.

I’ve built a lot of AI agents — SQL bots, contract summarizers, email generators. And every single one had the same flaw:

They don’t learn.
You correct them once.
Next time? Same mistake. Again.

So I built something dead simple to fix it.

It’s a Python library that lets agents adapt to human feedback. You give feedback once, and that change is applied the next time a similar task comes in.

No retraining.
No fine-tuning.
No vector DBs.

Just this:
learner.save_feedback(task, feedback)
enhanced_prompt = learner.apply_feedback(task, base_prompt)

Why not RLHF or RLAIF?
Because it’s overkill for 99% of real-world agent tasks.
You don’t need to train models from scratch just to stop repeating bad formatting or logic. This solves it with simple prompt-level adaptation.

Example 1:
"Exclude refunded payments from revenue" → agent remembers and updates future SQL queries.

Example 2:
"Keep the email under 4 sentences and polite" → email generator adjusts tone next time.

Example 3:
"Always mention indemnity clauses in contract summaries" → never misses it again.

It works with any agent — OpenAI, Claude, DeepSeek — and drops cleanly into LangChain or custom flows.

GitHub: https://github.com/omdivyatej/Self-Learning-Agents
PyPI: https://pypi.org/project/dead-simple-self-learning/

If you're tired of correcting the same AI behavior over and over, this might help.
Open source. Feedback welcome. Please star the repo if you wish. This is just v1, more improvements coming coming soon.

on May 6, 2025