← all repositories
facebookresearch/HyperAgents

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.

2.6k stars Python AgentsLanguage Models
HyperAgents
Velocity · 7d
+32
★ / day
Trend
steady
star history

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.py with domain selection; outputs land in outputs/
  • meta_agent.py and task_agent.py contain the core implementations; run_meta_agent.py handles 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.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.