• unwind ai
  • Posts
  • Build an AI Sales Intelligence Agent Team with Google ADK & Gemini 3

Build an AI Sales Intelligence Agent Team with Google ADK & Gemini 3

Multi-agent app with Google ADK, Gemini 3 models, and Nano Banana (100% open source)

Sales teams lose deals every day to competitors they don't fully understand. Building intelligence on rival products - their strengths, weaknesses, pricing, and positioning - typically requires hours of manual research across review sites, company pages, and analyst reports. By the time a rep compiles this into a usable format, the opportunity has often moved forward without them.

In this tutorial, we'll build an AI Sales Intelligence Agent Team using Google's Agent Development Kit (ADK) and Gemini 3, and Nano Banana Pro. You'll create a multi-agent system that automatically researches competitors, analyzes their products, generates objection handling scripts, and produces professional battle cards—complete with visual comparison charts. The entire pipeline runs autonomously from a single prompt.

What is Google ADK? Google's framework for building production-ready multi-agent systems. It provides model-agnostic agent orchestration, native tool integration (like Google Search), and a powerful Sequential Agent pattern that lets you chain specialized agents into sophisticated workflows.

Don’t forget to share this tutorial on your social channels and tag Unwind AI (X, LinkedIn, Threads, Facebook) to support us!

What We’re Building

This application implements a 7-stage AI pipeline that transforms a competitor name into complete sales enablement materials. The system uses Google Search for real-time research, Gemini models for analysis and generation, and custom tools for creating HTML battle cards and AI-generated comparison infographics.

Features

  • Live Competitor Research - Automated web search for company info, funding, customers, and reviews

  • Deep Feature Analysis - Comprehensive breakdown of competitor capabilities and pricing

  • Positioning Intelligence - Uncovers how competitors position against your product

  • Honest SWOT Analysis - Balanced strengths/weaknesses comparison

  • Objection Handling Scripts - Ready-to-use responses for top 10 competitive objections

  • Professional Battle Cards - Clean HTML documents for sales reps

  • Visual Comparisons - AI-generated infographics using Gemini image generation

  • Sequential Pipeline - 7 agents working in coordinated stages

How It Works

The system operates as a sequential pipeline where each agent builds upon the previous stage's output:

  1. User Input - Provides competitor name and their product (e.g., "Create a battle card for Salesforce. We sell HubSpot.")

  2. Stage 1: Research - Competitor Research Agent uses Google Search to gather company info, funding, customers, and reviews. Outputs to competitor_profile state.

  3. Stage 2: Features - Product Feature Agent analyzes capabilities, pricing, and integrations using the competitor_profile context. Outputs to feature_analysis.

  4. Stage 3: Positioning - Positioning Analyzer researches messaging, personas, and analyst coverage. Accesses both competitor_profile and feature_analysis. Outputs to positioning_intel.

  5. Stage 4: SWOT - SWOT Agent synthesizes all previous research into honest strengths/weaknesses analysis. No external tools, pure synthesis.

  6. Stage 5: Objections - Objection Handler creates scripts for handling competitive objections with proof points.

  7. Stage 6: Battle Card - Battle Card Generator compiles everything and calls the generate_battle_card_html tool to create a professional HTML document. Saved to Artifacts tab and outputs/ folder.

  8. Stage 7: Chart - Comparison Chart Agent creates visual comparison data and calls generate_comparison_chart tool, which uses Gemini image generation to create an infographic.

State Management: ADK's output_key system allows each agent to save results that subsequent agents can access via template variables like {competitor_profile} in their instructions.

Prerequisites

Before we begin, make sure you have the following:

  1. Python installed on your machine (version 3.12 is recommended)

  2. Your Gemini API key for using Gemini models

  3. A code editor of your choice (we recommend VS Code or PyCharm for their excellent Python support)

  4. Basic familiarity with Python programming

Code Walkthrough

Setting Up the Environment

First, let's get our development environment ready:

  1. Clone the GitHub repository:

git clone https://github.com/Shubhamsaboo/awesome-llm-apps.git
cd advanced_ai_agents/multi_agent_apps/agent_teams/ai_sales_intelligence_agent_team
pip install -r requirements.txt

