Skip to content

Harshithk951/sales-intelligence-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– Smart Sales Intelligence Agent

Capstone Project - AI Agents Intensive Course (Nov 2025)
Track: Enterprise Agents
Author: Harshith


πŸ“‹ Executive Summary

The Smart Sales Intelligence Agent is an enterprise multi-agent system that automates sales research and outreach, saving sales teams 10+ hours per week per prospect. By simply providing a company name, the system researches the company, identifies business challenges, finds decision-makers, and generates personalized outreach emailsβ€”all automatically.

Problem Statement

Sales teams waste countless hours manually researching prospects, analyzing their business needs, finding the right contacts, and crafting personalized outreach. This manual process is:

  • ⏰ Time-intensive: 2-3 hours per prospect
  • πŸ“Š Inconsistent: Quality varies by researcher
  • πŸ”„ Repetitive: Same research done multiple times
  • πŸ’° Expensive: High-value sales time spent on research

Solution

An intelligent multi-agent system that automates the entire sales intelligence workflow through coordinated AI agents, each specialized in a specific task.

Value Delivered

  • ⚑ 10+ hours saved per prospect researched
  • 🎯 Higher quality insights through AI analysis
  • πŸ“ˆ Scalable to hundreds of prospects
  • πŸ’Ό Consistent output quality every time

πŸ—οΈ Architecture

Multi-Agent System Design

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    USER INPUT                            β”‚
β”‚              "Company Name: Acme Corp"                   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                      β”‚
                      β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              ORCHESTRATOR AGENT                          β”‚
β”‚  β€’ Coordinates all agents                                β”‚
β”‚  β€’ Manages memory & state                                β”‚
β”‚  β€’ Handles errors & logging                              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                      β”‚
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚  SEQUENTIAL AGENT FLOW     β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                      β”‚
                      β–Ό
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚ 1️⃣  RESEARCH AGENT                       β”‚
        β”‚  β€’ Gathers company info                  β”‚
        β”‚  β€’ Tools: Google Search                  β”‚
        β”‚  β€’ Output: Company overview + news       β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                      β”‚
                      β–Ό
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚ 2️⃣  ANALYSIS AGENT                       β”‚
        β”‚  β€’ Analyzes business challenges          β”‚
        β”‚  β€’ Tools: Gemini LLM                     β”‚
        β”‚  β€’ Output: Challenges + opportunities    β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                      β”‚
                      β–Ό
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚ 3️⃣  CONTACT AGENT                        β”‚
        β”‚  β€’ Finds decision makers                 β”‚
        β”‚  β€’ Tools: Search + Custom logic          β”‚
        β”‚  β€’ Output: Prioritized contact list      β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                      β”‚
                      β–Ό
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚ 4️⃣  OUTREACH AGENT                       β”‚
        β”‚  β€’ Generates personalized emails         β”‚
        β”‚  β€’ Tools: Gemini LLM                     β”‚
        β”‚  β€’ Output: Ready-to-send emails          β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                      β”‚
                      β–Ό
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚          FINAL OUTPUT                    β”‚
        β”‚  πŸ“Š Complete Intelligence Report         β”‚
        β”‚  β€’ Company analysis                      β”‚
        β”‚  β€’ Key challenges                        β”‚
        β”‚  β€’ Decision maker contacts               β”‚
        β”‚  β€’ Personalized email drafts             β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Cross-Cutting Concerns

  • Memory Bank: Caches research to avoid redundant searches
  • Session State: Maintains context across agent executions
  • Observability: Comprehensive logging and tracing
  • Error Handling: Graceful failure recovery

βœ… Required Features Implemented

This project demonstrates 6 out of 3 required capstone features:

  1. βœ… Multi-Agent System - Sequential agent pipeline with 4 specialized agents
  2. βœ… Tools - Google Search tool + custom business logic tools
  3. βœ… Long-Term Memory - Memory Bank stores and retrieves past research
  4. βœ… Session & State Management - SessionState maintains execution context
  5. βœ… Observability - Comprehensive logging system with file and console output
  6. βœ… Uses Gemini (Bonus!) - Analysis and Outreach agents powered by Gemini 2.0

πŸš€ Getting Started

Prerequisites

  • Python 3.8 or higher
  • Google AI Studio API key (Get one here)

Installation

  1. Clone the repository
git clone <your-repo-url>
cd sales-intelligence-agent
  1. Create virtual environment
python3 -m venv venv
source venv/bin/activate  # On Mac/Linux
# OR
venv\Scripts\activate     # On Windows
  1. Install dependencies
pip install -r requirements.txt
  1. Configure environment variables
# Copy the example env file
cp .env.example .env

# Edit .env and add your API key
GOOGLE_API_KEY=your_api_key_here

Running the Agent

Basic usage:

python main.py

The system will prompt you for a company name, then automatically:

  1. Research the company
  2. Analyze their business challenges
  3. Find decision-makers
  4. Generate personalized emails
  5. Save a complete report

Output:

  • Console: Real-time progress and summary
  • reports/: JSON files with complete intelligence reports
  • logs/: Detailed execution logs
  • memory_bank.json: Cached research data

πŸ“ Project Structure

