autocontext is a self-improving harness for AI agents that runs a goal through evaluation, preserves useful lessons, and records artifacts for later runs. Developers use it to help agents and future versions of those agents perform better on recurring tasks. The catalogue add-ons support its agent-improvement workflow.
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 agentmods add skills/greyhaven-ai/autocontext/autocontext-consumernpx skills add greyhaven-ai/autocontext --skill autocontext-consumergit clone --depth 1 https://github.com/greyhaven-ai/autocontextWrote 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/greyhaven-ai/autocontext/autocontext-consumer)<a href="https://agentmods.dev/skills/greyhaven-ai/autocontext/autocontext-consumer"><img src="https://agentmods.dev/badge/skills/greyhaven-ai/autocontext/autocontext-consumer.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.00067 | $0.00855 |
| Opus 5 | $0.00034 | $0.00428 |
| Sonnet 5 | $0.00013 | $0.00171 |
| Haiku 4.5 | $0.00007 | $0.00085 |
Grade A, and why
autocontext-consumer 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 — 111 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Autocontext: Using Existing Knowledge
Overview
Autocontext writes what it learns to a knowledge directory. This skill covers
reading and moving that knowledge. To produce it, use autocontext-creator.
Nothing here assumes a particular agent host, and most of it is plain file reading - the layout is documented below precisely so an agent can go straight to the file it wants.
When to Use
- You want to know whether Autocontext has learned anything about a task.
- You want the current playbook or lessons for a scenario.
- You want to move knowledge from one checkout or machine to another.
Do not use this skill to run scenarios or judge output. That is
autocontext-creator.
Where Knowledge Lives
The root defaults to ./knowledge and moves with AUTOCONTEXT_KNOWLEDGE_ROOT.
Inside it, each scenario owns a directory:
<knowledge_root>/
<scenario>/
playbook.md the current approach, rewritten as the loop learns
lessons.json accumulated lessons, newest last
hints.md hints carried into the next attempt
mutation_log.jsonl one line per change, append-only
package_metadata.json present once the scenario has been exported
reports/<run_id>.md per-run written reports
analytics/ cross-scenario analytics
_hub/ shared research hub state
_evaluator_epochs/ evaluator versioning
Directories starting with _ are shared across scenarios rather than owned by
one. playbook.md is the file to read first: it is the current answer, where
lessons.json is the history of how it got there.
Reading Knowledge
The playbook and lessons are plain files. Read them directly:
cat "${AUTOCONTEXT_KNOWLEDGE_ROOT:-knowledge}/grid_ctf/playbook.md"
An absent file means nothing has been learned for that scenario yet. That is a normal state, not an error.
Finding Runs
autoctx list --json
autoctx status "$RUN_ID" --json
autoctx show "$RUN_ID"
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 · 111 lines · 67 tokens per session scan A b6a635812f66
autocontext-consumer is a skill published in the GitHub repository greyhaven-ai/autocontext (1,291 stars, last pushed 4d ago), licensed Apache-2.0. It adds 67 tokens to every session and 855 once invoked, about $0.0003 per session on Opus 5. 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
hermes-memory-providers
Install and configure Mnemosyne as a Hermes Agent memory provider — local SQLite with vector search, episodic consolidation, and temporal knowledge graphs.
mnemosyne
Persistent cross-session memory via Mnemosyne — store, recall, and consolidate facts, preferences, and context.
mnemosyne-memory-override
Hard rule override that forces Mnemosyne for all durable memory storage. The legacy memory tool is DEPRECATED for user preferences, credentials, and project conventions. Use memory ONLY for ephemeral session state.
swarmvault
Use when working with a SwarmVault knowledge vault (raw/, wiki/, swarmvault.schema.md). Establishes schema-first conventions and prefers graph queries over broad search.
swarmclaw
AI agent runtime and multi-agent orchestration platform. Teaches agents how to use SwarmClaw's 6 primitive tools, persistent memory, dreaming, delegation, connectors, credentials, and the skill system. Use when an agent is running on SwarmClaw and needs to understand the platform's capabilities.
openclaw-test-heap-leaks
Investigate pnpm test memory growth, Vitest worker OOMs, and suspicious RSS increases in OpenClaw using the scripts/test-parallel.mjs heap snapshot tooling. Use when Codex needs to reproduce test-lane memory growth, collect repeated .heapsnapshot files, compare snapshots from the same worker PID, distinguish…