You can either export it as an environment variable:

export GOOGLE_API_KEY=your_api_key_here

Or create a .env file:

echo "GOOGLE_API_KEY=your_api_key_here" > ai_due_diligence_agent/.env

Creating the App

Let's break down the entire system. We'll create three files: agent.py (the agents), tools.py (custom functions), and __init__.py (agent registration).

File 1: tools.py - Custom Battle Card and Chart Generation

  1. Import libraries and set up output directory:

import logging
from pathlib import Path
from datetime import datetime
from google.adk.tools import ToolContext
from google.genai import types, Client

logger = logging.getLogger("BattleCardPipeline")

OUTPUTS_DIR = Path(__file__).parent / "outputs"
OUTPUTS_DIR.mkdir(exist_ok=True)
  1. Create the HTML battle card generator: 

    • Takes compiled competitive intelligence

    • Uses Gemini to generate professional HTML

    • Saves as ADK artifact and local file

async def generate_battle_card_html(
    battle_card_data: str,
    tool_context: ToolContext
) -> dict:
    current_date = datetime.now().strftime("%B %d, %Y")
    
    prompt = f"""Generate a professional sales battle card in HTML format.
    
    **DATE: {current_date}**
    
    Style it for SALES TEAMS with:
    - Clean, scannable design
    - Color coding: GREEN for advantages, RED for competitor strengths
    - Collapsible sections
    - Dark blue and orange color scheme
    
    COMPETITIVE INTELLIGENCE DATA:
    {battle_card_data}
    
    REQUIRED SECTIONS: Header, Quick Stats, At a Glance, Feature Comparison,
    Positioning, Strengths/Weaknesses, Objections, Killer Questions, Landmines
    """
  1. Generate HTML using Gemini: 

    • Calls Gemini Flash for fast HTML generation

    • Cleans up markdown wrapping

    • Returns structured response

client = Client()
    response = await client.aio.models.generate_content(
        model="gemini-3-flash-preview",
        contents=prompt,
    )
    
    html_content = response.text
    # Clean markdown wrapping...
  1. Save artifacts: 

    • Saves to ADK artifact system (appears in Artifacts tab)

    • Also saves to local outputs/ folder

    • Returns success message with artifact name

timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
    artifact_name = f"battle_card_{timestamp}.html"
    
    html_artifact = types.Part.from_bytes(
        data=html_content.encode('utf-8'),
        mime_type="text/html"
    )
    
    version = await tool_context.save_artifact(
        filename=artifact_name, 
        artifact=html_artifact
    )
  1. Create the comparison chart generator: 

    • Uses Gemini's image generation capabilities

    • Creates professional infographics

    • Color-codes scores (green for you, red for competitor)

async def generate_comparison_chart(
    competitor_name: str,
    your_product_name: str,
    comparison_data: str,
    tool_context: ToolContext
) -> dict:
    prompt = f"""Create a professional competitive comparison infographic.
    
    **COMPARISON: {your_product_name} vs {competitor_name}**
    
    Style: Clean, modern, sales-ready
    Colors: Green for {your_product_name}, Red for {competitor_name}
    
    DATA: {comparison_data}
    
    LAYOUT: Header, Score Overview, Feature Comparison, Key Differentiators, Verdict
    """
  1. Generate image using Gemini: 

    • Uses Gemini Pro Image model

    • Extracts image bytes from response

    • Saves as PNG/JPG artifact

response = await client.aio.models.generate_content(
        model="gemini-3-pro-image-preview",
        contents=prompt,
        config=types.GenerateContentConfig(
            response_modalities=["TEXT", "IMAGE"]
        )
    )
    
    # Extract image from response parts...
    image_bytes = part.inline_data.data

File 2: agent.py - The 7-Agent Pipeline

  1. Import ADK components and custom tools:

    • LlmAgent for individual agents

    • SequentialAgent for pipeline orchestration

    • Google Search tool for research

from google.adk.agents import LlmAgent, SequentialAgent
from google.adk.tools import google_search
from .tools import generate_battle_card_html, generate_comparison_chart
  1. Stage 1: Competitor Research Agent: 

    • Uses Google Search to gather company info

    • Researches funding, customers, pricing, reviews

    • Outputs to competitor_profile state key

