Agentic Context Engine (ACE)
ACE is the open-source engine that adds a persistent learning loop.
Verified
Core facts
Read by a script from the official API, not rewritten by a model.
- License
- Apache-2.0
- Languages
- Python
- Maintainer
- kayba-ai
- Homepage
- https://www.kayba.ai
- Verified
What it is
ACE is the open-source engine that adds a persistent learning loop. ACE also powers Kayba, the managed service that does this for your production agents automatically. ACE is based on the ACE paper (Stanford & SambaNova) and Dynamic Cheatsheet. ACE is built by Kayba and the open-source community.
Main features
ACE maintains a Skillbook, a persistent collection of strategies that evolves with every task.
3 specialized roles manage the learning loop.
Instead of summarizing traces in a single pass, the Recursive Reflector writes and executes Python code in a sandboxed environment to programmatically search for patterns, isolate errors, and iterate until it finds actionable insights.
These roles are backed by PydanticAI agents with structured output validation.
ACE is built on a composable pipeline engine.
Getting started
Using ACE involves no fine-tuning, no training data, and no vector database.
uv add ace-frameworkace setup # Walks you through model selection, API keys, and connection validationexport OPENAI_API_KEY="your-key" # or ANTHROPIC_API_KEY, or any of 100+ supported providersfrom ace import ACELiteLLM
agent = ACELiteLLM(model="gpt-4o-mini")
# First attempt — the agent may hallucinate
answer = agent.ask("Is there a seahorse emoji?")
# Feed a correction — ACE extracts a strategy and updates the Skillbook
agent.learn_from_feedback("There is no seahorse emoji in Unicode.")
# Subsequent calls benefit from the learned strategy
answer = agent.ask("Is there a seahorse emoji?")
# Inspect what the agent has learned
print(agent.get_strategies())Who it is for
The Agent role executes tasks, enhanced with Skillbook strategies. The Reflector role analyzes execution traces to extract what worked and what failed. The SkillManager role curates the Skillbook by adding, refining, and removing strategies.
The Core runner provides a full learning loop with batch epochs and evaluation. The Trace Analyser runner learns from pre-recorded traces without re-running tasks. The Claude Code runner covers Claude Code CLI tasks with learning.
The pipeline engine is framework-agnostic, with requires and provides contracts, immutable context, and error isolation. The kayba command is a cloud CLI to upload traces, fetch insights, and manage prompts. The ace-mcp command is an MCP server for IDE integration.
The tau2-bench benchmark by Sierra Research consists of airline domain tasks requiring tool use and policy adherence. In that benchmark, a Claude Haiku 4.5 agent had strategies learned on the train split with no reward signals and was evaluated on the held-out test split. The translation had 119 commits.
The ace setup command runs interactive setup covering model selection, API keys, and connection validation. The ace config command shows the current configuration.
Sources
This page is written from the official sources below. Open them to check the original text.
- GitHub READMEhttps://github.com/kayba-ai/agentic-context-engineFetched
Verified ·
This page is written by AI from the official sources above and checked automatically. This site has not tested it. Found a mistake? Tell us.