Internal Service β This is not an HTTP endpoint. Itβs called directly by the
generate-all orchestrator as a fire-and-forget background task.Purpose
Uses Firecrawlβs Agent API to discover up to 10 competitors for a business. Runs in GROUP 1c (parallel with scrape, non-blocking).Function Signature
Parameters
Returns
Firecrawl Agent API
This service uses Firecrawlβs Agent API (POST /v2/agent), an AI-powered endpoint that can browse the web and extract structured data based on a natural language prompt.
Database Schema
Competitors are stored in thecompetitors table:
Execution Timing
Competitor discovery runs in parallel with scraping but doesnβt block GROUP 2. This means if competitor discovery takes longer, the main onboarding flow continues without waiting.