How aisolutions-hash/ai_pitch_agent works
AI Sales Agent is a Django B2B sales application whose main workflow is discovering and analyzing prospects, storing contacts, generating pitches, and sending tracked campaigns. The README also documents supplier email extraction, dashboard contact management, and scheduled scraping. A separate FastAPI application and its contact, email, social, and system routers are present in the tree; the README’s migration discussion is not reliable evidence for their wiring, so only routing setup visible in sales_fastapi/main.py is shown. Some feature links follow README-described flows because their view implementations were not sampled.
Main entry points: urls.py Django request routes · auto_campaign_service.py Campaign runner · services.py Scrape and analyze · views.py Dashboard and contacts
Components 23
Django application
- Django request routes
sales_project/urls.py - Dashboard and contacts
dashboard/views.py - Django records
ai_agent_pitch/models.py
Prospect discovery
- Supplier extractor
extractor/views.py - Scraper endpoints
scraper/views.py - Scrape and analyze
scraper/services.py
Pitch and campaigns
- Pitch generator
pitch_generator/views.py - Pitch utilities
pitch_generator/utils.py - Campaign endpoints
ai_agent_pitch/views.py - Campaign runner
ai_agent_pitch/auto_campaign_service.py - Email personalization
ai_agent_pitch/gemma_service.py
External services
- Contact and run storage
dashboard/gcs.py - Google Sheets
scraper/sheets_util.py - Gmail integration
dashboard/gmail.py - Gemini AI
- SerpAPI
- Email provider
FastAPI application
- FastAPI app
sales_fastapi/main.py - API routers
sales_fastapi/routers - Integration services
sales_fastapi/services.py - API database
sales_fastapi/database.py
Other components
- Browser user
- Cloud Scheduler
Connections 27
- Browser user → Django request routes: sends requests
- Django request routes → Dashboard and contacts: routes dashboard
- Django request routes → Supplier extractor: routes extraction
- Django request routes → Scraper endpoints: routes scraping
- Django request routes → Pitch generator: routes generation
- Django request routes → Campaign endpoints: routes campaigns
- Dashboard and contacts → Contact and run storage: manages contacts
- Dashboard and contacts → Django records: reads and writes
- Supplier extractor → Google Sheets: exports suppliers
- Scraper endpoints → Scrape and analyze: runs scraping
- Cloud Scheduler → Scraper endpoints: triggers scheduled run
- Scrape and analyze → SerpAPI: searches profiles
- Scrape and analyze → Gemini AI: analyzes profiles
- Scrape and analyze → Contact and run storage: upserts contacts
- Scrape and analyze → Google Sheets: exports profiles
- Pitch generator → Pitch utilities: uses utilities
- Pitch generator → Django records: stores pitch records
- Campaign endpoints → Campaign runner: starts campaign
- Campaign runner → Contact and run storage: loads contacts and saves progress
- Campaign runner → Django records: records campaign results
- Campaign runner → Email personalization: personalizes messages
- Campaign runner → Gmail integration: resolves sender
- Campaign runner → Email provider: sends campaign email
- Email personalization → Gemini AI: requests generation
- FastAPI app → API routers: registers routers
- FastAPI app → API database: initializes database
- Integration services → Email provider: sends SMTP mail