Skip to main content
This example demonstrates how to build a sophisticated competitor analysis agent that combines powerful search and scraping capabilities with advanced reasoning tools to provide comprehensive competitive intelligence. The agent performs deep analysis of competitors including market positioning, product offerings, and strategic insights. Key capabilities:
  • Company discovery using Firecrawl search
  • Website scraping and content analysis
  • Competitive intelligence gathering
  • SWOT analysis with reasoning
  • Strategic recommendations
  • Structured thinking and analysis
Example queries to try:
  • “Analyze OpenAI’s main competitors in the LLM space”
  • “Compare Uber vs Lyft in the ride-sharing market”
  • “Analyze Tesla’s competitive position vs traditional automakers”
  • “Research fintech competitors to Stripe”
  • “Analyze Nike vs Adidas in the athletic apparel market”

Code

cookbook/examples/agents/competitor_analysis_agent.py

Usage

1

Create a virtual environment

Open the Terminal and create a python virtual environment.
2

Set your API key

3

Install libraries

4

Run Agent