← all repositories
kayba-ai/agentic-context-engine

Teaching AI Agents to Remember Their Mistakes

ACE adds a persistent learning loop to AI agents so they stop repeating the same mistakes every session.

2.5k stars Python AgentsLLMOps · Eval
agentic-context-engine
Not currently ranked — collecting fresh signals.
star history

What it does ACE wraps existing LLM agents in a feedback loop that records execution traces, extracts strategies from failures, and stores them in a persistent Skillbook. On subsequent runs, the agent retrieves relevant strategies before acting, which the authors claim improves consistency and cuts token use without fine-tuning or vector databases. It ships with ready-made runners for LiteLLM, LangChain, browser-use, and Claude Code, plus a hosted dashboard at kayba.ai.

The interesting bit The Recursive Reflector doesn’t just summarize logs—it writes and executes Python code in a sandbox to programmatically hunt for patterns, isolate errors, and iterate until it finds actionable insights. That turns post-mortem analysis from a narrative exercise into a programmatic debugging session.

Key highlights

  • Doubled pass^4 consistency on the Tau2 airline benchmark using 15 strategies learned without reward signals
  • Cut browser-automation token costs by 49% over a 10-run learning curve
  • Translated roughly 14,000 lines of Python to TypeScript via Claude Code for about $1.50, with zero build errors
  • Composable pipeline engine with requires/provides contracts and immutable context
  • Can ingest existing agent traces retroactively through the TraceAnalyser runner

Verdict Worth a look if you’re running repetitive agent workflows and tired of watching them hallucinate the same emoji questions. Probably overkill if your agents already nail every task on the first try.

Frequently asked

What is kayba-ai/agentic-context-engine?
ACE adds a persistent learning loop to AI agents so they stop repeating the same mistakes every session.
Is agentic-context-engine open source?
Yes — kayba-ai/agentic-context-engine is open source, released under the Apache-2.0 license.
What language is agentic-context-engine written in?
kayba-ai/agentic-context-engine is primarily written in Python.
How popular is agentic-context-engine?
kayba-ai/agentic-context-engine has 2.5k stars on GitHub.
Where can I find agentic-context-engine?
kayba-ai/agentic-context-engine is on GitHub at https://github.com/kayba-ai/agentic-context-engine.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.