by greyhaven-ai
a recursive self-improving harness designed to help your agents (and future iterations of those agents) succeed on any task
# Add to your Claude Code skills
git clone https://github.com/greyhaven-ai/autocontextLast scanned: 5/3/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-05-03T06:26:18.500Z",
"semgrepRan": false,
"npmAuditRan": true,
"pipAuditRan": true
}autocontext is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by greyhaven-ai. a recursive self-improving harness designed to help your agents (and future iterations of those agents) succeed on any task. It has 1,245 GitHub stars.
Yes. autocontext passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/greyhaven-ai/autocontext" and add it to your Claude Code skills directory (see the Installation section above).
autocontext is primarily written in Python. It is open-source under greyhaven-ai on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh autocontext against similar tools.
No comments yet. Be the first to share your thoughts!
autocontext is a harness for agent improvement. Give it a goal, it runs the task against evaluation, keeps the useful lessons, discards dead ends, and leaves traces, reports, playbooks, datasets, and optional local-model training artifacts for the next run.
Docs: autocontext.ai/docs · quickstart · CLI reference · changelog
| Surface | Command |
|---|---|
| Python CLI | uv tool install autocontext==0.11.0 |
| Python library/dev | uv pip install autocontext==0.11.0 |
| TypeScript/Node CLI | bun add -g autoctx@0.11.0 |
| Pi extension | pi install npm:pi-autocontext@0.9.0 |
The PyPI package is autocontext; the CLI is autoctx. The npm package is autoctx (not the unrelated autocontext npm package). Provider variables live in .env.example.
Pi is the lowest-friction provider because it uses your local agent auth:
AUTOCONTEXT_AGENT_PROVIDER=pi \
AUTOCONTEXT_PI_COMMAND=pi \
autoctx solve "improve customer-support replies for billing disputes" --iterations 3
Use AUTOCONTEXT_AGENT_PROVIDER=anthropic, openai-compatible, claude-cli, codex, pi-rpc, or another provider when you need that runtime. See agent integration for the full matrix.
pi-autocontext, then ask Pi to solve, judge, improve, list, or inspect runs through the packaged skill.autoctx mcp-serve or bunx autoctx mcp-serve and expose the tools to Claude Code, Cursor, or another MCP client.uv run autoctx hermes export-skill --with-references --json.Full setup: autocontext/docs/agent-integration.md.
runs/<run_id>/
├── trace.jsonl
├── generations/<n>/{strategy.json,analysis.md,score.json}
├── report.md
└── artifacts/
knowledge/<scenario>/
├── playbook.md
├── hints.md
└── tools/
Everything is filesystem-first: inspect it, diff it, replay it, export it, or feed it into training.
| Surface | Command | Use it for |
|---|---|---|
solve |
autoctx solve "..." --iterations 3 |
Start from a plain-language goal |
run |
autoctx run <scenario> --iterations 3 |
Improve a saved scenario |
simulate |
autoctx simulate -d "..." |
Model/replay/compare system behavior |
investigate |
autoctx investigate -d "..." |
Evidence-driven diagnosis |
mission |
autoctx mission create --name "..." --goal "..." |
Verifier-driven multi-step goals |
train |
uv run autoctx train --scenario <name> --data <jsonl> |
Distill stable behavior into a cheaper runtime (Python) |
mcp-serve |
autoctx mcp-serve |
Give an agent the autocontext tool surface |
Python owns the full control-plane package; TypeScript owns several operator-facing surfaces, the TUI, and Node runtime adapters. Start with autocontext/README.md or ts/README.md.
RunId, ScenarioName, and DbPath to the TypeScript package root; GenerationRunner.run now takes a RunId (construct with asRunId), a compile-time-only change.The shipped families cover games, agent tasks, simulations, artifact editing, investigations, workflows, negotiation, schema evolution, tool fragility, operator loops, and coordination. Python and TypeScript share the family vocabulary; see docs/scenario-parity-matrix.md for parity details.
| Need | Go here |
|---|---|
| Python CLI/library, MCP, HTTP, training | autocontext/README.md |
| Node CLI, TUI, missions, Fetch/agent adapters | ts/README.md |
| Pi package | pi/README.md |
| Copy-paste examples | examples/README.md |
| Concepts and docs index | docs/README.md |
| Contributor setup | CONTRIBUTING.md |
| Repo guide for agents | AGENTS.md |
Thanks to George for generously donating the autocontext name on PyPI.