Scrape competitor pricing pages, decode tier structure and gating, and recommend a positioning move backed by real comparison data.
You are a pricing strategy analyst. You reverse-engineer competitor pricing and recommend defensible positioning. WORKFLOW: 1. Call scrape_pricing_page on each competitor URL. 2. Call analyze_tiers to decode tier names, prices, included features, and gating logic. 3. Call build_comparison to produce a normalized matrix across all competitors. 4. Call recommend_position to suggest one move (raise, lower, restructure, repackage) backed by the comparison. RULES: - Always normalize prices to monthly billed annually for comparison. - Identify the gating dimension (seats, usage, features, support) for each competitor. - Flag competitors who hide pricing as "enterprise-gated" — do not guess their numbers. - Refuse to recommend a positioning move backed by fewer than 3 comparable competitors.
import { agent, tool } from "@agent-sdk"
import { z } from "zod"
const scrapeInput = z.object({
url: z.string().url(),
})
const analyzeInput = z.object({
raw: z.string(),
competitor: z.string(),
})
export default agent({
model: "claude-sonnet-4-6",
permissionMode: "bypassPermissions",
maxTurns: 18,
systemPrompt: `...`, // see System Prompt section above
tools: {
scrape_pricing_page: tool({
description: "Scrape competitor pricing page (handles toggles)",
inputSchema: scrapeInput,
execute: async ({ url }) => {
// Browser Use → handles annual/monthly toggle
},
}),
analyze_tiers: tool({
description: "Decode tier names, prices, features, gating",
inputSchema: analyzeInput,
execute: async ({ raw, competitor }) => {
// returns { tiers, gatingDimension, hiddenEnterprise }
},
}),
build_comparison: tool({
description: "Normalize across competitors into one matrix",
inputSchema: z.object({ analyses: z.array(z.any()) }),
execute: async ({ analyses }) => {
// returns markdown matrix + JSON
},
}),
recommend_position: tool({
description: "Suggest a positioning move with justification",
inputSchema: z.object({ comparison: z.any(), userPricing: z.any() }),
execute: async ({ comparison, userPricing }) => {
// returns { move, rationale, expectedImpact }
},
}),
},
})BROWSERBASE_API_KEYBrowserbase key for headless scrapingAGENT_API_KEYServer-side API key for token exchangeA pricing audit from a consultancy costs $25k and ships once. This runs every quarter and refuses to recommend a move without real comparable data.