Skip to content

Harshithk951/sales-intelligence-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


Β  Β  Β 



Β  Β  Β 



Typing SVG

🎯 What Is This?

A 4-agent enterprise pipeline that replaces 10+ hours of manual B2B sales research with a single company name.

Sales teams spend 2–3 hours per prospect researching companies, finding decision-makers, analyzing pain points, and crafting personalized outreach. This system does all of it β€” automatically, consistently, at scale.

Built as a capstone for the Google AI Agents Intensive (Nov 2025), delivering 6 out of 3 required features β€” all 3 core + 3 bonus.


⚑ Live Demo

Interface URL
🌐 Production Dashboard sales-intelligence-agent.vercel.app
πŸ—ΊοΈ Agent Orchestration View /dashboard/workflow
πŸ“‹ Terminal Log Viewer /dashboard/logs
πŸ“Š Intelligence Overview /dashboard

πŸ—οΈ System Architecture

╔══════════════════════════════════════════════════════════════╗
β•‘                        USER INPUT                            β•‘
β•‘                   "Company Name: Acme Corp"                  β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•¦β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
                            β•‘
                            β–Ό
╔══════════════════════════════════════════════════════════════╗
β•‘                   ORCHESTRATOR AGENT                         β•‘
β•‘         Coordinates all agents β”‚ Manages memory & state      β•‘
β•‘              Handles errors β”‚ Structured logging              β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•¦β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
                            β•‘
          ╔═════════════════╩══════════════════╗
          β•‘        SEQUENTIAL AGENT FLOW        β•‘
          β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•¦β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
                            β•‘
         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β”‚         1. RESEARCH AGENT           β”‚
         β”‚  Tools: Google Search API           β”‚
         β”‚  Output: Company overview + news    β”‚
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                            β”‚
         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β”‚         2. ANALYSIS AGENT           β”‚
         β”‚  Tools: Gemini 2.0 Flash            β”‚
         β”‚  Output: Challenges + opportunities β”‚
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                            β”‚
         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β”‚         3. CONTACT AGENT            β”‚
         β”‚  Tools: Search + custom logic       β”‚
         β”‚  Output: Prioritized contact list   β”‚
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                            β”‚
         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β”‚         4. OUTREACH AGENT           β”‚
         β”‚  Tools: Gemini 2.0 Flash            β”‚
         β”‚  Output: Personalized emails        β”‚
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                            β”‚
         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β”‚           FINAL OUTPUT              β”‚
         β”‚  πŸ“Š Complete Intelligence Report    β”‚
         β”‚  πŸ‘₯ Decision maker contacts         β”‚
         β”‚  πŸ“§ Ready-to-send email drafts      β”‚
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Cross-Cutting Architecture Concerns

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                  CROSS-CUTTING LAYER                    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Memory Bank  β”‚Session State β”‚Observability β”‚  Error    β”‚
β”‚ JSON cache   β”‚ Context acrossβ”‚ Latency +    β”‚ Handling  β”‚
β”‚ across runs  β”‚  executions  β”‚ token loggingβ”‚ Recovery  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

βœ… Feature Checklist

# Feature Status Details
1 Multi-Agent System βœ… Core 4 specialized agents with class-based abstractions
2 Tools Integration βœ… Core Google Search API + custom business logic tools
3 Long-Term Memory βœ… Core JSON memory bank persists research across sessions
4 Session & State Management βœ… Bonus SessionState maintains context across agent executions
5 Observability βœ… Bonus Per-agent logging: latency, error level, token usage
6 Gemini Integration βœ… Bonus Analysis + Outreach agents powered by Gemini 2.0 Flash

Result: 6/3 required features β€” all 3 core + 3 bonus


πŸ–₯️ Production Frontend

Built with Next.js 15 App Router, React Flow, and Framer Motion β€” deployed to Vercel.

Dashboard Overview (/dashboard)

  • 4 live metrics cards: companies researched, contacts found, emails generated, cache hit rate
  • Agent execution timeline with animated status chips per agent
  • Company intelligence summary panel
  • Memory bank visualization with cached entries + timestamps
  • Outreach email preview with per-contact tabs

Orchestration View (/dashboard/workflow)

  • Full React Flow agent graph with animated data-flow edges
  • Per-node status indicators: idle β†’ running β†’ complete β†’ error
  • Animated bezier connections showing pipeline execution state
  • Custom node components matching the agent console design system

Terminal Log Viewer (/dashboard/logs)

  • Dark monospace terminal UI
  • Columns: timestamp β”‚ agent β”‚ level β”‚ message
  • Auto-scroll during live execution

πŸš€ Quick Start

Prerequisites

  • Python 3.8+
  • Node.js 18+ (for frontend)
  • Google AI Studio API key β†’ Get one here

Backend Setup

# 1. Clone
git clone https://github.com/Harshithk951/sales-intelligence-agent
cd sales-intelligence-agent

