ACE Context Learning Engine
Turns agent feedback and execution traces into reusable strategies.
- Source repo
- kayba-ai/agentic-context-engine
- Stars
- ★ 2.6k
- Last updated
- 1mo ago
- License
- Apache-2.0
- Primary language
- Python
- FA score
- 51/100 · Major gaps
At a glance
- How it runs
- Works with
- Universal · cross-platformClaude Code · OpenAI API · Claude API
- Cost
- Free software; you pay for model usage
- Setup effort
- Low · running in minutes
- You'll need
- Typical use
- A Python developer whose question-answering or tool-using agent receives human corrections and needs those corrections to influence later requests.
- Not a fit if
- Users who want a no-code tool rather than a Python library
- Teams unwilling to run sandboxed auto-generated Python
- Source review
- 51/100 · Major gaps
What does this agent do, and when should you use it?
Agentic Context Engine (ACE) is an open-source Python engine for adding a persistent learning loop to AI agents. It stores strategies in a persistent Skillbook and divides work among an Agent, Reflector, and SkillManager for execution, trace analysis, and strategy curation. Its Recursive Reflector writes and runs Python in a sandboxed environment to search traces for patterns, isolate errors, and derive actionable insights. The repository offers ACELiteLLM, ACE, TraceAnalyser, BrowserUse, LangChain, and ClaudeCode runners, plus a composable pipeline system. It can be used as a library in a Python project and exposes ace, kayba, and ace-mcp commands; Kayba is the managed service powered by the engine.
With ACELiteLLM, an application calls .ask() to invoke a model, then passes a correction to .learn_from_feedback(); ACE extracts a strategy, updates the Skillbook, and makes the strategy available to later .ask() calls. For existing logs, agent.learn_from_traces(your_existing_traces) provides a path to learn from recorded traces without rerunning tasks. A full learning flow can combine AgentStep, EvaluateStep, ReflectStep, UpdateStep, and DeduplicateStep, or use learning_tail() for the standard tail sequence. The environment sends a trace to the Reflector; the Recursive Reflector executes Python analysis in a sandbox, and the SkillManager adds, refines, or removes Skillbook strategies. The CLI supports ace setup for model and key configuration, ace models for model and pricing search, ace validate for connection testing, and kayba for trace upload, insight retrieval, and prompt management.
- A Python developer whose question-answering or tool-using agent receives human corrections and needs those corrections to influence later requests.
- A team with historical agent logs that wants to extract reusable strategies through learn_from_traces() instead of rerunning the original tasks.
- A developer using browser-use for browser automation who wants repeated runs to improve through accumulated strategies.
- A team already operating a LangChain chain or agent that wants to add a learning loop through the LangChain runner.
- An engineering team running Claude Code CLI tasks that wants to apply the learning loop through the ClaudeCode runner.
How do you install or deploy this agent?
You need Python, uv, and an API key for a supported model provider. Install with:
uv add ace-frameworkFor guided configuration:
ace setupOr set credentials manually; for OpenAI:
export OPENAI_API_KEY="your-key"Install integration extras as needed:
uv add 'ace-framework[browser-use]'
uv add 'ace-framework[langchain]'
uv add 'ace-framework[mcp]'How do you use this agent?
After running ace setup or setting an API key, a minimal learning flow is:
from ace import ACELiteLLMagent = ACELiteLLM(model="gpt-4o-mini")
answer = agent.ask("Is there a seahorse emoji?")
agent.learn_from_feedback("There is no seahorse emoji in Unicode.")
answer = agent.ask("Is there a seahorse emoji?")
print(agent.get_strategies())Use ace validate <model> to test a model connection, or ace models <query> to search available models and pricing.
What are this agent's strengths and limitations?
- Uses a persistent Skillbook with distinct Agent, Reflector, and SkillManager roles instead of limiting learning to a single-session summary.
- The Recursive Reflector writes and executes sandboxed Python to inspect traces, which is suited to finding patterns and errors in complex execution records.
- Covers a lightweight ACELiteLLM path, batch-epoch ACE runs, historical-trace learning, and runners for browser-use, LangChain, and Claude Code.
- Its pipeline uses requires/provides contracts, immutable context, and error isolation, with either learning_tail() or custom step composition.
- Setup requires provider credentials and connection validation; operation depends on network access and an external LLM provider.
- The learning loop executes Python generated by the Recursive Reflector; although it is sandboxed, adopters need to assess whether this execution model fits their runtime governance.
- The reported benchmark gains have stated models, tasks, and learning conditions, and the supplied material does not establish that they generalize to every agent, model, or business task.
- The supplied material does not specify supported Python versions, the Skillbook storage implementation, or full self-hosted deployment operations.
How does this agent compare with similar options?
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| ACE Context Learning Engine This agent | 51 · Major gaps | Library / SDKFree + model costs | ★ 2.6k | 1mo ago | Python | Claude Code · OpenAI API · Claude API |
| Chrome DevTools MCP | 79 · Some gaps | MCP serverFree | ★ 55k | 1d ago | TypeScript | Codex · Claude Code |
| Graft Code Context Layer | 73 · Some gaps | CLIFree + model costs | ★ 11k | 2d ago | TypeScript | Codex · Claude Code · OpenAI API · Claude API |
| OpenBrowser | 60 · Some gaps | CLIFreemium | ★ 279 | 1mo ago | Python | Codex · Claude Code · Claude.ai · OpenAI API · Claude API |
How does FollowAgents rate this agent?
Why each dimension lost points
Evidence shows: README mentions sandboxed environment for recursive reflector but lacks specific permission control details; CLI has interactive setup but no explicit user confirmation mechanism; data flow transparency is limited, only mentions trace upload; sensitive data handling is not specified; dependencies are not pinned, posing potential security risks; external effects (e.g., API calls) are not clearly stated; rollback mechanism is not mentioned; source attribution is only via author field, unverified. Deductions: lack of implementation details and verification.
Evidence shows: README and pyproject.toml are consistent, but no code-level consistency verification; dependencies are not pinned, availability is questionable; failure messages are not documented. Deductions: static review cannot verify execution, and documentation does not cover failure handling.
Evidence shows: README clearly targets developers, provides multiple runners and integration options; capability boundaries are explained via runner list and optional dependencies; trigger precision is explained via CLI commands and API examples; environment fit is explained via Python version and dependency requirements. Deductions: some scenarios are not detailed, such as production deployment.
Evidence shows: README is well-structured, includes quick start, documentation links, examples; installation instructions are clear; naming is stable (ACE, Skillbook, etc.); examples and FAQ links are provided; known limitations are not explicitly listed; license is Apache-2.0; version and changelog exist; maintenance responsibility is explained via contribution guide and author info. Deductions: known limitations section is missing.
Evidence shows: output usability is explained via API examples and CLI commands; marginal value is explained via benchmark results and case studies; cost-benefit is explained via token reduction and low-cost learning cases. Deductions: these claims are not verified in static review.
Evidence shows: README cites papers and benchmarks but lacks reproducible detailed data; cross-source verification is limited, relying only on README; facts and inferences are not clearly separated. Deductions: lack of independent verification and detailed data.
- Dependencies are not pinned, posing supply chain risks.
- Data flow and permission control details are insufficient; actual code needs review.
- Benchmark and cost claims are not verified in static review.
Recent releases
Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.
-
Release notes excerpt
Fixes for current Claude models and for MCP Python SDK 2.x. Fixed - The default Claude model is now claude-sonnet-5. Anthropic retired the old default claude-sonnet-4-20250514 on 15 June 2026. (#141) - temperature is sent only when you set it. Claude 4.7 and later models return a 400 error for non-default values. (#141, #144) - ace-mcp starts on MCP Python SDK 2.x. The mcp extra now installs mcp>=1.22.0,<3. (#145) - A failed recursive child session no longer changes the parent skillbook. Each child works on an isolated copy and commits back atomically. (#143, fixes #134) …View on GitHub ↗ -
v0.12.0 v0.12.0 — RR/Skillbook v2 rewrite + SM hardening
Release notes excerpt
This is the merger of two release lines that had not yet shipped to PyPI: the 0.11.0 architectural rewrite and the 0.12.0 SkillManager hardening. Skipping a separate v0.11.0 tag — v0.12.0 supersets it. 0.11.0 — Architectural rewrite - RecursiveAgent core abstraction extracted from RR (ace/core/recursive_agent.py). Generic recursive PydanticAI agent with sandbox, microcompaction, default tool set, depth-aware sub-agent registration. …View on GitHub ↗ -
openclaw-tracing-v0.1.1 @kayba_ai/openclaw-tracing v0.1.1
Release notes excerpt
Initial release of the OpenClaw tracing plugin. Registers as an OpenClaw plugin (\kayba-tracing\) and ships one structured Kayba trace per agent turn — user message, full LLM input/output with thinking, tool calls, final reply — with sessionId, userId, request/response previews, and folder tagging. No client SDK changes required. Capture knobs (\plugins.entries.kayba-tracing.config\): - \captureSystemPrompt\: capture system prompt once per session (default: true) - \captureHistory\: \delta\ (default, per-session cursor — eliminates N² bloat) | \full\ | \none\ …View on GitHub ↗