Skip to main content
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 the competitors 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.

Code Location

Error Handling

Since this is fire-and-forget, errors don’t fail the entire onboarding. The orchestrator logs the error and continues.