# 2. Python environment
python3 -m venv venv
source venv/bin/activate        # Mac/Linux
# venv\Scripts\activate         # Windows

# 3. Install dependencies
pip install -r requirements.txt

# 4. Configure
cp .env.example .env
# Add your GOOGLE_API_KEY to .env

# 5. Run
python main.py

Frontend Setup

cd frontend
npm install
cp .env.example .env.local
# Set NEXT_PUBLIC_API_URL=http://localhost:8000
npm run dev
# β†’ http://localhost:3000

Output Files Generated

reports/          ← JSON intelligence reports per company
logs/             ← agent_YYYYMMDD.log with per-agent metrics
memory_bank.json  ← Research cache (persists across runs)

πŸ“ Project Structure

sales-intelligence-agent/
β”‚
β”œβ”€β”€ agents/                    # Core agent implementations
β”‚   β”œβ”€β”€ research_agent.py      # Google Search β†’ company overview
β”‚   β”œβ”€β”€ analysis_agent.py      # Gemini β†’ challenges & opportunities
β”‚   β”œβ”€β”€ contact_agent.py       # Search + logic β†’ decision makers
β”‚   └── outreach_agent.py      # Gemini β†’ personalized emails
β”‚
β”œβ”€β”€ tools/
β”‚   └── search_tool.py         # Google Search API wrapper
β”‚
β”œβ”€β”€ utils/
β”‚   β”œβ”€β”€ memory.py              # Memory bank + session state
β”‚   └── logger.py              # Per-agent observability logging
β”‚
β”œβ”€β”€ frontend/                  # Next.js 15 production dashboard
β”‚   β”œβ”€β”€ src/app/
β”‚   β”‚   β”œβ”€β”€ page.tsx           # Landing page
β”‚   β”‚   └── dashboard/         # Dashboard + workflow + logs
β”‚   └── src/components/
β”‚       └── workflow/          # React Flow agent graph
β”‚
β”œβ”€β”€ main.py                    # Orchestrator entry point
β”œβ”€β”€ requirements.txt
└── .env.example

πŸ”§ Configuration

# .env

# Required
GOOGLE_API_KEY=your_api_key_here

# Optional
MODEL_NAME=gemini-2.0-flash-exp   # or gemini-pro
MAX_RETRIES=3
TIMEOUT_SECONDS=30

Change number of contacts generated:

# agents/outreach_agent.py, line 45
for contact in contacts[:3]:  # ← adjust here

πŸ“Š Example Output

πŸ“Š SALES INTELLIGENCE REPORT: Acme Corporation
════════════════════════════════════════════════════

🏒 Company:   Acme Corporation | Technology/SaaS | 100-500 employees

🎯 Challenges Identified (3):
   1. Scaling infrastructure under rapid growth
   2. Managing technical debt accumulation
   3. Integrating disparate internal systems

πŸ‘₯ Decision Makers Found (3):
   β€’ John Smith       β€” Chief Technology Officer
   β€’ Sarah Johnson    β€” VP of Engineering
   β€’ Michael Chen     β€” Director of Product

πŸ“§ Outreach Emails Generated: 3
πŸ“ Report saved β†’ reports/acme_corporation_20251115.json
⚑ Total execution time: 47.3s
πŸ’Ύ Research cached β†’ memory_bank.json

πŸ§ͺ Testing

# Test with known companies
python main.py
# Enter: Salesforce

# Verify memory caching (2nd run should be instant)
python main.py
# Enter: Salesforce
# β†’ "Found cached research for Salesforce (saved 38.2s)"

πŸ“š Technical Decisions

Decision Choice Reason
Agent topology Sequential Each agent requires previous agent's output as context
Memory layer JSON file Portable, zero-dependency, sufficient for demo scale
LLM Gemini 2.0 Flash Fast, cost-effective, strong at analysis + generation
Frontend Next.js 15 App Router Production deployment, React Flow support, Vercel-native
Observability File + console logging Dual output β€” human-readable in terminal, parseable for dashboard
API layer Stubbed with hot-swap interface Decouples frontend from backend; single env var to connect real Python backend

πŸ—ΊοΈ Roadmap

  • Wire live Python backend to Next.js dashboard via FastAPI
  • Real Google Custom Search API integration (replace mock)
  • LinkedIn API for verified contact data
  • Async parallel agent execution for sub-10s pipeline
  • Email sending via SendGrid/Gmail API
  • Multi-company batch processing mode
  • Deploy backend to Google Cloud Run
  • Vector store integration (ChromaDB) for semantic memory

πŸ‘¨β€πŸ’» Author

Harshith Kumar Mannepalli

Portfolio GitHub LinkedIn


πŸ™ Acknowledgments

  • Google AI & Kaggle β€” AI Agents Intensive Course (Nov 2025)
  • Google ADK team β€” Multi-agent orchestration framework

⭐ Star this repo if it helped you build something.

About

Smart Sales Intelligence Agent with multi-agent architecture

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors