greyhaven-ai/autocontext
a recursive self-improving harness designed to help your agents (and future iterations of those agents) succeed on any task
What it solves
Autocontext provides a recursive self-improvement harness for AI agents. It solves the problem of manually iterating on agent prompts and strategies by automating the process of running tasks, evaluating results, and retaining only the successful lessons and playbooks for future iterations.
How it works
The system operates as a loop: it takes a goal, executes the task using a specified agent provider, and runs the output against an evaluation. It then discards unsuccessful attempts (dead ends) and saves useful insights into a filesystem-first knowledge base. This knowledge is stored as playbooks, hints, and context bundles that are fed back into the agent for subsequent runs.
Who it’s for
It is designed for developers and AI researchers who want to systematically improve agent performance on specific tasks, as well as those using MCP clients (like Claude Code or Cursor) or local-model runtimes (vLLM, Ollama).
Highlights
- Recursive Improvement: Automatically iterates on tasks to distill stable behavior and create self-improving playbooks.
- Multilingual Support: Available as both a Python library/CLI and a TypeScript/Node CLI.
- Broad Provider Integration: Supports a wide range of providers including Pi, Anthropic, OpenAI-compatible endpoints, and self-hosted models.
- Knowledge Persistence: Leaves behind detailed traces, reports, and context bundles that can be used for auditing or as training data for cheaper models.
- Agent Entry Points: Integrates with MCP clients and provides a specialized skill for the Pi agent.
Related
- Project
- Project
- Project
- Project