Autonomous RevOps AI Agent
Python CLI connecting BigQuery to Claude. Replaces ad-hoc analyst work with a deterministic reasoning engine.
The challenge
In complex marketing organizations, weekly strategic reporting often requires hours of manual SQL extraction and spreadsheet manipulation. This creates a bottleneck, forcing RevOps and Marketing leaders to be reactive rather than proactive when optimizing budgets and identifying channel cannibalization.
The solution
I engineered an “always-on” intelligence layer. Instead of a chatbot, this is an autonomous CLI tool that runs distinct reporting modules: Executive Briefs, Deep Dives, and Rebudgeting Scenarios. It autonomously extracts raw campaign data, calculates efficiency frontiers, and generates five distinct rebudgeting scenarios (e.g., “How to cut spend by 20% while maintaining pipeline”).
Architecture
To keep the system scalable and secure, it’s split into four strict layers:
queries.py: pure SQL against the warehouse.analyzer.py: Pandas data structuring and metric computation.strategist.py: LLM API calls. The model receives structured JSON, never raw rows.report.py: HTML report generation via Jinja2.
The LLM is used as a reasoning engine, not a calculator. Python does the heavy mathematical work first; Claude is then fed highly structured JSON to perform forensic analysis and prioritize actions.
Security
The application uses Application Default Credentials and secure API gateways; no warehouse data leaves the perimeter except as model inputs explicitly scoped per module.
Why it matters
This project is my proof of concept that LLMs can shift from chat interfaces into deterministic, action-oriented reasoning engines that actively drive revenue. It standardizes the methodology across executive reports and turns “How are we doing?” from a four-hour analyst question into a one-command run.