Engineering at Meta

Capacity Efficiency at Meta: How Unified AI Agents Optimize Performance at Hyperscale

5.5内容质量
Capacity Efficiency at Meta: How Unified AI Agents Optimize Performance at Hyperscale

TL;DR · AI 摘要

文章预告Meta将介绍其AI代理平台如何优化超大规模系统性能,但正文内容缺失,仅提供标题和作者信息。

核心要点

  • 文章标题暗示Meta使用统一AI代理提升容量效率
  • 实际正文未提供技术细节或实施案例
  • 信息不完整,无法验证所述系统的有效性
#AI Agents#Capacity Efficiency#Meta#Infrastructure
打开原文

Capacity Efficiency at Meta: How Unified AI Agents Optimize Performance at Hyperscale - Engineering at Meta

Skip to content

[![Image 1: Engineering at Meta](https://engineering.fb.com/wp-content/themes/code-fb-com/img/logo-meta.svg)](https://engineering.fb.com/ "Engineering at Meta")

Search this site Image 2

  • [Open Source](http://engineering.fb.com/2026/04/16/developer-tools/capacity-efficiency-at-meta-how-unified-ai-agents-optimize-performance-at-hyperscale/# "Open Source")
  • [Open Source](https://engineering.fb.com/category/open-source/ "Open Source")
  • [Meta Open Source](https://opensource.fb.com/ "Meta Open Source")
  • [Platforms](http://engineering.fb.com/2026/04/16/developer-tools/capacity-efficiency-at-meta-how-unified-ai-agents-optimize-performance-at-hyperscale/# "Platforms")
  • [Android](https://engineering.fb.com/category/android/ "Android")
  • [iOS](https://engineering.fb.com/category/ios/ "iOS")
  • [Web](https://engineering.fb.com/category/web/ "Web")
  • [Infrastructure Systems](http://engineering.fb.com/2026/04/16/developer-tools/capacity-efficiency-at-meta-how-unified-ai-agents-optimize-performance-at-hyperscale/# "Infrastructure Systems")
  • [Core Infra](https://engineering.fb.com/category/core-infra/ "Core Infra")
  • [Data Infrastructure](https://engineering.fb.com/category/data-infrastructure/ "Data Infrastructure")
  • [DevInfra](https://engineering.fb.com/category/developer-tools/ "DevInfra")
  • [Production Engineering](https://engineering.fb.com/category/production-engineering/ "Production Engineering")
  • [Security & Privacy](https://engineering.fb.com/category/security/ "Security & Privacy")
  • [Research Publications](https://research.facebook.com/publications/research-areas/systems-infrastructure/ "Research Publications")
  • [Physical Infrastructure](http://engineering.fb.com/2026/04/16/developer-tools/capacity-efficiency-at-meta-how-unified-ai-agents-optimize-performance-at-hyperscale/# "Physical Infrastructure")
  • [Connectivity](https://engineering.fb.com/category/connectivity/ "Connectivity")
  • [Data Center Engineering](https://engineering.fb.com/category/data-center-engineering/ "Data Center Engineering")
  • [Networking & Traffic](https://engineering.fb.com/category/networking-traffic/ "Networking & Traffic")
  • [Research Publications](https://research.facebook.com/publications/research-areas/networking-connectivity/ "Research Publications")
  • [Video Engineering & AR/VR](http://engineering.fb.com/2026/04/16/developer-tools/capacity-efficiency-at-meta-how-unified-ai-agents-optimize-performance-at-hyperscale/# "Video Engineering & AR/VR")
  • [Video Engineering](https://engineering.fb.com/category/video-engineering/ "Video Engineering")
  • [Virtual Reality](https://engineering.fb.com/category/virtual-reality/ "Virtual Reality")
  • [Research Publications](https://research.facebook.com/publications/research-areas/augmented-reality-virtual-reality/ "Research Publications")
  • [Artificial Intelligence](http://engineering.fb.com/2026/04/16/developer-tools/capacity-efficiency-at-meta-how-unified-ai-agents-optimize-performance-at-hyperscale/# "Artificial Intelligence")
  • [ML Applications](https://engineering.fb.com/category/ml-applications/ "ML Applications")
  • [AI Research](https://engineering.fb.com/category/ai-research/ "AI Research")
  • [Research Publications](https://ai.facebook.com/results/?content_types%5B0%5D=publication "Research Publications")
  • [Watch Videos](http://engineering.fb.com/videos "Watch Videos")

POSTED ON APRIL 16, 2026 TO DevInfra, ML Applications, Production Engineering

Capacity Efficiency at Meta: How Unified AI Agents Optimize Performance at Hyperscale

Image 3
Image 3

By [Tommy Tran](https://engineering.fb.com/author/tommy-tran/ "Posts by Tommy Tran"), [Michael Zetune](https://engineering.fb.com/author/michael-zetune/ "Posts by Michael Zetune")

  • We’re sharing insights into Meta’s Capacity Efficiency Program, where we’ve built an AI agent platform that helps automate finding and fixing performance issues throughout our infrastructure.
  • By leveraging encoded domain expertise across a unified, standardized tool interface these agents help save power and free up engineers’ time away from addressing performance issues to innovating on new products.
  • * *

We’ve built a unified AI agent platform that encodes the domain expertise of senior efficiency engineers into reusable, composable skills. These agents now automate both finding and fixing performance issues, recovering hundreds of megawatts (MW) of power and compressing hours of manual regression investigation into minutes, enabling the program to scale MW delivery across a growing number of product areas without proportionally scaling headcount.

On defense, FBDetect, Meta’s in-house regression detection tool, catches thousands of regressions weekly; faster automated resolution means fewer megawatts wasted compounding across the fleet. On offense, AI-assisted opportunity resolution is expanding to more product areas every half, handling a growing volume of wins that engineers would never get to manually. Together, this is how Meta’s Capacity Efficiency Program keeps growing MW delivery without proportionally growing the team. The end goal is a self-sustaining efficiency engine where AI handles the long tail.

Here’s how it works and where we’re headed:

  • Efficiency at hyperscale requires both offense (proactively finding optimizations) and defense (catching and mitigating regressions that make it to production); AI can accelerate both.
  • We’ve built a unified platform where standardized tool interfaces combine with encoded domain expertise to automate investigation on both sides.
  • These AI systems are now the infrastructure for the Capacity Efficiency program, which has recovered hundreds of megawatts of power, enough to power hundreds of thousands of American homes for a year.
  • Automating diagnoses can compress ~10 hours of manual investigation into ~30 minutes, while AI agents fully automate the path from efficiency opportunity to ready-to-review pull request.

Introducing the Capacity Efficiency Program

When the code you ship serves more than 3 billion people, even a 0.1% performance regression can translate to significant additional power consumption.

In Meta’s Capacity Efficiency organization, we see efficiency as a two-sided effort:

  1. Offense: searching for opportunities (proactive code changes) to make our existing systems more efficient, and deploying them.
  2. Defense: monitoring resource usage in production to detect regressions, root-cause them to a pull request, and deploy mitigations.

These systems worked well and have played an important role in Meta’s efficiency efforts for years. However, actually resolving the issues they surface introduces a new bottleneck: human engineering time.

This human engineering time can be spent on any of the following activities:

  • Querying profiling data to find opportunities to optimize hot functions.
  • Reviewing an efficiency opportunity’s description, documentation, and past examples to understand the best approach for implementing an optimization.
  • Checking recent code and configuration deployments that could have caused a step change in resource usage.
  • Looking through recent internal discussions about launches that might have been related to a regression.

Many engineers at Meta use our efficiency tools to work on these problems every day. But no matter how high-quality the tooling is, engineers have limited time to address performance issues when innovating on new products is our top priority.

We started asking: What if AI could handle investigation and resolution?

Offense and Defense Share the Same Structure

The breakthrough was realizing that both problems share the same structure:

Image 4This meant we didn’t need two separate AI systems. We needed one platform that could serve both.

We built it on two layers:

  1. MCP Tools: These are standardized interfaces for LLMs to invoke code. Each tool does one thing: query profiling data, fetch experiment results, retrieve configuration history, search code, or extract documentation.
  2. Skills: These encode domain expertise about performance efficiency. A skill can tell an LLM which tools to use and how to interpret results. It captures reasoning patterns that experienced engineers developed over years, such as “consult the top GraphQL endpoints for endpoint latency regressions” or “look for recent schema changes if the affected function handles serialization”

Together, tools and skills promote a generalized language model into something that can apply the domain expertise typically held by senior engineers. The same tools can power both offense and defense. Only the skills differ.

Defense: Catching Regressions Before They Compound

FBDetect is Meta’s in-house regression detection tool that can catch performance regressions as small as 0.005% in noisy production environments. It analyzes time series data like this:

Image 5
Image 5

When FBDetect finds a regression, we immediately attempt to root-cause it to a code or configuration change; this is a vital first step to understand what happened. It’s done primarily with traditional techniques such as correlating regression functions with recent pull requests. After a root cause is determined, engineers are typically notified and expected to take action, such as optimizing the recent code change. We’ve added an additional feature to make this faster:

AI Regression Solver

Our AI Regression Solver is the newest and most promising component of FBDetect, which produces a pull request to fix forward the regression automatically. Traditionally, root-causes (pull requests) that created performance regressions were either rolled back (slowing engineering velocity) or ignored (increasing infrastructure resource use unnecessarily).

Now, our in-house coding agent is activated to do the following:

  1. Gather context with tools: find the symptoms of the regression, such as the functions that regressed; look up the root cause (a pull request) of the regression, including the exact files and lines changed.
  2. Apply domain expertise with skills:use regression mitigation knowledge for the particular codebase, language, or regression type. For example, regressions from logging can be mitigated by increasing sampling.
  3. Create a resolution:produce a new pull request and send it to the original root cause author for review.

Offense: Turning Opportunities Into Shipped Code

On the offensive side, “efficiency opportunities” are proposed conceptual code changes that are believed to improve performance of existing code. We built a system where engineers can view an opportunity and request an AI-generated pull request that implements it. What used to require hours of investigation now takes minutes to review and deploy.

The pipeline mirrors the defensive AI Regression Solver:

  1. Gather context with tools: The AI agent looks up:
  2. Opportunity metadata.
  3. Documentation explaining the optimization pattern.
  4. Examples showing how similar opportunities were resolved.
  5. The specific files and functions involved.
  6. Validation criteria for confirming the fix works.
  1. Apply domain expertise with skills:use expert engineers’ knowledge on a specific type of efficiency opportunity, encoded into a skill. For example, memoizing a given function to reduce CPU usage.
  2. Create resolution:produce a candidate fix with guardrails, verify syntax and style, confirm it addresses the right issue. Surface the generated code in the engineer’s editor, ready to apply with one click.

Importantly, we use the same tools as defense: profiling data, documentation, code search. What differs is the skills.

One Platform, Compounding Returns

Our unified architecture with shared tools and data sources has been a clean abstraction. Each existing and new agent has an easy way to gather context about performance with the interfaces we’ve made, without the need to reinvent the wheel.

This post focused on our first use cases: performance regressions and opportunities. Within a year, the same foundation powered additional applications: conversational assistants for efficiency questions, capacity planning agents, personalized opportunity recommendations, guided investigation workflows, and AI-assisted validation. Each new capability requires few to no new data integrations since they can just compose existing tools with new skills.

Impact

The results of the Capacity Efficiency program are significant: We’ve recovered hundreds of megawatts of power. The AI systems for both offense and defense contribute to supporting this effort.

But the deeper change is in how offense and defense reinforce each other: Engineers who spent mornings on defensive triage now review AI-generated analyses in minutes. Engineers using our efficiency tools can now get AI-assisted code instead of starting from scratch. The daunting question of “where do I even start?” has been replaced by reviewing and deploying high-impact fixes.

Share this:

Read More in DevInfra

View All

Image 6
Image 6

APR 9, 2026

Escaping the Fork: How Meta Modernized WebRTC Across 50+ Use Cases

Image 7
Image 7

APR 8, 2026

Trust But Canary: Configuration Safety at Scale

Image 8
Image 8

APR 6, 2026

How Meta Used AI to Map Tribal Knowledge in Large-Scale Data Pipelines

Image 9
Image 9

APR 2, 2026

KernelEvolve: How Meta’s Ranking Engineer Agent Optimizes AI Infrastructure

Image 10
Image 10

MAR 17, 2026

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

Image 11
Image 11

FEB 11, 2026

The Death of Traditional Testing: Agentic Development Broke a 50-Year-Old Field, JiTTesting Can Revive It

Related Posts

  • * *

![Image 12Aug 13, 2025 #### Creating AI agent solutions for warehouse data access and security](https://engineering.fb.com/2025/08/13/data-infrastructure/agentic-solution-for-warehouse-data-access/)

![Image 13Dec 19, 2025 #### DrP: Meta's Root Cause Analysis Platform at Scale](https://engineering.fb.com/2025/12/19/data-infrastructure/drp-metas-root-cause-analysis-platform-at-scale/)

![Image 14Nov 21, 2025 #### Zoomer: Powering AI Performance at Meta's Scale Through Intelligent Debugging and Optimization](https://engineering.fb.com/2025/11/21/data-infrastructure/zoomer-powering-ai-performance-meta-intelligent-debugging-optimization/)

Related Positions

  • * *

See All Jobs

Available Positions

  • * *

See All Jobs

Technology at Meta

Open Source

Meta believes in building community through open source technology. Explore our latest projects in Artificial Intelligence, Data Infrastructure, Development Tools, Front End, Languages, Platforms, Security, Virtual Reality, and more.

  • Image 21: android ANDROID
  • Image 22: ios iOS
  • Image 23: web WEB
  • Image 24: backend BACKEND
  • Image 25: hardware HARDWARE

Learn More

Image 26: Meta
Image 26: Meta

Engineering at Meta is a technical news resource for engineers interested in how we solve large-scale technical challenges at Meta.

© 2026 Meta

To help personalize content, tailor and measure ads and provide a safer experience, we use cookies. By clicking or navigating the site, you agree to allow our collection of information on and off Facebook through cookies. Learn more, including about available controls: Cookie Policy

Accept