ProspectAI automates prospect research using AI. Upload a CSV of prospects and get back AI-powered fit scores, buying intent signals, and personalized email drafts.
Perfect for:
- 🎯 Sales teams researching prospects at scale
- 🤖 Building AI-powered sales tools
- 📊 Learning Motia's event-driven architecture
- 🚀 Prototyping sales automation
- 📤 CSV Upload: Upload prospect lists and process automatically
- 🤖 AI Analysis: Gemini 3 Pro or Claude Opus 4.5 generates fit scores (0-100)
- ✉️ Email Drafts: AI-generated personalized outreach emails
- 📡 Signal Collection: Gather 15+ data points via NewsAPI
- 🔔 Slack Alerts: Real-time notifications for high-scoring prospects
- 💬 AI Assistant: Natural language queries like "Who should I call this week?"
- 📊 Job Queue: Real-time monitoring with BullMQ
- 🎨 Workbench: Visual flow designer
- 💾 Built-in State: Motia's Redis-backed state - no external database needed
git clone https://github.com/MotiaDev/motia-examples.git
cd examples/ai-agents/specialized-agents/ai-prospect-agent
npm install
cd frontend && npm install && cd ..Create .env file:
# AI Provider (at least one required)
GEMINI_API_KEY=your_gemini_api_key
ANTHROPIC_API_KEY=your_anthropic_api_key
# Optional services
NEWS_API_KEY=your_newsapi_key
SLACK_WEBHOOK_URL=https://hooks.slack.com/services/xxx/xxx/xxx
RESEND_API_KEY=your_resend_api_key
FROM_EMAIL=your_from_email@example.comGet Free API Keys:
- Gemini: https://aistudio.google.com/app/apikey (1500 req/day free)
- Claude: https://console.anthropic.com ($5 free credits)
- NewsAPI: https://newsapi.org/register (100 req/day free)
- Slack: https://api.slack.com/messaging/webhooks (free)
npm run dev🚀 Backend: http://localhost:3000
📊 Workbench: http://localhost:3000
cd frontend
npm run dev🖥️ Frontend: http://localhost:5173
- Open http://localhost:5173
- Click "📤 Upload CSV"
- Select
test_prospects_small.csv(5 prospects) - Watch prospects appear with AI-generated fit scores!
CSV Upload → Parse & Validate → Queue Research Jobs
↓
┌───────────────────────────┐
│ Research Pipeline │
│ │
│ Collect Signals │
│ ↓ │
│ AI Analysis (Gemini) │
│ ↓ │
│ Generate Email │
└───────────────────────────┘
↓
Slack Alert → State → Stream → Frontend
| Component | Technology |
|---|---|
| Framework | Motia (event-driven orchestration) |
| AI | Gemini 3 Pro / Claude Opus 4.5 |
| News | NewsAPI |
| Storage | Motia State (Redis) |
| Frontend | React 19 + Vite |
Included test files:
test_prospects_small.csv- 5 prospects (recommended)prospectai_test_data_1000.csv- 1000 prospects
company_name,domain,email,first_name,last_name,title,industry,region,company_size,stage,estimated_revenue_millions,funding_status,last_funding_date,actively_hiring,website_updated,linkedin_urlPOST /api/prospects/upload- Upload CSVGET /api/prospects- Query prospectsGET /api/prospects/:id- Get prospect detailsGET /api/prospects/top- Get top-ranked prospects
POST /api/copilot/query- Natural language queriesPOST /api/copilot/actions- Execute actions
POST /api/outreach/send- Send email
GET /api/sse/subscribe/:batchId- SSE stream
- 📊 Dashboard: Grid view with color-coded fit scores
- 📤 CSV Upload: Drag & drop interface
- 🏆 Top Prospects: Quick filter for high scores
- 💬 AI Sidebar: Ask questions in plain English
- ⚡ Real-Time: Live updates via SSE
day14automation/
├── frontend/ # React frontend
│ └── src/
│ ├── App.tsx
│ └── App.css
├── src/
│ ├── api/ # HTTP endpoints
│ ├── events/ # Background jobs
│ ├── cron/ # Scheduled tasks
│ └── streams/ # Real-time streams
├── motia.config.ts
└── package.json
// Store data
await state.set('prospects', prospectId, data)
// Retrieve data
const prospect = await state.get('prospects', prospectId)
// Get all
const all = await state.getGroup('prospects')State Groups:
prospects- Prospect databatches- Upload batchesresearch_results- AI analysisbatch_scores- Score tracking
1. prospect.research.queued → CollectSignals
2. prospect.signals.collected → AnalyzeProspect
3. prospect.analyzed → GenerateEmail
4. prospect.research.completed → NotifySlack + UpdateBatchProgress
5. prospect.research.failed → HandleResearchFailure
| Task | Schedule | Description |
|---|---|---|
| DailyNewsMonitor | 8 AM daily | Monitor news for prospects |
| WeeklySummary | Monday 9 AM | Weekly Slack summary |
| StaleDataCleanup | Sunday 2 AM | Clean old data |
npm run dev # Start dev server
npm run generate-types # Regenerate types# Kill any existing processes
pkill -f "motia"
# Clean and restart
rm -rf .motia/compiled
npm run dev# Clean Redis data
rm -rf .motia/
pkill -f "redis-server"
npm run devSolution: Re-upload your CSV file after restarting
- Check backend:
curl http://localhost:3000/health - Verify CORS in
motia.config.ts - Check API URL in
frontend/src/App.tsx
For large uploads, increase Node memory:
NODE_OPTIONS="--max-old-space-size=8192" npm run devRecommended: Use smaller batches (100-500 prospects)
- Motia Docs: https://motia.dev/docs
- Motia GitHub: https://github.com/MotiaDev/motia
- Example Projects: https://motia.dev/docs/examples
Contributions welcome! Submit issues or PRs.
Apache License 2.0 - free for commercial use.
Built with ❤️ using Motia
⭐ Star this repo if you find it useful!