competitor_research_agent = LlmAgent(
    name="CompetitorResearchAgent",
    model="gemini-3-flash-preview",
    description="Researches competitor company information",
    instruction="""
    Research these areas:
    1. Company Overview - founded, HQ, size, funding
    2. Target Market - ideal customers, industries
    3. Products & Pricing - offerings, tiers, freemium
    4. Recent News - launches, acquisitions
    5. Customer Sentiment - G2/Capterra reviews
    """,
    tools=[google_search],
    output_key="competitor_profile",
)
  1. Stage 2: Product Feature Agent: 

    • Analyzes competitor product capabilities

    • Researches integrations, pricing, limitations

    • Uses previous stage's competitor_profile via template

product_feature_agent = LlmAgent(
    name="ProductFeatureAgent",
    model="gemini-3-flash-preview",
    instruction="""
    COMPETITOR PROFILE: {competitor_profile}
    
    Analyze:
    1. Core Features - main functionality
    2. Integrations & Ecosystem
    3. Technical Architecture
    4. Pricing Details - hidden costs
    5. Limitations - from reviews
    """,
    tools=[google_search],
    output_key="feature_analysis",
)
  1. Stage 3: Positioning Analyzer Agent: 

    • Uses Gemini Pro for strategic analysis

    • Uncovers competitor messaging and positioning

    • Analyzes analyst coverage (Gartner, Forrester, G2)

product_feature_agent = LlmAgent(
    name="ProductFeatureAgent",
    model="gemini-3-flash-preview",
    instruction="""
    COMPETITOR PROFILE: {competitor_profile}
    
    Analyze:
    1. Core Features - main functionality
    2. Integrations & Ecosystem
    3. Technical Architecture
    4. Pricing Details - hidden costs
    5. Limitations - from reviews
    """,
    tools=[google_search],
    output_key="feature_analysis",
)
  1. Stage 4: SWOT Analysis Agent: 

    • Synthesizes all previous research

    • Creates honest strengths/weaknesses comparison

    • No tools needed (pure synthesis)

swot_agent = LlmAgent(
    name="StrengthsWeaknessesAgent",
    model="gemini-3-pro-preview",
    instruction="""
    Create BRUTALLY HONEST SWOT:
    
    ## Their Strengths (Where They Beat Us)
    ## Their Weaknesses (Where We Beat Them)  
    ## Our Advantages
    ## Competitive Landmines - questions that expose their weaknesses
    
    Be strategic but honest. Sales reps lose credibility with overstatements.
    """,
    output_key="swot_analysis",
)
  1. Stage 5: Objection Handler Agent: 

    • Creates sales scripts for common objections

    • Provides proof points and killer questions

    • Uses Gemini Pro for quality

objection_handler_agent = LlmAgent(
    name="ObjectionHandlerAgent",
    model="gemini-3-pro-preview",
    instruction="""
    Create scripts for objections:
    1. "We're already using [Competitor]"
    2. "[Competitor] is the market leader"
    3. "[Competitor] has more features"
    ... (10 total)
    
    For each: The Objection, Why They Say It, Your Response, Proof Points
    
    Also include Killer Questions and Trap-Setting Phrases.
    """,
    output_key="objection_scripts",
)
  1. Stage 6: Battle Card Generator Agent: 

    • Compiles all research into structured data

    • Calls generate_battle_card_html tool

    • Outputs HTML artifact

battle_card_generator_agent = LlmAgent(
    name="BattleCardGenerator",
    model="gemini-3-flash-preview",
    instruction="""
    Compile all research into battle card data:
    - Quick Stats, Positioning, Feature Comparison
    - Strengths/Weaknesses, Objections, Killer Questions
    
    Pass to generate_battle_card_html tool.
    """,
    tools=[generate_battle_card_html],
    output_key="battle_card_result",
)
  1. Stage 7: Comparison Chart Agent: 

    • Creates visual comparison summary

    • Calls generate_comparison_chart tool

    • Uses Gemini image generation

