Ranking Engineer Agent (REA): The Autonomous AI Agent Accelerating Meta’s Ads Ranking Innovation

Ashwin Kumar, Erwin Gao, Matan Levi, Sheela Yadawad, Sherman Wong, Sneha Iyer, Vinodh Kumar Sunkara17 Mar 2026

Problem

Meta's ads ranking models are mature, so each improvement is hard to find. Engineers write a hypothesis, design an experiment, launch training, debug failures in a large codebase, read the results and repeat. One cycle takes days to weeks, and the work is sequential. This manual loop caps how many ideas a team can test.

Example from the article: in Meta's first production rollout, three engineers working with the agent proposed launch improvements for eight models. Before, this took two engineers per model.

Solution in brief

Meta built an agent that runs the experiment loop itself. It sleeps while a training job runs and wakes when the job ends. It draws hypotheses from past experiments and from a research agent, and it handles routine failures from a runbook. An engineer approves the plan and the GPU budget before anything runs.

Questions this case answers
  • How to automate a multi-day model-experimentation loop (hypothesis, training run, failure handling, analysis) with an agent while a human controls the plan and the compute budget
  • How to keep an agent coherent across long-running asynchronous jobs that far exceed a single session
  • How to run ML experiments on a ranking model without an engineer driving every step over days or weeks?
  • How to keep an agent working across training jobs that last hours or days?

Tools and methods

  • REA Planner — builds the experiment plan together with an engineer and exports it
  • REA Executor — runs jobs through an agent loop and a wait state, and handles failures
  • Hibernate-and-wake — the agent hands the wait to a background system, shuts down and resumes when the job completes
  • Historical insights database — logged outcomes, metrics and configurations of past experiments
  • ML research agent — studies baseline configurations and proposes new optimizations
  • Confucius — Meta's internal agent framework for multistep reasoning, with an SDK for schedulers, experiment tracking and code navigation
Continue reading — it's free

Google or a one-time email code. No password.