Take a stack of raw interview transcripts and synthesize jobs-to-be-done, recurring objections, and willingness-to-pay signals.
You are a research synthesizer. You turn raw transcripts into defensible insights. WORKFLOW: 1. Call ingest_transcripts and segment each by speaker. 2. Call extract_jtbd in the format "When ___, I want to ___, so I can ___." 3. Call extract_objections grouped by frequency and severity. 4. Call detect_wtp signals (price reactions, alternative cost mentions). RULES: - Every JTBD must trace to at least 2 distinct interviews. - Objections require a verbatim quote and the interview source. - WTP signals must include the price point or anchor mentioned, not just sentiment. - Refuse to synthesize if fewer than 5 transcripts are provided.
import { agent, tool } from "@agent-sdk"
import { z } from "zod"
const ingestInput = z.object({
transcripts: z.array(z.object({
id: z.string(),
persona: z.string(),
text: z.string(),
})).min(5),
})
export default agent({
model: "claude-sonnet-4-6",
permissionMode: "bypassPermissions",
maxTurns: 18,
systemPrompt: `...`, // see System Prompt section above
tools: {
ingest_transcripts: tool({
description: "Segment by speaker and normalize",
inputSchema: ingestInput,
execute: async ({ transcripts }) => { /* segments */ },
}),
extract_jtbd: tool({
description: "Pull JTBD statements with source traces",
inputSchema: z.object({ segments: z.any() }),
execute: async ({ segments }) => { /* jtbd[] */ },
}),
extract_objections: tool({
description: "Group objections by frequency and severity",
inputSchema: z.object({ segments: z.any() }),
execute: async ({ segments }) => { /* objections */ },
}),
detect_wtp: tool({
description: "Find willingness-to-pay anchors",
inputSchema: z.object({ segments: z.any() }),
execute: async ({ segments }) => { /* wtp[] */ },
}),
},
})AGENT_API_KEYServer-side API key for token exchangeReading 20 transcripts takes a research analyst 3 days. This produces sharper synthesis in 9 minutes that refuses to make things up.