Coding & Developmentπ€claudeπ¬gptβ¨οΈcursorπuniversal
Agentic Context Engine (ACE)
π§ Make your agents learn from experience. Based on the Agentic Context Engineering (ACE) framework.
Quick Start
Install this Skill
npx skills add kayba-ai/agentic-context-engine<img src="https://framerusercontent.com/images/XBGa12hY8xKYI6KzagBxpbgY4.png" alt="Kayba Logo" width="1080"/>
# Agentic Context Engine (ACE)

[](https://discord.gg/mqCqH7sTyK)
[](https://twitter.com/kaybaai)
[](https://badge.fury.io/py/ace-framework)
[](https://www.python.org/downloads/)

**AI agents that get smarter with every task π§ **
Agentic Context Engine learns from your agent's successes and failures. Just plug in and watch your agents improve.
Star βοΈ this repo if you find it useful!
---
## π€ LLM Quickstart
1. Direct your favorite coding agent (Cursor, Claude Code, Codex, etc) to [Quick Start Guide](docs/QUICK_START.md)
2. Prompt away!
---
## β Quick Start
### 1. Install
```bash
pip install ace-framework
```
### 2. Set API Key
```bash
export OPENAI_API_KEY="your-api-key"
```
### 3. Run
```python
from ace import ACELiteLLM
agent = ACELiteLLM(model="gpt-4o-mini")
answer = agent.ask("What does Kayba's ACE framework do?")
print(answer) # "ACE allows AI agents to remember and learn from experience!"
```
π **Done! Your agent learns automatically from each interaction.**
---
## π― Integrations
ACE provides four ready-to-use integrations:
**[β Integration Guide](docs/INTEGRATION_GUIDE.md)** | **[β Examples](examples/)**
### 1. **ACELiteLLM** - Simplest Start π
Create your self-improving agent:
<details>
<summary>Click to view code example</summary>
```python
from ace import ACELiteLLM
# Create self-improving agent
agent = ACELiteLLM(model="gpt-4o-mini")
# Ask related questions - agent learns patterns
answer1 = agent.ask("If all cats are animals, is Felix (a cat) an animal?")
answer2 = agent.ask("If all birds fly, can penguins (birds) fly?") # Learns to check assumptions!
answer3 = agent.ask("If all metals conduct electricity, does copper conduct electricity?")
# View learned strategies
print(f"β
Learned {len(agent.skillbook.skills())} reasoning skills")
# Save for reuse
agent.save_skillbook("my_agent.json")
# Load and continue
agent2 = ACELiteLLM(model="gpt-4o-mini", skillbook_path="my_agent.json")
```
</details>
<br>
### 2. **ACELangChain** - Wrap ACE Around Your Existing Agent βοΈ
Wrap any LangChain chain/agent with learning:
**Best for:** Multi-step workflows, tool-using agents
<details>
<summary>Click to view code example</summary>
```python
from ace import ACELangChain
ace_chain = ACELangChain(runnable=your_langchain_chain)
result = ace_chain.invoke({"question": "Your task"}) # Learns automatically
```
</details>
<br>
### 3. **ACEAgent** - Enhance Browser-Use Agent with Self-Optimizing π
Self-improving browser agents with [browser-use](https://github.com/browser-use/browser-use):
**Features:** Drop-in replacement for `browser_use.Agent`, automatic learning, reusable skillbooks
**[β Browser Use Guide](examples/browser-use/README.md)**
<details>
<summary>Click to view code example</summary>
```bash
pip install ace-framework[browser-use]
```
```python
from ace import ACEAgent
from browser_use import ChatBrowserUse
# Two LLMs: ChatBrowserUse for browser, gpt-4o-mini for ACE learning
agent = ACEAgent(
llm=ChatBrowserUse(), # Browser execution
ace_model="gpt-4o-mini" # ACE learning
)
await agent.run(task="Find top Hacker News post")
agent.save_skillbook("hn_expert.json")
# Reuse learned knowledge
agent = ACEAgent(llm=ChatBrowserUse(), skillbook_path="hn_expert.json")
await agent.run(task="New task") # Starts smart!
```
</details>
<br>
### 4. **ACEClaudeCode** - Claude Code CLI π»
Self-improving coding agent using [Claude Code](https://claude.ai/code):
**Features:** Claude Code CLI wrapper, automatic learning, task execution traces
**[β Claude Code Loop Example](examples/claude-code-loop/)**
<details>
<summary>Click to view code example</summary>
```python
from ace import ACEClaudeCode
agent = ACEClaudeCode(
working_dir="./my_project",
ace_model="gpt-4o-mini"
)
# Execute coding tasks - agent learns from each
result = agent.run(task="Add unit tests for utils.py")
agent.save_skillbook("coding_expert.json")
# Reuse learned knowledge
agent = ACEClaudeCode(working_dir="./project", skillbook_path="coding_expert.json")
```
</details>
---
## Why Agentic Context Engine (ACE)?
AI agents make the same mistakes repeatedly.
ACE enables agents to learn from execution feedback: what works, what doesn't, and continuously improve. <br> No training data, no fine-tuning, just automatic improvement.
### Clear Benefits
- π§ **Self-Improving**: Agents autonomou
... (truncated)Repository
1.7kstars
213forks
Details
Related Skills
More coding & development skills you might like
Reticle
Coding & DevelopmentAI agents can generate code, but still struggle to understand what they build. Reticle brings Jev-style machine-native runtime perception to web & desktop applications.
π€claudeπuniversal
1.2k
190
View
agentscope-java
Coding & DevelopmentExpert Java developer skill for AgentScope Java framework - a reactive, message-driven multi-agent system built on Project Reactor. Use when working with reactive programming, LLM integration, agent orchestration, multi-agent systems, or when the user mentions AgentScope, ReActAgent, Mono/Flux, Project Reactor, or Java agent development. Specializes in non-blocking code, tool integration, hooks, pipelines, and production-ready agent applications.
πuniversal
6.0k
1.5k
View
ospec
Coding & DevelopmentDocument-driven OSpec workflow for initialization, change/goal routing, validation, archiving, and durable project knowledge.
β¨geminiπ€claudeπ¬gptπuniversal
524
34
View
misakanet-failure-memory
Coding & Developmentπ A zero-dependency, git-backed micro-lesson library for AI Agents to asynchronously share and search verified debugging experience. Python stdlib only. | https://misakanet.org
π€claudeβ¨οΈcursorπuniversal
424
158
View