ACE Context Learning Engine

Turns agent feedback and execution traces into reusable strategies.

Stars
★ 2.6k
Last updated
1mo ago
License
Apache-2.0
Primary language
Python

At a glance

How it runs
Library / SDKCLIMCP server
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
Pythonuvan LLM provider API keyShell / CLINetwork accessMCP Server
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

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.

  1. A Python developer whose question-answering or tool-using agent receives human corrections and needs those corrections to influence later requests.
  2. A team with historical agent logs that wants to extract reusable strategies through learn_from_traces() instead of rerunning the original tasks.
  3. A developer using browser-use for browser automation who wants repeated runs to improve through accumulated strategies.
  4. A team already operating a LangChain chain or agent that wants to add a learning loop through the LangChain runner.
  5. 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-framework

For guided configuration:

ace setup

Or 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 ACELiteLLM
agent = 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?

Pros
  • 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.
Limitations
  • 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?

FollowAgents source review · FARS-2.1
Major gaps
51/ 100 5-point scale 2.6 / 5
This review covers the source as of Aug 09, 2026. The project has shipped 1 stable release(s) since, which have not been re-reviewed. The score and verdict describe the reviewed version only. Recent releases ↓
Trust 10/29
Reliability 6/14
Adaptability 12/18
Convention 11/18
Effectiveness 9/13
Verifiability 3/8
Why each dimension lost points
Trust10 / 29 · 1.7/5

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.

Reliability6 / 14 · 2.1/5

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.

Adaptability12 / 18 · 3.3/5

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.

Convention11 / 18 · 3.1/5

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.

Effectiveness9 / 13 · 3.5/5

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.

Verifiability3 / 8 · 1.9/5

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.

Risks and how to mitigate them
  • 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.
Evidence confidence: Low Reviewed Aug 09, 2026 Reviewed revision 96f7c9cfea1d New commits since this review; the score may not cover them
See the full review method →

Recent releases

Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.

  1. v0.13.0
    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 ↗
  2. 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 ↗
  3. 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 ↗

FAQ

Does ACE require fine-tuning, training data, or a vector database?
No. The repository explicitly states that its example workflow uses no fine-tuning, training data, or vector database.
Which model providers can it use?
Its roles are backed by PydanticAI and routed through its LiteLLM integration to more than 100 LLM providers. The material specifically names OpenAI, Anthropic, Google, Bedrock, and Groq.
Must I rerun tasks to learn from existing logs?
No. agent.learn_from_traces(your_existing_traces) is provided for extracting strategies from existing traces.
Can I predict the learning cost in advance?
Not from the supplied material. It reports an approximately $1.50 learning cost for one Claude Code translation benchmark, while ace models <query> can search model pricing.
How does the open-source engine relate to Kayba?
ACE is described as the open-source engine behind Kayba. The material describes Kayba as a managed service for production-agent failure investigation and fixes shipped as PRs.
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related agents