Enter a competitor URL to get comprehensive competitive intelligence. Uses Firecrawl Map + Parallel Scrape for fast extraction (~3-5s). Analyzes positioning, pricing, features, tech stack, and generates sales battle cards.
Requirements, wiring steps, and what this pattern adds to your project.
Pick how you want to pull this pattern in. Then wire env vars and routes the same way.
Install from the preview toolbar
Copy the install command above and run it in your project — Pro patterns include a short-lived token.
Add environment variables to .env.local
OPENAI_API_KEY, FIRECRAWL_API_KEY
Point client fetches at your API routes
Replace preview `/view/.../api/...` paths with `/api/...` in the installed files.
Customize the agent and tool files
Adapt prompts, tools, and stop conditions for your product — Copy for AI in the toolbar helps seed that work.
Run your dev server and open the pattern route
Install dependencies if needed, then start the app and verify responses.
AI SDK APIs
useChatgatewayToolLoopAgenttoolhasToolCallstepCountIscreateAgentUIStreamResponseInferAgentUIMessageDefaultChatTransportUIMessageProviders
External services
app/page.tsxapp/layout.tsxapp/api/competitor-agent/route.tslib/actions.tslib/competitor-types.tslib/rate-limit.tslib/agent-research.tslib/transform-utils.tslib/ai/competitor-agent.tslib/ai/tools/analyze-positioning.tslib/ai/tools/extract-pricing.tslib/ai/tools/identify-features.tslib/ai/tools/analyze-tech-stack.tslib/ai/tools/find-weaknesses.tslib/ai/tools/generate-battlecard.tsREADME.mdnpm packages
8
Registry components
competitor-agent/route.tsAPI route using createAgentUIStreamResponse with competitorContext via callOptions.
ai/competitor-agent.tsToolLoopAgent with 6 competitor analysis tools, callOptionsSchema + prepareCall for context injection.
lib/actions.tsServer action implementing Firecrawl-based competitor scraping pipeline: map website, identify key pages, parallel scrape, LLM extraction via generateObject.
lib/agent-research.tsDeep research functions (researchPricing, researchFeatures, researchTechStack, researchReviews) with detailed Zod schemas for structured extraction.
tools/analyze-positioning.tsTool for extracting value propositions, target audience, and competitive positioning.
tools/extract-pricing.tsTool for structuring pricing tiers, models, and billing options from competitor data.
tools/identify-features.tsTool for building categorized feature matrices from competitor websites.
tools/analyze-tech-stack.tsTool for detecting frontend/backend technologies, infrastructure, and third-party services.
tools/find-weaknesses.tsTool for identifying feature gaps, UX issues, and competitive opportunities.
tools/generate-battlecard.tsTool for generating comprehensive sales battle cards with objection handling.
Enter a competitor URL to get comprehensive competitive intelligence. Uses Firecrawl Map + Parallel Scrape for fast extraction (~3-5s). Analyzes positioning, pricing, features, tech stack, and generates sales battle cards.
Requirements, wiring steps, and what this pattern adds to your project.
Pick how you want to pull this pattern in. Then wire env vars and routes the same way.
Install from the preview toolbar
Copy the install command above and run it in your project — Pro patterns include a short-lived token.
Add environment variables to .env.local
OPENAI_API_KEY, FIRECRAWL_API_KEY
Point client fetches at your API routes
Replace preview `/view/.../api/...` paths with `/api/...` in the installed files.
Customize the agent and tool files
Adapt prompts, tools, and stop conditions for your product — Copy for AI in the toolbar helps seed that work.
Run your dev server and open the pattern route
Install dependencies if needed, then start the app and verify responses.
AI SDK APIs
useChatgatewayToolLoopAgenttoolhasToolCallstepCountIscreateAgentUIStreamResponseInferAgentUIMessageDefaultChatTransportUIMessageProviders
External services
app/page.tsxapp/layout.tsxapp/api/competitor-agent/route.tslib/actions.tslib/competitor-types.tslib/rate-limit.tslib/agent-research.tslib/transform-utils.tslib/ai/competitor-agent.tslib/ai/tools/analyze-positioning.tslib/ai/tools/extract-pricing.tslib/ai/tools/identify-features.tslib/ai/tools/analyze-tech-stack.tslib/ai/tools/find-weaknesses.tslib/ai/tools/generate-battlecard.tsREADME.mdnpm packages
8
Registry components
competitor-agent/route.tsAPI route using createAgentUIStreamResponse with competitorContext via callOptions.
ai/competitor-agent.tsToolLoopAgent with 6 competitor analysis tools, callOptionsSchema + prepareCall for context injection.
lib/actions.tsServer action implementing Firecrawl-based competitor scraping pipeline: map website, identify key pages, parallel scrape, LLM extraction via generateObject.
lib/agent-research.tsDeep research functions (researchPricing, researchFeatures, researchTechStack, researchReviews) with detailed Zod schemas for structured extraction.
tools/analyze-positioning.tsTool for extracting value propositions, target audience, and competitive positioning.
tools/extract-pricing.tsTool for structuring pricing tiers, models, and billing options from competitor data.
tools/identify-features.tsTool for building categorized feature matrices from competitor websites.
tools/analyze-tech-stack.tsTool for detecting frontend/backend technologies, infrastructure, and third-party services.
tools/find-weaknesses.tsTool for identifying feature gaps, UX issues, and competitive opportunities.
tools/generate-battlecard.tsTool for generating comprehensive sales battle cards with objection handling.

Unlock the live preview and source
Locked on free (high token spend). Pro runs the live demo and includes the source.
Early-bird pricing — limited time

Open on desktop for the interactive preview.
Enter a competitor URL to get comprehensive competitive intelligence. Uses Firecrawl Map + Parallel Scrape for fast extraction (~3-5s). Analyzes positioning, pricing, features, tech stack, and generates sales battle cards.
Unlock the live preview and source
Locked on free (high token spend). Pro runs the live demo and includes the source.

Unlock the live preview and source
Locked on free (high token spend). Pro runs the live demo and includes the source.
Early-bird pricing — limited time

Open on desktop for the interactive preview.
Enter a competitor URL to get comprehensive competitive intelligence. Uses Firecrawl Map + Parallel Scrape for fast extraction (~3-5s). Analyzes positioning, pricing, features, tech stack, and generates sales battle cards.
Unlock the live preview and source
Locked on free (high token spend). Pro runs the live demo and includes the source.