pi-autoresearch is an autonomous experiment loop for optimizing various targets like test speed, bundle size, LLM training, or build times. Inspired by karpathy/autoresearch, it utilizes a skill-extension architecture, allowing domain-agnostic infrastructure paired with domain-specific knowledge. The core workflow involves editing code, committing changes, running experiments, logging results, and either keeping or reverting the changes – a cycle that repeats indefinitely. Key components include a status widget, a detailed dashboard, and configuration options for customizing behavior. It persists experiment data in `autoresearch.jsonl` and session context in `autoresearch.md` for resilience and reproducibility.
This project, `autoresearch-opencode`, is an autonomous experiment loop designed for use with OpenCode. It's a port of `pi-autoresearch`, but implemented as a pure skill, eliminating the need for an MCP server and relying solely on instructions the agent follows using its built-in tools. The skill allows users to automate optimization tasks, as demonstrated by the example of optimizing the BogoSort algorithm which achieved a 7,802x speedup by leveraging Python's `bisect` module for sorted-state detection.
The system maintains state using a JSONL file, enabling resume/pause functionality and detailed experiment tracking. It provides a dashboard for monitoring progress and ensures data integrity through atomic writes and validation checks.
The article details “autoresearch,” a project by Karpathy where an AI agent autonomously experiments with training a small language model (nanochat) to improve its performance. The agent modifies the `train.py` file, trains for a fixed 5-minute period, and evaluates the results, repeating this process to iteratively refine the model. The project aims to demonstrate autonomous AI research, focusing on a simplified, single-GPU setup with a clear metric (validation bits per byte).
* **Autonomous Research:** The core concept of AI-driven experimentation.
* **nanochat:** The small language model used for training.
* **Fixed Time Budget:** Each experiment runs for exactly 5 minutes.
* **program.md:** The file containing instructions for the AI agent.
* **Single-File Modification:** The agent only edits `train.py`.