comparison_chart_agent = LlmAgent(
    name="ComparisonChartAgent",
    model="gemini-3-flash-preview",
    instruction="""
    Create visual comparison:
    - Overall verdict
    - Feature scores (1-10 scale)
    - Key differentiators
    - Watch areas
    
    Pass to generate_comparison_chart tool with competitor_name, 
    your_product_name, and comparison_data.
    """,
    tools=[generate_comparison_chart],
    output_key="chart_result",
)
  1. Create the Sequential Pipeline: 

    • Chains all 7 agents in order

    • Each agent accesses previous outputs via state keys

    • ADK handles orchestration automatically

battle_card_pipeline = SequentialAgent(
    name="BattleCardPipeline",
    description="Research → Features → Positioning → SWOT → Objections → Battle Card → Chart",
    sub_agents=[
        competitor_research_agent,
        product_feature_agent,
        positioning_analyzer_agent,
        swot_agent,
        objection_handler_agent,
        battle_card_generator_agent,
        comparison_chart_agent,
    ],
)
  1. Create the Root Agent (Coordinator): 

    • Routes user queries to the pipeline

    • Validates that both competitor and product are provided

    • Handles general questions about competitive selling

root_agent = LlmAgent(
    name="BattleCardAnalyst",
    model="gemini-3-flash-preview",
    description="AI competitive intelligence analyst",
    instruction="""
    You need:
    1. Competitor - company to analyze
    2. Your Product - what you're selling
    
    Valid requests:
    - "Create a battle card for Salesforce. We sell HubSpot."
    - "Battle card against Slack - we're selling Teams"
    
    When both provided → transfer_to_agent "BattleCardPipeline"
    """,
    sub_agents=[battle_card_pipeline],
)

File 3: __init__.py - Agent Registration

This critical file exports the root agent so ADK can discover it:

"""AI Due Diligence Agent - Multi-Agent Pipeline for Startup Investment Analysis"""

from .agent import root_agent

__all__ = ["root_agent"]

Why this matters: ADK's web interface automatically discovers agents exported in __init__.py. Without this file, the adk web command won't find your agent.

Running the App

With our code in place, it's time to launch the app.

Important: You must run ADK from the agent_teams folder, as ADK discovers agents by looking for subfolders with __init__.py files that export a root_agent.

  1. Navigate to the multi_agent_apps folder:

cd advanced_ai_agents/multi_agent_apps/agent_teams
  1. Start the ADK web interface:

adk web

ADK will automatically discover all the agent apps in this folder and load the root agent.

  1. Try example prompts:

  • "Create a battle card for Salesforce. We sell HubSpot."

  • "Battle card against Monday.com, I sell Asana"

  • "Competitive analysis: Zoom vs our product Teams"

  1. View generated artifacts:

Check the Artifacts tab in the ADK web interface to download your battle cards and comparison charts. Files are also saved locally in the outputs/ folder.

Working Application Demo

Conclusion

You've built a 7-agent AI pipeline that automates competitive intelligence research and battle card creation. This system demonstrates ADK's power for orchestrating complex multi-agent workflows - from research through synthesis to artifact generation - all running automatically from a single user prompt.

For further enhancements, consider:

  1. Add CRM Integration - Automatically save battle cards to Salesforce or HubSpot when opportunities are created against specific competitors.

  2. Expand Data Sources - Incorporate financial data APIs (Crunchbase, PitchBook) for more detailed funding and valuation analysis.

  3. Implement Scheduled Updates - Create a cron job that regenerates battle cards monthly to keep intelligence fresh as competitors evolve.

  4. Add Email Summarization - Integrate with Gmail/Outlook to analyze competitive mentions in customer emails and update battle cards accordingly.

  5. Create Slack Bot Interface - Deploy as a Slack bot so sales teams can request battle cards directly in their channels during active deals.

Keep experimenting with different configurations and features to build more sophisticated AI applications.

We share hands-on tutorials like this 2-3 times a week, to help you stay ahead in the world of AI. If you're serious about leveling up your AI skills and staying ahead of the curve, subscribe now and be the first to access our latest tutorials.

Don’t forget to share this tutorial on your social channels and tag Unwind AI (X, LinkedIn, Threads) to support us!

Reply

or to participate.