Agentic Context Engine is an open-source engine that gives AI agents a persistent learning loop, helping them remember successful strategies and learn from failures across sessions. It is used to improve production agents, and also powers Kayba’s hosted service. Catalogue add-ons support workflows for operating and configuring the engine.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add kayba-ai/agentic-context-engine --skill kayba-acegit clone --depth 1 https://github.com/kayba-ai/agentic-context-engineWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/kayba-ai/agentic-context-engine/kayba-ace)<a href="https://agentmods.dev/skills/kayba-ai/agentic-context-engine/kayba-ace"><img src="https://agentmods.dev/badge/skills/kayba-ai/agentic-context-engine/kayba-ace.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.01154 |
| Opus 5 | $0.00000 | $0.00577 |
| Sonnet 5 | $0.00000 | $0.00231 |
| Haiku 4.5 | $0.00000 | $0.00115 |
Grade A, and why
kayba-ace scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 160 lines — stays where its author put it; the contents beside it link to each section on GitHub.
ACE — Learn from Traces
This skill ships learn_from_traces.py, a script that reads OpenClaw session
transcripts, feeds them through the ACE learning pipeline, and writes an
updated skillbook to disk.
Usage
python learn_from_traces.py [OPTIONS] [FILES...]
The script auto-discovers new sessions from ~/.openclaw/agents/<agent>/sessions/
and only processes files that haven't been processed before. Processed filenames
are tracked in ace_processed.txt.
Options
| Flag | Description |
|---|---|
--dry-run |
Parse sessions but skip the learning step (no LLM calls) |
--reprocess |
Ignore the processed log and reprocess all sessions |
--agent ID |
OpenClaw agent ID (default: $OPENCLAW_AGENT_ID or main) |
--output DIR |
Output directory for skillbook files (default: script directory) |
--opik |
Enable Opik observability logging |
Pass one or more JSONL file paths as positional arguments to process specific files instead of auto-discovering sessions.
Examples
Learn from all new sessions
python learn_from_traces.py
Discovers unprocessed sessions under ~/.openclaw/agents/main/sessions/,
runs the learning pipeline, and writes the updated skillbook.
Dry run (no LLM calls)
python learn_from_traces.py --dry-run
Parses and validates sessions without calling the LLM. Useful for checking that session files are readable before committing to a full run.
Process a specific trace file
python learn_from_traces.py ~/.openclaw/agents/main/sessions/f967d602.jsonl
Skips auto-discovery and processes only the given file. The processed log is not updated when files are passed directly.
Process multiple files
python learn_from_traces.py session1.jsonl session2.jsonl session3.jsonl
Reprocess all sessions
python learn_from_traces.py --reprocess
Ignores ace_processed.txt and reprocesses every session file. Useful after
upgrading ACE or when you want to rebuild the skillbook from scratch.
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 7d ago First seen · 160 lines · 0 tokens per session scan A 33810fe8c542
kayba-ace is a skill published in the GitHub repository kayba-ai/agentic-context-engine (2,564 stars, last pushed 9d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,154 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
titen-memory
Use the Titen MCP server to recall bounded evidence-grounded context, record verified durable signals, submit feedback, and coordinate checkpoints, leases, or handoffs. Use when work may benefit from prior project memory or when a verified outcome should be preserved for another agent; do not use it to capture raw…
mnemon
Persistent memory CLI for LLM agents. Store facts, recall past knowledge, link related memories, manage lifecycle.
mnemon
Persistent graph-based memory. Recall context before responding, remember insights after. Each group has private memory; global memory is read-only.
mnemon
Persistent memory CLI for LLM agents. Store facts, recall past knowledge, link related memories, manage lifecycle.
mnemon
Persistent memory for MiniMax Code. Recall durable context, store important facts and decisions, and link related memories with the mnemon CLI.
mnemon
Persistent memory CLI for Hermes Agent. Store facts, recall past knowledge, link related memories, manage lifecycle.