Meta's agents that rewrite their own code to get better
A research framework where a meta-agent generates diffs to improve task agents, then can turn that same improvement lens on itself.

What it does
HyperAgents runs a two-level loop: a task agent tries to solve problems in a domain, while a meta-agent watches, generates code diffs to improve the task agent, and applies them. The twist is that the meta-agent can also target itself, making the system self-referential. The README is thin on mechanism details, but the code structure suggests this is implemented as Python scripts that call foundation models via APIs and execute the generated patches.
The interesting bit
The self-referential hook. Most agent improvement frameworks optimize the worker; this one leaves the door open for the optimizer to optimize the optimizer. Whether that actually converges or spirals is left as an exercise for the reader—and apparently for the experiment logs, which are parked on Google Drive.
Key highlights
- Supports multiple model backends: OpenAI, Anthropic, and Gemini (API keys required)
- Entry point is
generate_loop.pywith domain selection; outputs land inoutputs/ meta_agent.pyandtask_agent.pycontain the core implementations;run_meta_agent.pyhandles diff generation- Includes Docker setup and Fedora-oriented system dependencies
- Experiment logs available for download (external Drive link)
- Academic paper published with arXiv ID 2603.19461
Caveats
- README carries a prominent safety warning: executes untrusted, model-generated code that “may still behave destructively”
- License is CC BY-NC-SA 4.0—non-commercial, share-alike—so don’t plan your startup around it
- Setup involves significant system-level dependencies (graphviz, cmake, ninja-build, various *-devel packages)
Verdict
Worth a look if you’re researching recursive self-improvement or meta-learning with LLMs. Skip it if you want a polished, production-ready agent framework; this is clearly research code with the guard rails left in the paper.