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: 11/29/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-11-29T12:58:29.377Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": 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,331 GitHub stars.
Yes. autocontext passed AgentsLLM'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. AgentsLLM 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
Experimental Python research: the Qwen weight-space reproduction pins model/data/scorer assets, verifies the published checkpoint, and provides bounded paired inference with replayable reproduction reports. The GPU acceptance workflow gates full execution; live reproduction remains pending. The comparison-condition harness exercises baseline, context, weight, combined and decoding conditions with offline synthetic fixtures. The CPU-only editing sessions create context, weight-descriptor and decoding candidates with finite durable budgets, practice-only adapter views and sealed exports into that comparison harness. Real GPU editing and benchmark practice selection remain deferred. The adaptive editing fixtures add feedback-conditioned proposals, equal search caps, practice-based selection, and a separate confirmation gate before the final fixture audit. The checkpoint-backed editing fixtures apply typed edits to tiny CPU safetensors and carry independently verified input/program/output hashes through selection and confirmation. Model and GPU inference remain deferred. The CPU inference study runs a pinned tiny classifier on verified checkpoint bytes and measures baseline, context, weight, combined, and decoding conditions. Its constructed tasks establish execution correctness; Qwen reproduction and GPU execution remain deferred. The adaptive CPU search uses those measured practice scores to choose bounded context, tensor, and decoding edits, restore an earlier winner, and freeze selection before confirmation. Linux acceptance covers real memory/CPU limit failures and cleanup; GPU execution remains deferred. The generated CPU campaign compares adaptive, fixed-order, and seeded-random search at equal capacity across pinned task instances. Complete schedule accounting, read-only replay, and paired task-level reports retain failures and vetoes without treating repeated seeds as independent tasks.
The CPU search diagnostics freeze completed selections before probing every declared single-surface option on practice cases. Separate reference costs and descriptive reports distinguish unavailable improvements, missed options, duplicate outputs, and confirmation vetoes. GPU execution remains deferred.
The controlled CPU transfer experiments add deterministic weight-repair, already-correct and practice-shortcut controls. A separate pinned contract preserves earlier evidence while family-specific reports test transfer under the unchanged confirmation gate. These constructed controls do not establish benchmark gains; GPU execution remains deferred.
The CPU failure supervisor records bounded live exception chains under a separate implementation pin. It preserves earlier journals, keeps unavailable observations unknown, and runs one declared CPU campaign with conditional practice references. GPU execution remains deferred.
The measured CPU outcomes add a pinned v2 failure codec, deterministic prompt redaction, and process measurements that survive errors. A small declared comparison checks native-versus-measured receipt parity without retries. Earlier evidence remains intact; GPU execution is deferred.
The measured CPU search integration carries those outcomes through practice, restoration, confirmation, conditional audit, and exhaustive practice references. A pinned 18-search native-versus-measured schedule checks semantic parity and preserves failed or uncertain operations and their charges. GPU execution remains deferred.
The full measured CPU pilot declares 72 searches and 24 conditional practice references over the unchanged control tasks. Its CPU-only Linux/amd64 acceptance job retains complete or partial evidence, separates integrity from completion and calibration, and verifies replay without dispatch or writes. GPU execution remains deferred.
The budget-limited CPU search landscapes pin informative, misleading and neutral weight-search tasks with independent oracle expectations. Thirty-six equal-budget searches and twelve practice-only references measure expected wins, losses and ties, practice progress and resource usage. Context and decoding are neutral controls; the unchanged joint gate withholds audit. GPU execution remains deferred.
The CPU search robustness campaign preserves those six tasks while varying candidate order and search budget. An exhaustive offline oracle covers 6,480 trajectories; 45 measured CPU searches and 15 practice references test order invariance, full-budget coverage and history prefixes. Variants remain nested within base tasks, and GPU execution remains deferred.
The generated CPU joint controls pin positive, correct-baseline and practice-only repair tasks with an independent deterministic oracle. Eighteen equal-budget searches and six conditional practice references test component gains, the unchanged joint gate and actual audit routing. These constructed, seed-conditional controls do not establish adaptive superiority or benchmark gains; GPU execution remains deferred.
For Python CUDA/SFT installation, follow the maintained Accelerate build guide. Published installations must install the bundled security build before adding the CUDA extra; source checkouts use the locked uv source.
| Surface | Command |
|---|---|
| Python CLI | uv tool install autocontext==0.19.1 |
| Python library/dev | uv pip install autocontext==0.19.1 |
| TypeScript/Node CLI | bun add -g [email protected] |
| Pi extension | pi install npm:[email protected] |
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.
The npm CLI and TUI require Node.js 22.19.0 or newer; contributors should use
the version pinned in ts/.nvmrc.
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, openrouter, claude-cli, codex, pi-rpc, or another provider when you need that runtime. See agent integration for the full matrix.
Running it on your own GPU instead? Self-hosted models covers the whole loop on vLLM, Ollama, or any OpenAI-compatible endpoint — including what each role actually resolves to, and why constrained output matters more on open weights.
Self-hosted endpoints can additionally declare AUTOCONTEXT_PROVIDER_HOSTING=local and a fast, mid_tier, or frontier AUTOCONTEXT_PROVIDER_CAPABILITY; role-specific endpoints use matching <ROLE>_PROVIDER_* declarations.
Prime remote execution also supports opt-in accelerator requests with explicit type/count, immutable-image, re