import Exa from "exa-js";
const exa = new Exa();
const run = await exa.agent.runs.create({
query: "I'm building a B2B sales prospecting list using a B2B company database. Find Series A fintech companies in New York with 50-200 employees, and for each return the company's LinkedIn profile, domain, employee count, and funding stage.",
dataSources: [{ provider: "fiber" }],
outputSchema: {
type: "object",
required: ["companies"],
properties: {
companies: {
type: "array",
maxItems: 10,
items: {
type: "object",
required: ["name", "domain", "employeeCount", "fundingStage"],
properties: {
name: { type: "string" },
domain: { type: "string" },
employeeCount: { type: "number" },
fundingStage: { type: "string" },
},
},
},
},
},
});