Back office ops · Production

Inside Meta's Home Grown AI Analytics Agent: From Hack to Company-Wide Tool

The problem

Data scientists at Meta are repeatedly asked similar questions within a familiar set of tables, spending hours on routine analysis, while their accumulated query knowledge lived scattered across query editors and notebooks and remained invisible to any system that might learn from it.

Workflow diagram · grounded in source
1
User submits analysis question
trigger
“An analyst can ask "why did signups drop last Tuesday?"”
2
Discover data and gather context
ai_action
“Offline LLMs process every query an employee has run, generating descriptions of the tables they use, how they use them, and what kinds of analyses they perform. These summaries, along with example queries and column-level documentation,…”
3
Recipe auto-selection
routing
“Recipes can be explicitly chosen by the user or auto-selected, and the agent reads short descriptions of all enabled recipes and picks the most relevant one based on the question being asked”
4
Iterative SQL reasoning loop
ai_action
“The agent will query the signup table, notice the numbers look normal, check for a logging change, find a deploy that altered the event schema, and surface the root cause. This happens all in a chain of queries that build on the last. Wh…”
5
Custom validation check
validation
“Custom Validations: Natural-language validation rules that a separate AI checks against the agent's output before presenting results. For example: "WAU should be < 8 billion" or "Always filter by is_test=false."”
6
Transparent answer with SQL
output
“Every data point Analytics Agent surfaces is accompanied by the SQL query that produced it, front and center.”
Reported outcome

Six months after the prototype moved to production, 77% of Meta's Data Scientists and Data Engineers use Analytics Agent on a weekly basis, alongside roughly 5x as many users from non-data roles, and 4,500+ community-created recipes had been used 150,000 times.

Reported metrics
weekly active users among Data Scientists and Data Engineers77%
Queries relying only on tables queried in preceding 90 days88%
Non-data role users relative to data role usersroughly 5x as many users from non-data roles
Weekly active users within weeks of launchhundreds of weekly active users
Show all 10 reported metrics
weekly active users among Data Scientists and Data Engineers77%
queries relying only on tables queried in preceding 90 days88%
non-data role users relative to data role usersroughly 5x as many users from non-data roles
weekly active users within weeks of launchhundreds of weekly active users
time from prototype to company-wide toolroughly six months
feedback posts in H2 2025750+
wins and best practices posts in H2 2025130+
community talks in H2 202540+
community-created recipes4,500+
total recipe uses150,000
Reported stack
Analytics AgentSQLPythonRScubaLLMsmatplotlib
Source
https://medium.com/@AnalyticsAtMeta/inside-metas-home-grown-ai-analytics-agent-4ea6779acfb3
Read source ↗

Frequently asked questions

What did this team achieve with this AI workflow?

Six months after the prototype moved to production, 77% of Meta's Data Scientists and Data Engineers use Analytics Agent on a weekly basis, alongside roughly 5x as many users from non-data roles, and 4,500+ community-…

What tools did this team use?

Analytics Agent, SQL, Python, R, Scuba, LLMs, matplotlib.

What results were reported?

weekly active users among Data Scientists and Data Engineers: 77%; Queries relying only on tables queried in preceding 90 days: 88%; Non-data role users relative to data role users: roughly 5x as many users from non-data roles; Weekly active users within weeks of launch: hundreds of weekly active users (source-reported, not independently verified).

How is this back office ops AI workflow structured?

User submits analysis question → Discover data and gather context → Recipe auto-selection → Iterative SQL reasoning loop → Custom validation check → Transparent answer with SQL.