import Exa from "exa-js";
const exa = new Exa();
const run = await exa.agent.runs.create({
query: "Verify the business 'Stripe, Inc.' in San Francisco, CA and return its officers and registration status.",
dataSources: [{ provider: "baselayer" }],
outputSchema: {
type: "object",
required: ["business"],
properties: {
business: {
type: "object",
required: ["name", "verified", "incorporationState", "officers"],
properties: {
name: { type: "string" },
verified: { type: "boolean" },
incorporationState: { type: "string" },
officers: {
type: "array",
items: {
type: "object",
required: ["name", "title"],
properties: {
name: { type: "string" },
title: { type: "string" },
},
},
},
},
},
},
},
});