import Exa from "exa-js";
const exa = new Exa();
const run = await exa.agent.runs.create({
query: "What are prominent podcast hosts and guests saying about AI regulation in 2025?",
dataSources: [{ provider: "particle" }],
outputSchema: {
type: "object",
required: ["mentions"],
properties: {
mentions: {
type: "array",
maxItems: 10,
items: {
type: "object",
required: ["podcast", "episode", "speaker", "quote", "stance"],
properties: {
podcast: { type: "string" },
episode: { type: "string" },
speaker: { type: "string" },
quote: { type: "string" },
stance: { type: "string", description: "pro-regulation, anti-regulation, or nuanced" },
},
},
},
},
},
});