Competitive Landscape Research & Evaluation System (Initial Implementation)
Two new agents that discover, evaluate, and classify competitors using Perplexity Sonar Pro. The system splits competitive analysis into two phases with opposing cognitive biases: the researcher uses **completion bias** to find as many candidates as possible, while the evaluator…
Changelog - 2026-03-10_02
Competitive Landscape Research & Evaluation System (Initial Implementation)
Two new agents that discover, evaluate, and classify competitors using Perplexity Sonar Pro. The system splits competitive analysis into two phases with opposing cognitive biases: the researcher uses completion bias to find as many candidates as possible, while the evaluator uses skepticism bias to challenge whether each candidate is actually a competitor.
Design spec: context-v/Introducing-a-Competitive-Landscape-Research-and-Evaluation-System.md
Architecture
Two-Agent Design
| Agent | Role | Bias | Perplexity Calls |
| Researcher | Discover candidates via multi-query search | Completion (find more) | 1 query generation + 5 search queries |
| Evaluator | Challenge, classify, and identify gaps | Skepticism (remove false positives) | 1 evaluation + 0-2 gap searches |
Source Priority
Both agents follow the same hierarchy:
Dataroom — highest trust, pre-seeded into candidates
Deck — competitive context from the pitch deck
User-provided —
known_competitorsandsearch_variantsfrom company JSONWeb research — Perplexity Sonar Pro queries
Four-Criteria Evaluation
| Criterion | Question |
| Same customer segment | Do they sell to the same buyer persona? |
| Substitutability | Could a customer choose one instead of the other? |
| Same budget line | Would they compete for the same dollar? |
| Market overlap | Same geographic/vertical markets? |
Classification Rules
direct_competitor: High on 3-4 criteria
indirect_competitor: High on 2 criteria
adjacent: High on 1 criterion
not_a_competitor: High on 0 — removed from results
Changes
New File: src/agents/competitive_landscape_researcher.py
~480 lines. Discovers candidate competitors through multi-query web research.
_extract_market_category(): Pulls product/market context from deck analysis and research state_get_deck_competitors(): Extracts competitor mentions from pitch deckcompetitive_landscapefield_get_dataroom_competitors(): Extracts structured competitor data from dataroom analysis_generate_queries(): Uses Perplexity to generate 5 targeted search queries, incorporating user-providedsearch_variants; falls back to template queries on failure_search_for_competitors(): Executes a single query, extracts structured competitor data (name, description, website, funding, online presence, etc.)_deduplicate_candidates(): Merges candidates from multiple sources by name, combining source queries and URLs_save_research_artifact(): Saves1-competitive-research.md(human-readable) and1-competitive-research.json(structured)competitive_landscape_researcher(): Main agent function — orchestrates all phases
New File: src/agents/competitive_landscape_evaluator.py
~560 lines. Evaluates and classifies candidates, runs gap analysis.
_evaluate_candidates(): Sends all candidates to Perplexity for skeptical evaluation against four criteria; returns evaluations + identified gaps + gap queries_search_for_gaps(): Runs up to 2 additional queries to find competitors missed in initial research; filters out already-known companies_merge_evaluation_with_candidate(): Combines evaluation results (classification, reasoning, boolean criteria) with original candidate data (funding, website, online presence)_save_evaluation_artifact(): Saves1-competitive-evaluation.mdwith tables (direct, indirect, adjacent, removed) and1-competitive-evaluation.jsoncompetitive_landscape_evaluator(): Main agent function — orchestrates evaluation + gap analysis, determines confidence level (high/medium/low based on direct competitor count)
Modified: src/state.py
New TypedDicts for the competitive landscape pipeline:
CompetitorCandidate: Raw candidate with name, description, website, funding details, online presence dict, source tracking, and origin flags (from_deck, from_dataroom)CompetitiveLandscapeResearch: Researcher output — candidates list, queries executed, totalsEvaluatedCompetitor: Post-evaluation competitor with classification, reasoning, four boolean criteria, and complete investor listCompetitiveLandscapeEvaluation: Evaluator output — evaluated list, direct/indirect name lists, removed list, gap additions, summary, confidence
New MemoState fields:
search_variants: Optional[List[str]]— user-provided search terms for competitive researchknown_competitors: Optional[List[str]]— user-provided known competitor namescompetitive_candidates: Optional[CompetitiveLandscapeResearch]— researcher outputcompetitive_landscape: Optional[CompetitiveLandscapeEvaluation]— evaluator output
Updated create_initial_state() to accept and initialize all new fields.
Modified: src/workflow.py
Imported both competitive agents
Added
competitive_researcherandcompetitive_evaluatornodesUpdated edge sequence:
Before: section_research → cite After: section_research → competitive_researcher → competitive_evaluator → citeUpdated
generate_memo()to acceptsearch_variantsandknown_competitorsparameters
Modified: src/main.py
Loads
search_variantsandknown_competitorsfrom company JSON configPrints them during startup if present
Passes them through to
generate_memo()
Artifacts Produced
Each run creates two new artifact files in the output directory:
| File | Content |
1-competitive-research.md | Human-readable report: queries executed, all candidates with details |
1-competitive-research.json | Structured JSON of all candidates and queries |
1-competitive-evaluation.md | Evaluation tables: direct, indirect, adjacent, removed, gap additions |
1-competitive-evaluation.json | Structured JSON with evaluations, classifications, and confidence |
Company JSON Config
New optional fields in data/{Company}.json:
{
"search_variants": ["enzyme supplements", "metabolic health startups"],
"known_competitors": ["Company A", "Company B"]
}search_variants: Incorporated into Perplexity query generation for more targeted resultsknown_competitors: Pre-seeded into candidate list withsource_queries: ["user_provided"]
Pipeline Position
Dataroom → Deck → Research → Section Research → Competitive Researcher →
Competitive Evaluator → [CITE on 1-research/] → [GATE 1] → Writer → ...Both agents run in the research phase, after section research generates per-section research files, and before citation enrichment. The writer receives the evaluated competitive landscape data in state and can use it directly.
Status
Initial implementation — not yet tested with a live run. All imports verified, workflow builds with 28 nodes. Awaiting end-to-end test before promoting to feat(agent).