A production-ready multi-agent AI system built with Google Gemini 2.5, designed to automate competitive intelligence analysis using specialized AI agents with distinct roles and expertise.
Manual competitor research takes analysts days to compile comprehensive reports β and by the time they're finished, the intelligence is already outdated. Teams waste valuable hours sifting through websites, press releases, and market data, only to repeat the process weeks later.
An automated multi-agent AI system that continuously monitors and analyzes competitor activity. Three specialized AI agents β a Research Analyst, a Strategy Officer, and a Report Writer β collaborate to produce board-ready competitive intelligence reports on demand.
- Speed: Reduces competitor research time from days to minutes
- Freshness: Enables real-time market intelligence instead of stale quarterly reports
- Consistency: Standardized analytical frameworks (SWOT, positioning) applied uniformly across all competitors
- Scalability: Analyze any number of competitors without adding headcount
| Role | Use Case |
|---|---|
| Product Managers | Competitive landscape mapping and feature benchmarking |
| Strategy Teams | Data-driven strategic planning with up-to-date SWOT analyses |
| Business Development | Rapid due diligence on potential partners and market entrants |
| Sales Teams | Real-time competitive intelligence for deal positioning |
Clean, intuitive UI with real-time agent status tracking and configuration sidebar.
Watch three specialized AI agents collaborate sequentially - Research Agent gathering market data, Strategy Agent performing SWOT analysis, and Report Agent synthesizing insights.
Comprehensive competitor analysis with executive summary, strategic recommendations, and downloadable PDF export.
This application demonstrates true multi-agent architecture where three specialized AI agents collaborate sequentially to produce comprehensive competitor analysis reports:
- π Research Agent: Market research analyst that gathers intelligence on company overview, products, market position, and competitors
- π§ Strategy Agent: Chief strategy officer that performs SWOT analysis and identifies competitive positioning
- π Report Agent: Executive writer that synthesizes insights into actionable board-level recommendations
Unlike single-prompt systems, this architecture mimics real consulting teams with role specialization, sequential data flow, and specialized domain expertise per agent.
- 3 Sequential Agents with specialized personas, prompts, and analytical frameworks
- Agent-to-Agent Data Flow: Each agent receives previous agent's output as context
- Intelligent Retry Logic: Exponential backoff with jitter for robust rate limit handling
- Model Fallback Chain: Automatic switching between Gemini 2.5 Flash-Lite β Flash β Pro
- β Graceful Error Handling: Informative error messages with recovery suggestions
- β Smart Rate Limiting: Queue management system optimized for free tier API usage
- β Real-time Progress Tracking: Visual status indicators using Streamlit status containers
- β Automated PDF Generation: Professional report formatting with FPDF library
- β Model Availability Checks: Automatic fallback if models are deprecated or unavailable
- LLM: Google Gemini 2.5 Flash/Flash-Lite/Pro (January 2026)
- Framework: Streamlit 1.32+ for interactive web interface
- PDF Generation: FPDF library for report export
- API Client: Google GenAI Python SDK v0.8.0+
- Python 3.9 or higher
- Google Gemini API Key (Get free API key here)
- Clone the repository:
git clone https://github.com/stergios-ziliaskopoulos/multi-agent-competitor-intelligence.git
cd multi-agent-competitor-intelligence
Install dependencies:
bash
pip install -r requirements.txt
Run the application:
bash
streamlit run app.py
Access the interface:
Open your browser at http://localhost:8501
Enter your Google Gemini API key in the sidebar
Input competitor name and website
Click "π Run Multi-Agent Analysis"
π How It Works
Agent Workflow Pipeline
text
User Input β π Research Agent β π§ Strategy Agent β π Report Agent β PDF Export
Step-by-step execution:
Research Agent receives competitor name and website
Conducts market research on company overview, products, target market
Analyzes market share, performance trends, and key competitors
Outputs structured 400-500 word research brief
Strategy Agent receives research data
Performs comprehensive SWOT analysis (Strengths, Weaknesses, Opportunities, Threats)
Evaluates competitive positioning and differentiation strategies
Identifies strategic vulnerabilities and market gaps
Outputs 400-500 word strategic analysis
Report Agent synthesizes both outputs
Creates executive summary with key findings
Generates 3 actionable strategic recommendations
Produces board-level conclusion
Outputs 300-400 word executive report
PDF Export compiles all sections into downloadable report
Retry Logic & Rate Limiting
The system implements exponential backoff with jitter to handle API rate limits gracefully:
Initial delay: 2 seconds
Max delay: 60 seconds
Formula: delay = min(60, base_delay * (2^attempt)) + random(0, 2)
Max retries per model: 5 attempts
Model fallback: Automatic switch to next model if quota exhausted
This ensures 100% reliability even on free tier with rate limits.
π Sample Output Structure
The system produces three-section intelligence reports:
Section Agent Content Word Count
Market Research π Researcher Company overview, products, market position, competitors 400-500
Strategic Analysis π§ Strategist SWOT table, competitive positioning, vulnerabilities 400-500
Executive Summary π Reporter Key findings, 3 recommendations, conclusion 300-400
π οΈ Technical Architecture
Project Structure
text
multi-agent-competitor-intelligence/
βββ app.py # Main Streamlit application
βββ requirements.txt # Python dependencies
βββ README.md # This documentation
βββ .gitignore # Git ignore rules
βββ screenshots/ # Demo screenshots
βββ interface.png # Application UI
βββ workflow.png # Agent execution
βββ report.png # Generated output
Agent Implementation Details
Each agent uses specialized system prompts with role-based personas:
π Research Agent
python
Role: "Senior Market Research Analyst"
Task: Gather competitive intelligence data
Output: Structured research brief with 5 key sections
π§ Strategy Agent
python
Role: "Chief Strategy Officer"
Task: Analyze competitive threats and opportunities
Output: SWOT analysis + positioning insights + vulnerabilities
π Report Agent
python
Role: "Executive Report Writer"
Task: Synthesize actionable recommendations
Output: Board-level executive summary with 3 strategic actions
π Skills Demonstrated
This project showcases professional AI engineering capabilities:
β
Multi-agent system design with sequential orchestration
β
Prompt engineering for role specialization and context management
β
Production error handling with retry strategies and graceful degradation
β
API rate limit management using exponential backoff with jitter
β
Clean code architecture with modular function design
β
User experience design with real-time status updates and clear error messages
β
Documentation best practices for open-source projects
π§ Configuration
API Rate Limits (Free Tier - Jan 2026)
Model Requests Per Minute (RPM)
Gemini 2.5 Flash-Lite 30 RPM
Gemini 2.5 Flash 15 RPM
Gemini 2.5 Pro 15 RPM
π‘ Tip: Enable billing in Google AI Studio for unlimited requests while staying in free tier limits.
π Future Enhancements
Parallel agent execution using asyncio for faster processing
Conversation memory for multi-turn refinement
Web scraping integration for real-time data
Multi-language support
Data visualization with charts and graphs
Vector database for historical tracking
π€ Use Cases
Market Research Teams: Automate competitor analysis for quarterly reports
Strategy Consultants: Generate SWOT analyses for client pitches
Investment Analysts: Due diligence on target companies
Product Managers: Competitive landscape mapping
Sales Teams: Competitive intelligence gathering
π License
MIT License - See LICENSE file for details.
π¨βπ» Author
Stergios Ziliaskopoulos
Agentic AI Engineer | Multi-Agent Systems Specialist
π GitHub: @stergios-ziliaskopoulos
πΌ Available for freelance AI automation projects
π Acknowledgments
Built with Google Gemini 2.5
Powered by Streamlit
Inspired by multi-agent research from OpenAI, DeepMind, and Anthropic
β Star this repo if you find it useful!
Last Updated: January 2026 | Status: Production Ready β


