← All articlesKarpathy's Autoresearch: Minimalist Agents Doing Real ML Research
Andrej Karpathy just open-sourced autoresearch, a 630-line Python framework that lets AI agents autonomously optimize machine learning experiments on a single GPU. Instead of manual hyperparameter tuning, you give a high-level goal in a Markdown file and watch an agent iteratively improve the training code. This is practical agentic AI in action.
Andrej Karpathy has a habit of releasing tools that cut through the noise. His latest, autoresearch, is no exception. It's a 630-line Python framework that lets an AI agent run its own machine learning experiments with almost no human babysitting.
The setup is elegantly simple. You write a high-level objective in a Markdown file called program.md. An external LLM (Claude, Grok, whatever you have access to) then repeatedly edits a train.py file, runs short training sessions, looks at the results, and tries to do better next time.
The objective is concrete: drive down validation bits-per-byte (val_bpb) as much as possible, but each training run is strictly limited to five minutes on a single GPU. This constraint is the secret sauce. It forces rapid iteration instead of the usual "throw it at a cluster for three days and pray" approach that dominates most research labs.
This isn't some elaborate multi-agent orchestration with ten different models talking to each other. It's deliberately minimalist. Karpathy took his earlier nanochat project and stripped it down further. The agent gets the current training script, the current results, your high-level prompt, and instructions to propose concrete code changes that might improve performance. It edits the code, runs the experiment, logs the outcome, and repeats.
What makes this interesting isn't that an LLM can edit code. We've seen that for a while. It's that the feedback loop is closed and grounded in actual training metrics on real hardware. The agent isn't hallucinating improvements in the abstract, it's seeing real numbers from actual gradient updates. That changes everything about the quality of its suggestions.
The implications go beyond convenience. Most serious ML research today is gated behind massive compute budgets. If you don't have access to hundreds of GPUs, you're largely out of the game for frontier experiments. Autoresearch flips that script. By optimizing for rapid cycles on consumer-grade hardware, it opens the door for independent researchers, small teams, and anyone who wants to experiment without corporate backing.
This aligns perfectly with the broader shift toward agentic systems we've been watching. For years the conversation was about bigger models. Now it's moving toward systems that can actually iterate, evaluate, and improve themselves within defined constraints. Karpathy's tool is a practical demonstration of what that looks like at the research level.
Think about what this enables. A solo developer could set an ambitious but achievable goal, "find a better attention mechanism for small language models" or "optimize training stability on limited data", and let the agent grind through dozens of variations while they do something more valuable with their time. The agent proposes changes, the hardware gives honest feedback, and the loop continues.
Of course, this doesn't replace human researchers. The quality of the initial prompt in program.md still matters enormously. The agent is only as good as the constraints and objectives you give it. But that's the point. It augments the researcher instead of trying to replace them.
At MindLink we've been building and deploying agentic workflows for enterprise clients, and tools like this highlight why the local-first approach matters. When your agents can run meaningful experiments on hardware you control, you avoid the opacity and dependency that comes with cloud-only research platforms. You own the iteration loop.
The timing is also notable. As agentic reliability has crossed important thresholds recently, we're seeing more of these self-improving systems move from research papers to actual tools. Autoresearch feels like one of the first genuinely useful examples for the average skilled practitioner rather than just the well-funded labs.
What stands out most is the philosophy behind it. Karpathy has always favored minimalism and understanding over throwing parameters at problems. Autoresearch continues that tradition. Instead of complex agent frameworks with layers of abstraction, it's a focused tool that does one thing well: close the loop between code changes and empirical results.
This minimalist approach has a hidden benefit, it's easy to inspect, modify, and extend. The entire system fits in a single repository that's straightforward to run. No sprawling dependencies, no mysterious orchestration layer. Just code, metrics, and iteration.
For those of us thinking about sovereign AI systems, this is encouraging. The future isn't necessarily about who has the biggest cluster. It's about who can build the sharpest, most efficient feedback loops between human intent and machine execution. Tools that run effectively on single GPUs while still delivering meaningful research progress point toward a more decentralized research ecosystem.
We're likely to see variations of this pattern emerge across different domains. The same principles could apply to optimizing other types of models, exploring new architectures, or even non-ML domains where iterative improvement can be measured quantitatively.
Karpathy didn't just release another library. He released a template for how agentic systems can participate in the research process itself. The agent isn't just generating code, it's participating in the scientific method at a fundamental level: hypothesize (edit the code), experiment (run the training), analyze (look at val_bpb), repeat.
That's the real shift. Research has always been iterative. Now the iteration can happen at machine speed within carefully chosen constraints, while humans focus on the higher-order questions of what to optimize and why.
If you're doing any kind of ML work, especially on more modest hardware, this is worth experimenting with. The barrier to entry is low, the ideas are powerful, and the potential for discovery is real.
The age of the lone researcher with a good GPU and a sharp agent just got a lot more interesting.