Blog/Agent Deployment

Building Your AI Competitive Intelligence System: A Complete Deployment Guide

Step-by-step walkthrough for deploying an automated competitive intelligence agent that monitors rivals and generates executive briefings.

Nick Simmons, Lomo AI··6 min read
Building Your AI Competitive Intelligence System: A Complete Deployment GuideLomo AI

Building Your AI Competitive Intelligence System: A Complete Deployment Guide

Competitive intelligence has evolved from manual research to AI-powered automation. Today's systems can monitor hundreds of competitors, analyze thousands of data points, and deliver actionable insights faster than any human analyst.

This deployment guide walks through building a production-ready competitive intelligence agent using Claude 3.5 Sonnet, web scraping APIs, and your existing business tools. You'll have an automated system that tracks competitor moves, monitors industry news, and generates executive briefings by week's end.

System Architecture Overview

Our competitive intelligence agent consists of four core components:

Data Collection Layer: Web scraping APIs (ScrapingBee, Apify) gather competitor websites, news feeds, and social media updates every 6 hours.

Analysis Engine: Claude 3.5 Sonnet processes raw data, identifies significant changes, and extracts strategic insights using structured prompts.

Data Storage: Notion or Airtable serves as both database and collaboration hub, storing findings with automatic categorization.

Reporting System: Automated weekly briefings combine trending insights, competitor moves, and strategic recommendations.

Phase 1: Setting Up Data Collection

Competitor Website Monitoring

Start with ScrapingBee API for reliable website monitoring. Create monitoring profiles for each major competitor:

import requests
import json
from datetime import datetime

def scrape_competitor_page(url, competitor_name):
    params = {
        'api_key': 'YOUR_SCRAPINGBEE_KEY',
        'url': url,
        'render_js': 'true',
        'premium_proxy': 'true'
    }
    
    response = requests.get('https://app.scrapingbee.com/api/v1/', params=params)
    
    if response.status_code == 200:
        return {
            'competitor': competitor_name,
            'content': response.text,
            'timestamp': datetime.now().isoformat(),
            'url': url
        }
    return None

News and Industry Monitoring

Integrate NewsAPI or Google News RSS feeds for industry coverage:

import feedparser

def monitor_industry_news(keywords):
    news_items = []
    
    for keyword in keywords:
        feed_url = f"https://news.google.com/rss/search?q={keyword}"
        feed = feedparser.parse(feed_url)
        
        for entry in feed.entries[:5]:  # Latest 5 articles
            news_items.append({
                'title': entry.title,
                'link': entry.link,
                'published': entry.published,
                'keyword': keyword,
                'summary': entry.summary
            })
    
    return news_items

Phase 2: Claude Analysis Integration

Competitive Analysis Prompts

Claude excels at structured analysis when given clear frameworks. Here's a proven prompt system:

def analyze_competitor_changes(old_content, new_content, competitor_name):
    prompt = f"""
    Analyze changes between these two versions of {competitor_name}'s content.
    
    Focus on:
    1. NEW PRODUCTS/SERVICES: Any launches, updates, or discontinuations
    2. PRICING CHANGES: Modified rates, new packages, promotional offers
    3. STRATEGIC MESSAGING: Shifts in positioning, value propositions, or target markets
    4. PARTNERSHIP/ACQUISITION NEWS: New relationships or corporate changes
    5. OPERATIONAL UPDATES: Office moves, hiring, technology changes
    
    OLD CONTENT:
    {old_content[:3000]}
    
    NEW CONTENT:
    {new_content[:3000]}
    
    Return findings in JSON format with significance scores (1-10):
    """
    
    # Claude API call here
    return claude_response

News Sentiment and Impact Analysis

For industry news, use Claude to assess competitive implications:

def analyze_news_impact(news_items, your_company_profile):
    prompt = f"""
    Analyze these industry news items for competitive impact on our business.
    
    OUR COMPANY PROFILE:
    {your_company_profile}
    
    NEWS ITEMS:
    {json.dumps(news_items, indent=2)}
    
    For each item, assess:
    - RELEVANCE SCORE (1-10): How relevant to our business
    - THREAT LEVEL (Low/Medium/High): Potential negative impact
    - OPPORTUNITY LEVEL (Low/Medium/High): Potential positive impact
    - RECOMMENDED ACTION: What we should do about this
    
    Return structured analysis in JSON format.
    """
    
    return claude_analysis

Phase 3: Notion/Airtable Integration

Notion Database Setup

Create a Notion database with these properties:

  • Date (Date)
  • Competitor (Select)
  • Category (Select: Product, Pricing, Marketing, Partnership, Other)
  • Significance (Number, 1-10)
  • Summary (Rich Text)
  • Impact Assessment (Select: Threat, Opportunity, Neutral)
  • Recommended Action (Rich Text)
  • Source URL (URL)
  • Status (Select: New, Reviewed, Actioned)
import requests

def add_to_notion_database(database_id, finding):
    url = f"https://api.notion.com/v1/pages"
    
    headers = {
        "Authorization": f"Bearer {NOTION_TOKEN}",
        "Content-Type": "application/json",
        "Notion-Version": "2022-06-28"
    }
    
    data = {
        "parent": {"database_id": database_id},
        "properties": {
            "Date": {"date": {"start": finding['timestamp']}},
            "Competitor": {"select": {"name": finding['competitor']}},
            "Category": {"select": {"name": finding['category']}},
            "Significance": {"number": finding['significance']},
            "Summary": {"rich_text": [{"text": {"content": finding['summary']}}]},
            "Source URL": {"url": finding['source_url']}
        }
    }
    
    response = requests.post(url, headers=headers, json=data)
    return response.status_code == 200

