Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/vrashmanyu605-eng/Agentic_Sales-Markerting/llms.txt

Use this file to discover all available pages before exploring further.

The competitor analysis agent gives your sales team a clear picture of who the target company already works with or might consider instead of you. It combines your pre-supplied competitor data with a live web search for the most recent competitive landscape, then asks the LLM to synthesize everything into an actionable report. The result is stored in competitor_analysis and is available to outreach and proposal agents that need to position your services against the competition.

State inputs

company_name
string
required
The name of the target company. Used to build the competitor search query.
competitors_data
string
required
Pre-supplied background data about known competitors. This can be a list of competitor names, brief profiles, or any other context about the competitive environment.

State outputs

competitor_analysis
string
required
A JSON string containing the LLM’s competitive intelligence report. See output schema for the full field list.

What it does

1

Build a targeted competitor search query

The agent constructs a search query combining the target company name, the supplied competitors data, and the terms "IT services 2024 2025". For example: "competitors of Acme Corp ERP vendors IT services 2024 2025". This focuses the search on the current year’s competitive landscape.
2

Search for fresh competitor data

The agent calls web_search with the constructed query. The search results provide up-to-date information about vendors the target company uses or is evaluating, recent contract news, and market positioning articles.
3

Generate the competitive intelligence report

The agent sends company_name, competitors_data, and the fresh search_results to the LLM. The LLM produces a structured JSON report covering eight dimensions: competitor strengths and weaknesses, market position, pricing comparison, service gaps, differentiators, market opportunities, and a recommended winning strategy.

Tools used

web_search

Retrieves current competitive intelligence including vendor comparisons, market positioning, and pricing data for the target company’s industry.

Output schema

The LLM is prompted to return structured JSON only. The expected structure is:
{
  "competitor_strengths": [
    "Established brand recognition in the manufacturing sector",
    "Large implementation team with local presence"
  ],
  "competitor_weaknesses": [
    "High licensing costs",
    "Slow implementation timelines (12-18 months average)"
  ],
  "market_position": "The target company currently uses legacy on-premise ERP from a Tier-1 vendor with limited cloud support.",
  "pricing_comparison": "Competitor pricing is 40-60% higher than Webanix's managed service model.",
  "service_gaps": [
    "No dedicated AI/ML integration offering",
    "Limited post-implementation support SLAs"
  ],
  "differentiators": [
    "Faster implementation (3-6 months)",
    "AI-powered analytics module included",
    "Dedicated customer success manager"
  ],
  "market_opportunities": [
    "Upcoming contract renewal in Q2",
    "Recent C-suite change signals openness to new vendors"
  ],
  "winning_strategy": "Lead with speed-to-value and total cost of ownership comparison. Target the new CTO with a proof-of-concept proposal."
}
Pass competitor_analysis to the outreach generation and proposal generation agents to have the LLM automatically weave competitive differentiators into your messaging and proposal narrative.

Source code

import json
from llm import llm
from tools.search_tool import web_search

def competitor_analysis_agent(state):
    company_name = state["company_name"]
    competitors_data = state["competitors_data"]

    # Perform internet search for fresh competitor data
    search_query = f"competitors of {company_name} {competitors_data} IT services 2024 2025"
    search_results = web_search(search_query)

    response = llm.invoke(
        f"""
        You are a Competitor Analysis Agent.

        Analyze the competitive landscape using provided data and fresh search results.

        Company Name:
        {company_name}

        Initial Competitor Data:
        {competitors_data}

        Fresh Search Results:
        {json.dumps(search_results, indent=2)}

        Analyze:
        - competitor_strengths
        - competitor_weaknesses
        - market_position
        - pricing_comparison
        - service_gaps
        - differentiators
        - market_opportunities
        - winning_strategy

        Return structured JSON only.
        """
    )

    return {
        "competitor_analysis": response.content
    }

Build docs developers (and LLMs) love