Autonomous RevOps AI Agent
AI agent that turns BigQuery marketing data into executive-ready strategy reports.
An autonomous CLI tool that turns raw BigQuery marketing data into executive-grade strategy reports on its own schedule, no analyst required to kick it off or clean it up afterward. It’s the difference between “how are we doing?” costing someone a four-hour SQL-and-spreadsheet session and costing one command.
Replacing manual SQL reporting
Weekly strategic reporting used to mean hours of manual SQL extraction and spreadsheet work before anyone could act on what it said. By the time a report was actually ready, RevOps and Marketing leaders were reacting to budget problems and channel cannibalization that had already been running for days, instead of catching them while they were still cheap to fix.
Executive Briefs, Deep Dives, and Rebudgeting Scenarios
The agent runs three reporting modules on its own schedule. Executive Briefs give a fast top-line read for leadership. Deep Dives go channel by channel for anyone who needs to act on the numbers, not just see them. Rebudgeting Scenarios is the most concrete output: the agent calculates efficiency frontiers across channels and generates five distinct scenarios per run, each one a specific, actionable move, such as “cut spend by 20% while maintaining pipeline,” rather than a vague directional recommendation.
Architecture: BigQuery, Claude API, and four layers
The system is split into four strict layers so the data path stays predictable and auditable end to end:
queries.py: pure SQL against the warehouse, nothing else.analyzer.py: Pandas data structuring and metric computation.strategist.py: the only layer that calls the Claude API. The model receives structured JSON, never raw rows.report.py: HTML report generation via Jinja2.
Python does the heavy mathematical work first: efficiency frontiers, scenario modeling, the numbers that actually drive the recommendation. Claude only sees the structured JSON that comes out the other end, and uses it to run forensic analysis on top of numbers that are already correct, rather than being asked to do arithmetic on raw warehouse rows.
Keeping warehouse data secure
The application authenticates with Application Default Credentials through secure API gateways. No warehouse data leaves the perimeter except as model inputs explicitly scoped per module. The LLM sees exactly the structured JSON strategist.py hands it, and nothing upstream of that.
Why a scheduled AI agent beats a chat interface
This project is a working proof that an LLM can move past being a chat window someone has to remember to open, and become a scheduled, deterministic part of the reporting pipeline itself. It standardizes the reporting methodology across every executive report instead of leaving it to whoever’s writing that week’s version, and it turns “how are we doing?” from a four-hour analyst question into a one-command run that’s ready before the standup.
Related projects
- Enterprise Ad Campaign Automation automates the campaign operations that feed performance data downstream.
- Daily Reporting Automation is the simpler ETL-and-email precursor to this reporting agent.