sales-intelligence-agent/
β”œβ”€β”€ main.py                 # Main orchestrator
β”œβ”€β”€ requirements.txt        # Python dependencies
β”œβ”€β”€ .env                    # API keys (not committed)
β”œβ”€β”€ .gitignore             # Git ignore rules
β”œβ”€β”€ README.md              # This file
β”‚
β”œβ”€β”€ agents/                # Agent implementations
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ research_agent.py   # Gathers company data
β”‚   β”œβ”€β”€ analysis_agent.py   # Analyzes challenges (Gemini)
β”‚   β”œβ”€β”€ contact_agent.py    # Finds decision makers
β”‚   └── outreach_agent.py   # Generates emails (Gemini)
β”‚
β”œβ”€β”€ tools/                 # Custom tools
β”‚   β”œβ”€β”€ __init__.py
β”‚   └── search_tool.py      # Google Search wrapper
β”‚
β”œβ”€β”€ utils/                 # Utilities
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ memory.py          # Memory Bank & Session State
β”‚   └── logger.py          # Logging & observability
β”‚
β”œβ”€β”€ reports/               # Generated reports (created at runtime)
β”œβ”€β”€ logs/                  # Execution logs (created at runtime)
└── memory_bank.json       # Research cache (created at runtime)

🎯 Example Output

Input

Enter company name: Acme Corporation

Output Summary

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

🏒 Company Overview:
   Industry: Technology/SaaS
   Size: 100-500 employees
   Location: San Francisco, CA

🎯 Key Challenges (3):
   1. Scaling infrastructure while maintaining performance
   2. Managing technical debt from rapid growth
   3. Integrating disparate systems and data sources

πŸ‘₯ Priority Contacts (3):
   β€’ John Smith - Chief Technology Officer
   β€’ Sarah Johnson - VP of Engineering
   β€’ Michael Chen - Director of Product

πŸ“§ Outreach Emails Generated: 3

Sample Email

To: John Smith (Chief Technology Officer)
Subject: Helping Acme Corporation with Scaling infrastructure...

Hi John,

I noticed Acme Corporation has been experiencing rapid growth,
which is fantasticβ€”but I imagine it's also creating some 
infrastructure challenges...

[Personalized content based on analysis]

Would you be open to a brief conversation about how we've 
helped similar companies scale efficiently?

Best regards,
[Your name]

πŸ”§ Configuration

Environment Variables (.env)

# Required
GOOGLE_API_KEY=your_api_key_here

# Optional (defaults provided)
MODEL_NAME=gemini-2.0-flash-exp
MAX_RETRIES=3
TIMEOUT_SECONDS=30

Customization

Change the Gemini model: Edit .env:

MODEL_NAME=gemini-2.0-flash-exp  # or gemini-pro, etc.

Adjust number of contacts: Edit agents/outreach_agent.py, line 45:

for contact in contacts[:3]:  # Change 3 to desired number

Modify analysis depth: Edit agents/analysis_agent.py, _create_analysis_prompt() method


πŸ“Š Technical Highlights

Why Sequential Agents?

Each agent builds on the previous agent's output:

  • Research β†’ provides data for Analysis
  • Analysis β†’ informs Contact prioritization
  • Contacts + Analysis β†’ enable personalized Outreach

This sequential flow ensures each agent has the context it needs.

Memory Bank Benefits

  • Avoids redundant API calls (saves time & money)
  • Instant results for previously researched companies
  • Persistent across sessions

Observability Implementation

Every agent action is logged with:

  • Timestamp
  • Agent name
  • Input parameters
  • Success/failure status
  • Execution time

Logs are saved to logs/agent_YYYYMMDD.log


πŸ§ͺ Testing

Test with example companies

python main.py
# Enter: "Salesforce"
# Enter: "HubSpot"
# Enter: "Zoom"

Verify memory caching

# First run - will do full research
python main.py
# Enter: "TestCo"

# Second run - should use cache
python main.py
# Enter: "TestCo"
# Should see: "Found cached research for TestCo"

πŸš€ Future Enhancements

Phase 2 Features:

  • Real Google Custom Search API integration
  • LinkedIn API for actual contact data
  • Email sending capability (SendGrid/Gmail API)
  • Web UI for easier interaction
  • Multi-company batch processing
  • CRM integration (Salesforce, HubSpot)
  • A/B testing for email effectiveness

Deployment:

  • Deploy to Google Cloud Run
  • Add authentication
  • Rate limiting for API calls
  • Webhook support for automation

πŸ“š Key Learnings

What Worked Well

  • Sequential agent architecture - each agent has clear responsibility
  • Memory caching - dramatically improves performance on repeat queries
  • Gemini integration - produces high-quality, contextual analysis and emails

Challenges Overcome

  • Coordinating state between agents
  • Error handling across the pipeline
  • Balancing detail vs. conciseness in emails

Technical Decisions

  • Why sequential vs parallel? - Each agent needs previous agent's output
  • Why file-based memory? - Simple, portable, no database required for demo
  • Why Gemini 2.0? - Fast, cost-effective, excellent at analysis & generation

🀝 Contributing

This is a capstone project, but feedback is welcome!

To suggest improvements:

  1. Open an issue describing the enhancement
  2. Fork the repo
  3. Create a feature branch
  4. Submit a pull request

πŸ“œ License

MIT License - Feel free to use this project as a starting point for your own agents.


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

Created for the Google AI Agents Intensive Course (Nov 2025)
Track: Enterprise Agents
Features: 6/3 required + bonus features

Contact

  • GitHub: [your-github]
  • LinkedIn: [your-linkedin]
  • Email: [your-email]

πŸ™ Acknowledgments

  • Google AI & Kaggle for the excellent course
  • Anthropic for ADK inspiration
  • The AI Agents community for support

⭐ If this project helped you, please star the repo!

About

Smart Sales Intelligence Agent with multi-agent architecture

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages