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
}See how autocontext compares with popular alternatives.
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,296 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!
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
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.18.0 |
| Python library/dev | uv pip install autocontext==0.18.0 |
| TypeScript/Node CLI | bun add -g autoctx@0.18.0 |
| Pi extension | pi install npm:pi-autocontext@0.11.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.
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, region, and telemetry capability validation. It fails before provider creation when the configured pool cannot satisfy the request and never downgrades accelerator work to CPU; see remote execution sessions. Shipped Prime generation and campaign paths persist a durable pre-dispatch claim plus the complete result/ledger projection before returning paid work; restart never treats an unresolved or already committed request as permission to provision another sandbox.
pi-autocontext, then ask Pi to solve, judge, improve, list, or inspect runs through the packaged skill.autoctx serve mcp or bunx autoctx serve mcp 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/
└── context_bundles/{bundles,candidates,promotions,active.json}
Everything is filesystem-first: inspect it, diff it, replay it, export it, or feed it into training. Kernel campaigns extend that contract with exact provider-generation receipts, bounded paid-call accounting, content-addressed lineage, and safe stop/status/resume. Coach and architect context changes are stored as immutable candidates and are not served until matched candidate/incumbent trials confirm them. The live serving boundary can additionally require a cancellable independent audit and a durable campaign-wide false-promotion budget; exact causal credit is accepted only from verified single-component manifest additions. See context bundles and outcome-gated promotion. Controlled component trials feed ablation-backed attribution, so prompt selection can demote low-value context without presenting edit-size correlation as causal.
Python kernel evolution can also compose bounded studies across variable-shape matmul, fused elementwise/reduction, and causal-attention families. Each family retains independent primary/confirmation evidence and per-case floors; cross-shape, cross-hardware, and cross-family trials distinguish portable, partially transferring, specialist, and plateau outcomes without an aggregate score hiding a failed workload. See the kernel evolution guide.
| 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 |
status |
autoctx status <run-id> --json |
Read one run snapshot |
watch |
autoctx watch <run-id> --ndjson |
Stream run snapshots |
show |
autoctx show <run-id> --best --json |
Inspect a selected generation |
simulate |
autoctx simulate -d "..." |
Model/replay/compare system behavior |
investigate |
autoctx investigate -d "..." |
Evidence-driven diagnosis |
scenario |
autoctx scenario create --help |
Create from a description, template, or harness spec |
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) |
serve mcp |
autoctx serve mcp |
Give an agent the autocontext tool surface |
tui |
autoctx tui [--connect <server>] |
Operate or attach to a run from the pi-tui terminal UI |
Running bare autoctx shows the concise paved-road workflow. Use autoctx --help --all in the npm CLI or autoctx commands --all in the Python CLI for
the full catalog. --iterations is the primary iteration flag; --gens is a
compatibility alias. autoctx --version --json reports the package version and
runtime (python or typescript).
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.
HTTP and WebSocket control planes bind to loopback by default. A non-loopback
bind fails closed unless AUTOCONTEXT_SERVER_TOKEN contains a random value of
at least 32 characters. Send it as an Authorization: Bearer value; browser
WebSocket clients use the autocontext.bearer.<base64url-token> subprotocol.
Tokens in endpoint URLs are rejected. See the
persistent-host security model
before exposing a server beyond one trusted operator.