---
title: "Greyhaven's autocontext Lets AI Agents Teach Themselves Across 1,000-Star Open-Source Loop"
subtitle: "A new open-source harness turns plain-language goals into iterative agent runs that leave behind playbooks, datasets, and distilled local models."
url: "https://alphasignal.ai/news/greyhaven-s-autocontext-lets-ai-agents-teach-themselves-across-1-000-star-open"
author: "AlphaSignal Newsroom"
author_url: "https://alphasignal.ai/editorial-team"
company: "AlphaSignal"
company_url: "https://alphasignal.ai/company/alphasignal"
published: "2026-05-23T04:27:57.000Z"
updated: "2026-08-22T01:03:44.994Z"
type: "Repo"
topics:
  - "Agents"
  - "Open Source"
subtopics:
  - "Agent Frameworks"
  - "Tool Use"
  - "Memory"
upvotes: 166
source_url: "https://github.com/greyhaven-ai/autocontext"
comments: 0
truncated: true
---

# Greyhaven's autocontext Lets AI Agents Teach Themselves Across 1,000-Star Open-Source Loop

> A new open-source harness turns plain-language goals into iterative agent runs that leave behind playbooks, datasets, and distilled local models.

A new open-source project called [autocontext](https://github.com/greyhaven-ai/autocontext) aims for something more ambitious than a prompt optimizer: give agents a harness where each run makes the next run measurably better. You point it at a goal written in plain English, and it generates a scenario, runs a multi-role loop against real evaluation, keeps what worked, and drops artifacts on disk that the next agent inherits automatically.

The repo has crossed 1,000 stars and ships as both a Python package (`autocontext`) and a TypeScript package (`autoctx`), under Apache 2.0\. Supported backends include Anthropic, OpenAI-compatible endpoints (including vLLM and Ollama), Gemini, Mistral, Groq, OpenRouter, Azure, MLX on Apple Silicon, CUDA on Linux, and the Pi local coding agent. Claude Code, Cursor, and any MCP client can drive it directly through `autoctx mcp-serve`.

## Five roles, one feedback loop

A single agent does not run the show. Each iteration is orchestrated by five cooperating roles:

* **competitor** proposes a strategy or artifact for the task
* **analyst** explains what happened and why the score moved
* **coach** turns that analysis into playbook updates and future hints
* **architect** proposes new tools or harness changes when the loop stalls
* **curator** gates what knowledge is allowed to persist across runs

Strategies get scored through scenario execution and staged validation. Weak changes are rolled back, successful ones are promoted into a

_Preview only. Full text requires an AlphaSignal Pro account._

## Sources

- [greyhaven-ai/autocontext](https://github.com/greyhaven-ai/autocontext)
- [autocontext on PyPI](https://pypi.org/project/autocontext/)
- [autocontext documentation](https://autocontext.ai/docs)
