ACE Framework¶
Agentic Context Engineering — a framework for self-improving language model agents.
ACE enables AI agents to learn from their own execution feedback through three collaborative roles: Agent, Reflector, and SkillManager. Learned strategies accumulate in a Skillbook that makes every subsequent call smarter.
The Learning Loop¶
graph LR
S[Sample] --> A[Agent]
A --> E[Environment]
E -->|feedback| R[Reflector]
R -->|analyzes| SM[SkillManager]
SM -->|updates| SK[Skillbook]
SK -.->|context| A
Each pass through the loop discovers new strategies, reinforces what works, and prunes what doesn't.
Get Started in 30 Seconds¶
from ace import ACELiteLLM
agent = ACELiteLLM.from_model("gpt-4o-mini")
answer = agent.ask("If all cats are animals, is Felix (a cat) an animal?")
agent.save("learned.json")
Install¶
Quick Links¶
-
Getting Started
Install the framework and run your first self-improving agent.
-
Concepts
Understand the Skillbook, Roles, Insight Levels, and Update Operations.
-
Guides
Build full pipelines, integrate with existing agents, tune prompts.
-
Integrations
Ready-made runners for LiteLLM, LangChain, browser-use, and Claude Code.
-
Pipeline Composition
Compose custom pipelines by mixing and matching steps for full control.
Available Runners¶
| Runner | Framework | Use Case |
|---|---|---|
ACELiteLLM |
LiteLLM (100+ providers) | Simple self-improving agent |
LangChain |
LangChain Runnables | Wrap chains/agents with learning |
BrowserUse |
browser-use | Browser automation with learning |
ClaudeCode |
Claude Code CLI | Coding tasks with learning |
ACE |
Full pipeline | Agent + Reflector + SkillManager |
Paper¶
This framework implements the method from:
Agentic Context Engineering: Evolving Contexts for Self-Improving Language Models arXiv:2510.04618