import Exa from "exa-js";
const exa = new Exa();
const run = await exa.agent.runs.create({
query: "Find beach destinations reachable from New York for under $400 round-trip in March.",
dataSources: [{ provider: "jinko" }],
outputSchema: {
type: "object",
required: ["destinations"],
properties: {
destinations: {
type: "array",
maxItems: 10,
items: {
type: "object",
required: ["city", "iataCode", "lowestFare"],
properties: {
city: { type: "string" },
iataCode: { type: "string" },
lowestFare: { type: "number", description: "round-trip fare in USD" },
},
},
},
},
},
});