Multi-Agent Ad Campaign Optimizer
Built by Vivek Yadav
AdMind is a full-stack multi-agent AI application that analyzes paid advertising campaign data from a CSV file and turns it into a practical optimization report.
The app simulates how a real growth team might review Google Ads or Meta Ads performance: one agent audits the account, another creates a strategy, and a third rewrites weak ad copy. Results stream live into a clean React interface so users can watch the analysis build step by step.
This project is designed as a portfolio-ready AI engineering project: it combines agent orchestration, structured AI outputs, FastAPI streaming, CSV analysis, and a polished frontend.
AdMind accepts ad campaign CSV data and produces:
- A performance audit with spend, revenue, ROAS, wasted spend, and issue severity
- Strategic recommendations such as pausing keywords, reallocating budget, and testing copy
- Before/after ad copy rewrites for underperforming keywords
- A live visual pipeline showing each agent as it runs
- A sample-data workflow so anyone can test the product immediately
CSV Upload
|
v
Agent 1: Campaign Auditor
|
v
Agent 2: Strategy Advisor
|
v
Agent 3: Ad Copywriter
|
v
Final Optimization Report
Finds performance problems such as:
- Wasted spend
- Low CTR keywords
- Zero-conversion keywords
- High CPC issues
- Underperforming campaigns or ad groups
Turns the audit findings into prioritized actions:
- Pause inefficient keywords
- Reduce bids on costly traffic
- Reallocate budget toward stronger campaigns
- Increase budget for high-ROAS areas
- Recommend new copy tests
Creates improved ad copy for weak keywords:
- Better headlines
- Stronger descriptions
- Clearer calls to action
- Copy aligned with search intent
- CSV upload with validation
- One-click sample data
- Real-time Server-Sent Events streaming
- Multi-agent backend pipeline
- Structured Pydantic schemas for AI outputs
- FastAPI backend with sync and streaming endpoints
- React + Tailwind dashboard UI
- Gemini API integration with mock fallback for quota-safe demos
| Layer | Technology |
|---|---|
| Frontend | React 18, Vite, TailwindCSS, lucide-react |
| Backend | Python, FastAPI, Pydantic |
| AI | Google Gemini API |
| Streaming | Server-Sent Events |
| Data Input | CSV upload and sample CSV |
| Runtime | Stateless, in-memory pipeline |
AdMind/
backend/
agents/
auditor.py
strategist.py
copywriter.py
pipeline.py
models/
schemas.py
services/
csv_parser.py
gemini.py
main.py
sample_data.csv
requirements.txt
frontend/
src/
components/
services/
App.jsx
main.jsx
vite.config.js
tailwind.config.js
assets/
admind-logo.svg
cd backend
.\.venv\Scripts\python.exe main.pyIf you are setting up from scratch:
cd backend
pip install -r requirements.txt
copy .env.example .env
python main.pyUpdate backend/.env:
GEMINI_API_KEY=your_key_here
GEMINI_MODEL=gemini-2.0-flash
GEMINI_USE_MOCK_FALLBACK=trueGEMINI_USE_MOCK_FALLBACK=true keeps the demo working if Gemini quota is unavailable.
cd frontend
npm.cmd install
npm.cmd run devOpen:
http://localhost:5173
Then click Try Sample Data.
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /health |
Backend health check |
| GET | /sample-csv |
Download sample campaign CSV |
| POST | /analyze |
Run pipeline with SSE streaming |
| POST | /analyze-sync |
Run pipeline and return one JSON response |
AdMind demonstrates how agentic AI can be applied to a practical business workflow. Instead of asking one generic model to do everything, the system separates the work into specialized agents. This makes the pipeline easier to reason about, easier to test, and closer to how production AI systems are designed.
It also shows the complete product loop: upload data, process it through AI agents, stream progress live, and present results in a polished interface.
Completed:
- Backend foundation
- CSV parser
- Gemini service
- Three-agent pipeline
- FastAPI routes
- SSE streaming
- React frontend
- Sample data workflow
- Professional README and branding
Vivek Yadav
Project: AdMind - Multi-Agent Ad Campaign Optimizer