Airtable Alternative Setup

If using Airtable, create similar fields and use their API:

def add_to_airtable(base_id, table_name, finding):
    url = f"https://api.airtable.com/v0/{base_id}/{table_name}"
    
    headers = {
        "Authorization": f"Bearer {AIRTABLE_TOKEN}",
        "Content-Type": "application/json"
    }
    
    data = {
        "fields": {
            "Date": finding['timestamp'],
            "Competitor": finding['competitor'],
            "Category": finding['category'],
            "Significance": finding['significance'],
            "Summary": finding['summary'],
            "Source URL": finding['source_url']
        }
    }
    
    response = requests.post(url, headers=headers, json=data)
    return response.status_code == 200

Phase 4: Executive Briefing Generation

Weekly Summary Creation

Claude generates executive-ready briefings from accumulated data:

def generate_weekly_briefing(findings_data):
    high_priority = [f for f in findings_data if f['significance'] >= 7]
    threats = [f for f in findings_data if f['impact'] == 'Threat']
    opportunities = [f for f in findings_data if f['impact'] == 'Opportunity']
    
    prompt = f"""
    Create an executive briefing from this week's competitive intelligence findings.
    
    HIGH PRIORITY FINDINGS:
    {json.dumps(high_priority, indent=2)}
    
    IDENTIFIED THREATS:
    {json.dumps(threats, indent=2)}
    
    IDENTIFIED OPPORTUNITIES:
    {json.dumps(opportunities, indent=2)}
    
    Format the briefing with:
    1. EXECUTIVE SUMMARY (3-4 bullet points)
    2. KEY THREATS (ranked by urgency)
    3. STRATEGIC OPPORTUNITIES (ranked by potential impact)
    4. RECOMMENDED ACTIONS (specific, actionable items)
    5. COMPETITOR SPOTLIGHT (most active competitor this week)
    
    Keep language executive-appropriate, focus on business impact.
    """
    
    return claude_briefing

Deployment and Automation

Scheduling with GitHub Actions

Deploy using GitHub Actions for reliable scheduling:

name: Competitive Intelligence Agent

on:
  schedule:
    - cron: '0 */6 * * *'  # Every 6 hours
  workflow_dispatch:

jobs:
  intelligence_gathering:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Setup Python
        uses: actions/setup-python@v2
        with:
          python-version: '3.9'
      - name: Install dependencies
        run: pip install -r requirements.txt
      - name: Run intelligence gathering
        env:
          CLAUDE_API_KEY: ${{ secrets.CLAUDE_API_KEY }}
          SCRAPINGBEE_KEY: ${{ secrets.SCRAPINGBEE_KEY }}
          NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }}
        run: python main.py

Cost Optimization

Expected monthly costs for mid-market deployment:

  • ScrapingBee API: $29/month (10,000 requests)
  • Claude API: $50-100/month (depending on analysis volume)
  • Notion Pro: $8/user/month
  • GitHub Actions: Free for public repos

Total operational cost: $87-137/month

Advanced Features

Competitor Pricing Tracking

Add pricing intelligence with structured extraction:

def extract_pricing_data(website_content, competitor_name):
    prompt = f"""
    Extract pricing information from this {competitor_name} website content.
    
    Look for:
    - Product/service prices
    - Package tiers
    - Promotional offers
    - Free trial periods
    - Setup fees
    
    Return structured JSON with product names, prices, and any conditions.
    
    CONTENT:
    {website_content[:4000]}
    """
    
    return claude_extraction

Social Media Monitoring

Integrate Twitter/LinkedIn APIs for social intelligence:

def monitor_competitor_social(competitor_handles):
    social_data = []
    
    for handle in competitor_handles:
        # Twitter API v2 call
        tweets = get_recent_tweets(handle)
        
        for tweet in tweets:
            analysis = analyze_social_post(tweet, handle)
            social_data.append(analysis)
    
    return social_data

Performance Monitoring

Track system effectiveness with these metrics:

  • Data Freshness: Average age of competitive insights
  • Signal-to-Noise Ratio: Percentage of high-significance findings
  • Response Time: Hours from competitor change to internal notification
  • Action Rate: Percentage of insights leading to business decisions

Successful deployments typically achieve 85% automated classification accuracy and reduce competitive research time by 70%.

Launch Timeline

Week 1: Set up data collection APIs and basic scraping Week 2: Integrate Claude analysis and refine prompts Week 3: Connect Notion/Airtable and test data flow Week 4: Deploy automation and generate first briefing

Your competitive intelligence system will be monitoring competitors and generating insights within 30 days. The key to success lies in starting simple, testing thoroughly, and iterating based on actual business needs.

Ready to deploy your own competitive intelligence agent? The Lomo Sprint can help you build and customize this system for your specific industry and competitive landscape.

Have questions about what this means for your business?

The Lomo Sprint is designed to answer exactly that. We're always happy to talk.

Let's Talk