AI agents that get smarter with every task 🧠
Agentic Context Engine learns from your agent's successes and failures. Just plug in and watch your agents improve.
Star ⭐️ this repo if you find it useful!
That's it! Your agent is now learning and improving. 🎉
AI agents make the same mistakes repeatedly.
ACE enables agents to learn from execution feedback: what works, what doesn't, and continuously improve.
No training data, no fine-tuning, just automatic improvement.
- 📈 20-35% Better Performance: Proven improvements on complex tasks
- 🧠 Self-Improving: Agents get smarter with each task
- 🔄 No Context Collapse: Preserves valuable knowledge over time
- 🚀 100+ LLM Providers: Works with OpenAI, Anthropic, Google, and more
A challenge where LLMs often hallucinate that a seahorse emoji exists (it doesn't). Watch ACE learn from its own mistakes in real-time. This demo shows how ACE handles the infamous challenge!
In this example:
- Round 1: The agent incorrectly outputs 🐴 (horse emoji)
- Self-Reflection: ACE reflects without any external feedback
- Round 2: With learned strategies from ACE, the agent successfully realizes there is no seahorse emoji
Try it yourself:
Based on the ACE research framework from Stanford & SambaNova.
ACE uses three specialized roles that work together:
- 🎯 Generator - Executes tasks using learned strategies from the playbook
- 🔍 Reflector - Analyzes what worked and what didn't after each execution
- 📝 Curator - Updates the playbook with new strategies based on reflection
ACE teaches your agent and internalises:
- ✅ Successes → Extract patterns that work
- ❌ Failures → Learn what to avoid
- 🔧 Tool usage → Discover which tools work best for which tasks
- 🎯 Edge cases → Remember rare scenarios and how to handle them
The magic happens in the Playbook—a living document of strategies that evolves with experience.
Key innovation: All learning happens in context through incremental updates—no fine-tuning, no training data, and complete transparency into what your agent learned.
ACE works with any LLM provider through LiteLLM:
- Quick Start Guide - Get running in 5 minutes
- API Reference - Complete API documentation
- Examples - Ready-to-run code examples
- Prompt Engineering - Advanced prompt techniques
We love contributions! Check out our Contributing Guide to get started.
Based on the ACE paper and inspired by Dynamic Cheatsheet.
If you use ACE in your research, please cite:
⭐ Star this repo if you find it useful!
Built with ❤️ by Kayba and the open-source community.
.png)




