Example Agent response
output.structured.gtm_members| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | full_name | company | title | gtm_function | company_verified_as_exa_ai | evidence_urls |
| 2 | Marcus Holm | Exa | Chief Revenue Officer (CRO) | Revenue / GTM leadership | true | 2 links |
| 3 | Karan Singh | Exa | VP, Revenue Operations | Revenue Operations | true | 2 links |
| 4 | Jatin Gupta | Exa | GTM Engineer | GTM Engineering / Growth | true | 3 links |
| 5 | Gavin Smith | Exa | Founding Strategic Account Executive | Sales | true | 1 link |
| 6 | Chris Perpignani | Exa | Enterprise Growth at Exa | Enterprise Growth / Sales | true | 2 links |
| 7 | … plus 7 more | |||||
Example Agent response
output.structured.company_intel| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | company | category | signal | detail | source | disposition |
| 2 | Ramp Business Corporation | Identity | Ramp Business Corporation | Finance operations platform for corporate cards, expense management, AP, procurement, and reporting. | ramp.com/about-us | verified |
| 3 | Ramp Business Corporation | Partnership | Microsoft | Microsoft 365, Copilot, and Teams integration highlighted in Ramp press materials. | ramp.com/press | ecosystem |
| 4 | Ramp Business Corporation | Partnership | Visa | Deepened payments-network partnership for autonomous AI corporate payments. | PRNewswire | payments |
| 5 | Ramp Business Corporation | Investment | Series F | $750M financing round at a $44B valuation. | PRNewswire | 2026-06-04 |
| 6 | Ramp Business Corporation | Risk | Bank / compliance dependency | Financial institution partners and business-only KYB workflows are material diligence areas. | legal terms | review |
Example Agent response
output.structured.job_postings| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | company | title | function | location | company_verified_as_exa_ai | source_platform |
| 2 | Exa | Account Executive @ Exa | Sales | San Francisco, CA | true | Ashby |
| 3 | Exa | Sales Development Representative | Sales Development | Not specified | true | Ashby |
| 4 | Exa | Founding Account Executive - NYC | Sales | New York City | true | Ashby |
| 5 | Exa | Executive Assistant to Founders | Operations | San Francisco, CA | true | Ashby |
| 6 | Exa | Software Engineer, Backend | Engineering | San Francisco, CA | true | Ashby |
Example Agent response
output.structured.reports| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | company | domain | overview | buyingSignals | sourceUrls | verified_domain |
| 2 | Ramp | ramp.com | Finance automation for cards, expenses, bill pay, and procurement. | enterpriseprocurement | 3 links | true |
| 3 | Mercury | mercury.com | Business banking, treasury, and financial workflows for startups. | startup focusbanking | 2 links | true |
Anonymized sample response
output.structured.contacts| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | company | contact_label | role | relevanceReason | evidence_scope | contact_cost_bound |
| 2 | LangChain | Contact A | Partnerships lead | Owns ecosystem integrations and partner motion. | role evidence | max 2 |
| 3 | Modal | Contact B | GTM lead | Relevant for compute, developer, and platform partnerships. | role evidence | max 2 |
Synthetic sample response
output.structured.companies| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | company | domain | reason | sourceUrl | excluded_match | status |
| 2 | Sample output; excluded input rows: Cursor and CodeRabbit | |||||
| 3 | PatchPilot | patchpilot.ai | Builds agentic code repair infrastructure. | funding | none | new |
| 4 | StackRelay | stackrelay.dev | Routes coding-agent tasks across tools. | homepage | none | new |
Synthetic sample response
output.structured.companies| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | company | website | hiringPageUrl | hiringEvidence | location | followup_source |
| 2 | Sample output continued from a previous run: narrowed prior company results to San Francisco hiring matches | |||||
| 3 | Northstar IDE | northstar.dev | /careers/platform | Open platform engineer role. | San Francisco | previous run |
| 4 | TraceForge | traceforge.dev | /jobs | Hiring infra engineer for agent runtime team. | San Francisco | previous run |
Find all GTM members at Exa.ai
Use a discovery prompt when Agent should find the rows. Be explicit about company disambiguation and require current-employment evidence so similarly named companies do not leak into the result.from exa_py import Exa
exa = Exa()
run = exa.agent.runs.create(
query="Find all GTM members currently working at Exa.ai. Verify each person is at the correct company: Exa, the AI search company at exa.ai, not any other company named Exa. Include the company name in every row. Include only people with public evidence that they currently work at Exa and whose role is go-to-market, such as sales, business development, partnerships, customer success, marketing, growth, or revenue. Return one row per person.",
effort="high",
output_schema={
"type": "object",
"required": ["gtm_members"],
"properties": {
"gtm_members": {
"type": "array",
"maxItems": 100,
"items": {
"type": "object",
"required": ["full_name", "company", "title", "gtm_function", "company_verified_as_exa_ai", "evidence_urls"],
"properties": {
"full_name": {"type": "string"},
"company": {"type": "string"},
"title": {"type": "string"},
"gtm_function": {"type": "string"},
"company_verified_as_exa_ai": {"type": "boolean"},
"evidence_summary": {"type": "string"},
"profile_url": {"type": "string", "format": "uri"},
"evidence_urls": {
"type": "array",
"items": {"type": "string", "format": "uri"},
"minItems": 1,
},
},
},
}
},
},
)
print(run)
import Exa from "exa-js";
const exa = new Exa();
const run = await exa.agent.runs.create({
query: "Find all GTM members currently working at Exa.ai. Verify each person is at the correct company: Exa, the AI search company at exa.ai, not any other company named Exa. Include the company name in every row. Include only people with public evidence that they currently work at Exa and whose role is go-to-market, such as sales, business development, partnerships, customer success, marketing, growth, or revenue. Return one row per person.",
effort: "high",
outputSchema: {
type: "object",
required: ["gtm_members"],
properties: {
gtm_members: {
type: "array",
maxItems: 100,
items: {
type: "object",
required: ["full_name", "company", "title", "gtm_function", "company_verified_as_exa_ai", "evidence_urls"],
properties: {
full_name: { type: "string" },
company: { type: "string" },
title: { type: "string" },
gtm_function: { type: "string" },
company_verified_as_exa_ai: { type: "boolean" },
evidence_summary: { type: "string" },
profile_url: { type: "string", format: "uri" },
evidence_urls: {
type: "array",
items: { type: "string", format: "uri" },
minItems: 1
}
}
}
}
}
}
});
console.log(run);
curl -s -X POST "https://api.exa.ai/agent/runs" \
-H "Content-Type: application/json" \
-H "x-api-key: $EXA_API_KEY" \
-d '
{
"query": "Find all GTM members currently working at Exa.ai. Verify each person is at the correct company: Exa, the AI search company at exa.ai, not any other company named Exa. Include the company name in every row. Include only people with public evidence that they currently work at Exa and whose role is go-to-market, such as sales, business development, partnerships, customer success, marketing, growth, or revenue. Return one row per person.",
"effort": "high",
"outputSchema": {
"type": "object",
"required": ["gtm_members"],
"properties": {
"gtm_members": {
"type": "array",
"maxItems": 100,
"items": {
"type": "object",
"required": ["full_name", "company", "title", "gtm_function", "company_verified_as_exa_ai", "evidence_urls"],
"properties": {
"full_name": { "type": "string" },
"company": { "type": "string" },
"title": { "type": "string" },
"gtm_function": { "type": "string" },
"company_verified_as_exa_ai": { "type": "boolean" },
"evidence_summary": { "type": "string" },
"profile_url": { "type": "string", "format": "uri" },
"evidence_urls": {
"type": "array",
"items": { "type": "string", "format": "uri" },
"minItems": 1
}
}
}
}
}
}
}
'
KYC / KYB intelligence
Use Agent when a partner or vendor review needs public web intelligence, not just a single profile page. Ask for identity verification, business context, public signals, investment activity, and explicit risk notes in one structured object.from exa_py import Exa
exa = Exa()
run = exa.agent.runs.create(
query="Research Ramp (ramp.com) as a potential partner for a fintech infrastructure company. Verify the company identity. Return concise KYB intelligence covering company identity, brand or ecosystem partnerships, public mentions or notable news, recent investment activity, and risk notes. Use public sources and include source URLs.",
effort="medium",
output_schema={
"type": "object",
"required": ["company_intel"],
"properties": {
"company_intel": {
"type": "object",
"required": [
"company",
"domain",
"identity_verified",
"business_summary",
"brand_partnerships",
"public_mentions",
"investment_activity",
"risk_notes",
"source_urls",
],
"properties": {
"company": {"type": "string"},
"domain": {"type": "string"},
"identity_verified": {"type": "boolean"},
"business_summary": {"type": "string"},
"brand_partnerships": {
"type": "array",
"maxItems": 3,
"items": {
"type": "object",
"required": ["partner", "relationship", "evidence"],
"properties": {
"partner": {"type": "string"},
"relationship": {"type": "string"},
"evidence": {"type": "string"},
},
},
},
"public_mentions": {
"type": "array",
"maxItems": 3,
"items": {
"type": "object",
"required": ["mention", "source"],
"properties": {
"mention": {"type": "string"},
"date": {"type": "string"},
"source": {"type": "string", "format": "uri"},
},
},
},
"investment_activity": {
"type": "array",
"maxItems": 3,
"items": {
"type": "object",
"required": ["event", "source"],
"properties": {
"event": {"type": "string"},
"amount_or_valuation": {"type": "string"},
"date": {"type": "string"},
"source": {"type": "string", "format": "uri"},
},
},
},
"risk_notes": {
"type": "array",
"maxItems": 3,
"items": {"type": "string"},
},
"source_urls": {
"type": "array",
"maxItems": 8,
"items": {"type": "string", "format": "uri"},
},
},
}
},
},
)
print(run)
import Exa from "exa-js";
const exa = new Exa();
const run = await exa.agent.runs.create({
query: "Research Ramp (ramp.com) as a potential partner for a fintech infrastructure company. Verify the company identity. Return concise KYB intelligence covering company identity, brand or ecosystem partnerships, public mentions or notable news, recent investment activity, and risk notes. Use public sources and include source URLs.",
effort: "medium",
outputSchema: {
type: "object",
required: ["company_intel"],
properties: {
company_intel: {
type: "object",
required: [
"company",
"domain",
"identity_verified",
"business_summary",
"brand_partnerships",
"public_mentions",
"investment_activity",
"risk_notes",
"source_urls"
],
properties: {
company: { type: "string" },
domain: { type: "string" },
identity_verified: { type: "boolean" },
business_summary: { type: "string" },
brand_partnerships: {
type: "array",
maxItems: 3,
items: {
type: "object",
required: ["partner", "relationship", "evidence"],
properties: {
partner: { type: "string" },
relationship: { type: "string" },
evidence: { type: "string" }
}
}
},
public_mentions: {
type: "array",
maxItems: 3,
items: {
type: "object",
required: ["mention", "source"],
properties: {
mention: { type: "string" },
date: { type: "string" },
source: { type: "string", format: "uri" }
}
}
},
investment_activity: {
type: "array",
maxItems: 3,
items: {
type: "object",
required: ["event", "source"],
properties: {
event: { type: "string" },
amount_or_valuation: { type: "string" },
date: { type: "string" },
source: { type: "string", format: "uri" }
}
}
},
risk_notes: {
type: "array",
maxItems: 3,
items: { type: "string" }
},
source_urls: {
type: "array",
maxItems: 8,
items: { type: "string", format: "uri" }
}
}
}
}
}
});
console.log(run);
curl -s -X POST "https://api.exa.ai/agent/runs" \
-H "Content-Type: application/json" \
-H "x-api-key: $EXA_API_KEY" \
-d '
{
"query": "Research Ramp (ramp.com) as a potential partner for a fintech infrastructure company. Verify the company identity. Return concise KYB intelligence covering company identity, brand or ecosystem partnerships, public mentions or notable news, recent investment activity, and risk notes. Use public sources and include source URLs.",
"effort": "medium",
"outputSchema": {
"type": "object",
"required": ["company_intel"],
"properties": {
"company_intel": {
"type": "object",
"required": [
"company",
"domain",
"identity_verified",
"business_summary",
"brand_partnerships",
"public_mentions",
"investment_activity",
"risk_notes",
"source_urls"
],
"properties": {
"company": { "type": "string" },
"domain": { "type": "string" },
"identity_verified": { "type": "boolean" },
"business_summary": { "type": "string" },
"brand_partnerships": {
"type": "array",
"maxItems": 3,
"items": {
"type": "object",
"required": ["partner", "relationship", "evidence"],
"properties": {
"partner": { "type": "string" },
"relationship": { "type": "string" },
"evidence": { "type": "string" }
}
}
},
"public_mentions": {
"type": "array",
"maxItems": 3,
"items": {
"type": "object",
"required": ["mention", "source"],
"properties": {
"mention": { "type": "string" },
"date": { "type": "string" },
"source": { "type": "string", "format": "uri" }
}
}
},
"investment_activity": {
"type": "array",
"maxItems": 3,
"items": {
"type": "object",
"required": ["event", "source"],
"properties": {
"event": { "type": "string" },
"amount_or_valuation": { "type": "string" },
"date": { "type": "string" },
"source": { "type": "string", "format": "uri" }
}
}
},
"risk_notes": {
"type": "array",
"maxItems": 3,
"items": { "type": "string" }
},
"source_urls": {
"type": "array",
"maxItems": 8,
"items": { "type": "string", "format": "uri" }
}
}
}
}
}
}
'
Job postings
Use Agent when open roles are spread across company pages, aggregators, and startup directories. This example constrains the source to Exa’s Ashby-hosted job board and still requires company disambiguation.from exa_py import Exa
exa = Exa()
run = exa.agent.runs.create(
query="Find current open job postings for Exa on Ashby. Use Ashby-hosted postings, preferably jobs.ashbyhq.com/exa, and verify each job is for Exa, the AI search company at exa.ai. Return up to 5 postings with company name, title, function, location, Ashby posting URL, and why it is relevant.",
effort="medium",
output_schema={
"type": "object",
"required": ["job_postings"],
"properties": {
"job_postings": {
"type": "array",
"maxItems": 5,
"items": {
"type": "object",
"required": [
"title",
"company",
"function",
"location",
"company_verified_as_exa_ai",
"posting_url",
"source_platform",
"why_relevant",
],
"properties": {
"title": {"type": "string"},
"company": {"type": "string"},
"function": {"type": "string"},
"location": {"type": "string"},
"company_verified_as_exa_ai": {"type": "boolean"},
"posting_url": {"type": "string", "format": "uri"},
"source_platform": {"type": "string"},
"why_relevant": {"type": "string"},
},
},
}
},
},
)
print(run)
import Exa from "exa-js";
const exa = new Exa();
const run = await exa.agent.runs.create({
query: "Find current open job postings for Exa on Ashby. Use Ashby-hosted postings, preferably jobs.ashbyhq.com/exa, and verify each job is for Exa, the AI search company at exa.ai. Return up to 5 postings with company name, title, function, location, Ashby posting URL, and why it is relevant.",
effort: "medium",
outputSchema: {
type: "object",
required: ["job_postings"],
properties: {
job_postings: {
type: "array",
maxItems: 5,
items: {
type: "object",
required: [
"title",
"company",
"function",
"location",
"company_verified_as_exa_ai",
"posting_url",
"source_platform",
"why_relevant"
],
properties: {
title: { type: "string" },
company: { type: "string" },
function: { type: "string" },
location: { type: "string" },
company_verified_as_exa_ai: { type: "boolean" },
posting_url: { type: "string", format: "uri" },
source_platform: { type: "string" },
why_relevant: { type: "string" }
}
}
}
}
}
});
console.log(run);
curl -s -X POST "https://api.exa.ai/agent/runs" \
-H "Content-Type: application/json" \
-H "x-api-key: $EXA_API_KEY" \
-d '
{
"query": "Find current open job postings for Exa on Ashby. Use Ashby-hosted postings, preferably jobs.ashbyhq.com/exa, and verify each job is for Exa, the AI search company at exa.ai. Return up to 5 postings with company name, title, function, location, Ashby posting URL, and why it is relevant.",
"effort": "medium",
"outputSchema": {
"type": "object",
"required": ["job_postings"],
"properties": {
"job_postings": {
"type": "array",
"maxItems": 5,
"items": {
"type": "object",
"required": [
"title",
"company",
"function",
"location",
"company_verified_as_exa_ai",
"posting_url",
"source_platform",
"why_relevant"
],
"properties": {
"title": { "type": "string" },
"company": { "type": "string" },
"function": { "type": "string" },
"location": { "type": "string" },
"company_verified_as_exa_ai": { "type": "boolean" },
"posting_url": { "type": "string", "format": "uri" },
"source_platform": { "type": "string" },
"why_relevant": { "type": "string" }
}
}
}
}
}
}
'
Enrich input rows
Useinput.data when your system already has the records and Agent should research or enrich each one. This pattern keeps row identity in structured input instead of burying it in the prompt.
from exa_py import Exa
exa = Exa()
run = exa.agent.runs.create(
query="For each input company, produce a concise research brief. Use recent, reputable sources. Return one report per input row.",
effort="medium",
input={"data": [{"company": "Ramp", "domain": "ramp.com"}, {"company": "Mercury", "domain": "mercury.com"}]},
output_schema={
"type": "object",
"required": ["reports"],
"properties": {
"reports": {
"type": "array",
"maxItems": 2,
"items": {
"type": "object",
"required": ["company", "domain", "overview", "buyingSignals", "sourceUrls", "verified_domain"],
"properties": {
"company": {"type": "string"},
"domain": {"type": "string"},
"overview": {"type": "string"},
"buyingSignals": {
"type": "array",
"maxItems": 3,
"items": {"type": "string"},
},
"sourceUrls": {
"type": "array",
"minItems": 1,
"items": {"type": "string", "format": "uri"},
},
"verified_domain": {"type": "boolean"},
},
},
}
},
},
)
print(run)
import Exa from "exa-js";
const exa = new Exa();
const run = await exa.agent.runs.create({
query: "For each input company, produce a concise research brief. Use recent, reputable sources. Return one report per input row.",
effort: "medium",
input: { data: [{ company: "Ramp", domain: "ramp.com" }, { company: "Mercury", domain: "mercury.com" }] },
outputSchema: {
type: "object",
required: ["reports"],
properties: {
reports: {
type: "array",
maxItems: 2,
items: {
type: "object",
required: ["company", "domain", "overview", "buyingSignals", "sourceUrls", "verified_domain"],
properties: {
company: { type: "string" },
domain: { type: "string" },
overview: { type: "string" },
buyingSignals: {
type: "array",
maxItems: 3,
items: { type: "string" }
},
sourceUrls: {
type: "array",
minItems: 1,
items: { type: "string", format: "uri" }
},
verified_domain: { type: "boolean" }
}
}
}
}
}
});
console.log(run);
curl -s -X POST "https://api.exa.ai/agent/runs" \
-H "Content-Type: application/json" \
-H "x-api-key: $EXA_API_KEY" \
-d '
{
"query": "For each input company, produce a concise research brief. Use recent, reputable sources. Return one report per input row.",
"effort": "medium",
"input": {
"data": [
{ "company": "Ramp", "domain": "ramp.com" },
{ "company": "Mercury", "domain": "mercury.com" }
]
},
"outputSchema": {
"type": "object",
"required": ["reports"],
"properties": {
"reports": {
"type": "array",
"maxItems": 2,
"items": {
"type": "object",
"required": ["company", "domain", "overview", "buyingSignals", "sourceUrls", "verified_domain"],
"properties": {
"company": { "type": "string" },
"domain": { "type": "string" },
"overview": { "type": "string" },
"buyingSignals": {
"type": "array",
"maxItems": 3,
"items": { "type": "string" }
},
"sourceUrls": {
"type": "array",
"minItems": 1,
"items": { "type": "string", "format": "uri" }
},
"verified_domain": { "type": "boolean" }
}
}
}
}
}
}
'
Enrich rows with bounded contact fields
Contact-oriented workflows can trigger separate contact enrichment charges. This anonymized docs version demonstrates the shape without publishing personal names, emails, phone numbers, or profile URLs.from exa_py import Exa
exa = Exa()
run = exa.agent.runs.create(
query="For each company, find the best sales or partnerships contact. Prefer leadership or go-to-market roles. Return anonymized contact labels in examples and include evidence for why each role is relevant.",
effort="high",
input={"data": [{"company": "LangChain", "domain": "langchain.com"}, {"company": "Modal", "domain": "modal.com"}]},
output_schema={
"type": "object",
"required": ["contacts"],
"properties": {
"contacts": {
"type": "array",
"maxItems": 2,
"items": {
"type": "object",
"required": ["company", "contact_label", "role", "relevanceReason"],
"properties": {
"company": {"type": "string"},
"contact_label": {"type": "string"},
"role": {"type": "string"},
"relevanceReason": {"type": "string"},
"contact_cost_bound": {"type": "string"},
},
},
}
},
},
)
print(run)
import Exa from "exa-js";
const exa = new Exa();
const run = await exa.agent.runs.create({
query: "For each company, find the best sales or partnerships contact. Prefer leadership or go-to-market roles. Return anonymized contact labels in examples and include evidence for why each role is relevant.",
effort: "high",
input: { data: [{ company: "LangChain", domain: "langchain.com" }, { company: "Modal", domain: "modal.com" }] },
outputSchema: {
type: "object",
required: ["contacts"],
properties: {
contacts: {
type: "array",
maxItems: 2,
items: {
type: "object",
required: ["company", "contact_label", "role", "relevanceReason"],
properties: {
company: { type: "string" },
contact_label: { type: "string" },
role: { type: "string" },
relevanceReason: { type: "string" },
contact_cost_bound: { type: "string" }
}
}
}
}
}
});
console.log(run);
curl -s -X POST "https://api.exa.ai/agent/runs" \
-H "Content-Type: application/json" \
-H "x-api-key: $EXA_API_KEY" \
-d '
{
"query": "For each company, find the best sales or partnerships contact. Prefer leadership or go-to-market roles. Return anonymized contact labels in examples and include evidence for why each role is relevant.",
"effort": "high",
"input": {
"data": [
{ "company": "LangChain", "domain": "langchain.com" },
{ "company": "Modal", "domain": "modal.com" }
]
},
"outputSchema": {
"type": "object",
"required": ["contacts"],
"properties": {
"contacts": {
"type": "array",
"maxItems": 2,
"items": {
"type": "object",
"required": ["company", "contact_label", "role", "relevanceReason"],
"properties": {
"company": { "type": "string" },
"contact_label": { "type": "string" },
"role": { "type": "string" },
"relevanceReason": { "type": "string" },
"contact_cost_bound": { "type": "string" }
}
}
}
}
}
}
'
Exclude known records
Useinput.exclusion when Agent should avoid records your product has already reviewed, shown, or rejected.
The sheet preview uses synthetic returned company names so the exclusion pattern is visible without implying those rows came from a live production run.
from exa_py import Exa
exa = Exa()
run = exa.agent.runs.create(
query="Find 10 seed-stage companies building infrastructure for AI coding agents. Do not return companies in the exclusion list.",
effort="auto",
input={"exclusion": [{"company": "Cursor", "domain": "cursor.com"}, {"company": "CodeRabbit", "domain": "coderabbit.ai"}]},
output_schema={
"type": "object",
"required": ["companies"],
"properties": {
"companies": {
"type": "array",
"maxItems": 10,
"items": {
"type": "object",
"required": ["company", "domain", "reason", "sourceUrl"],
"properties": {
"company": {"type": "string"},
"domain": {"type": "string"},
"reason": {"type": "string"},
"sourceUrl": {"type": "string", "format": "uri"},
"excluded_match": {"type": "string"},
"status": {"type": "string"},
},
},
}
},
},
)
print(run)
import Exa from "exa-js";
const exa = new Exa();
const run = await exa.agent.runs.create({
query: "Find 10 seed-stage companies building infrastructure for AI coding agents. Do not return companies in the exclusion list.",
effort: "auto",
input: { exclusion: [{ company: "Cursor", domain: "cursor.com" }, { company: "CodeRabbit", domain: "coderabbit.ai" }] },
outputSchema: {
type: "object",
required: ["companies"],
properties: {
companies: {
type: "array",
maxItems: 10,
items: {
type: "object",
required: ["company", "domain", "reason", "sourceUrl"],
properties: {
company: { type: "string" },
domain: { type: "string" },
reason: { type: "string" },
sourceUrl: { type: "string", format: "uri" },
excluded_match: { type: "string" },
status: { type: "string" }
}
}
}
}
}
});
console.log(run);
curl -s -X POST "https://api.exa.ai/agent/runs" \
-H "Content-Type: application/json" \
-H "x-api-key: $EXA_API_KEY" \
-d '
{
"query": "Find 10 seed-stage companies building infrastructure for AI coding agents. Do not return companies in the exclusion list.",
"effort": "auto",
"input": {
"exclusion": [
{ "company": "Cursor", "domain": "cursor.com" },
{ "company": "CodeRabbit", "domain": "coderabbit.ai" }
]
},
"outputSchema": {
"type": "object",
"required": ["companies"],
"properties": {
"companies": {
"type": "array",
"maxItems": 10,
"items": {
"type": "object",
"required": ["company", "domain", "reason", "sourceUrl"],
"properties": {
"company": { "type": "string" },
"domain": { "type": "string" },
"reason": { "type": "string" },
"sourceUrl": { "type": "string", "format": "uri" },
"excluded_match": { "type": "string" },
"status": { "type": "string" }
}
}
}
}
}
}
'
Continue a completed workflow
UsepreviousRunId when the next request should build on a completed run’s context.
The sheet preview uses synthetic returned company names to illustrate the continuation pattern without exposing a real prior run.
from exa_py import Exa
exa = Exa()
run = exa.agent.runs.create(
query="From the companies you found, narrow the list to those hiring platform engineers in San Francisco. Add the hiring page URL for each match.",
previous_run_id="agent_run_01j...",
output_schema={
"type": "object",
"required": ["companies"],
"properties": {
"companies": {
"type": "array",
"maxItems": 10,
"items": {
"type": "object",
"required": ["company", "website", "hiringPageUrl"],
"properties": {
"company": {"type": "string"},
"website": {"type": "string", "format": "uri"},
"hiringPageUrl": {"type": "string", "format": "uri"},
"hiringEvidence": {"type": "string"},
"location": {"type": "string"},
"followup_source": {"type": "string"},
},
},
}
},
},
)
print(run)
import Exa from "exa-js";
const exa = new Exa();
const run = await exa.agent.runs.create({
previousRunId: "agent_run_01j...",
query: "From the companies you found, narrow the list to those hiring platform engineers in San Francisco. Add the hiring page URL for each match.",
outputSchema: {
type: "object",
required: ["companies"],
properties: {
companies: {
type: "array",
maxItems: 10,
items: {
type: "object",
required: ["company", "website", "hiringPageUrl"],
properties: {
company: { type: "string" },
website: { type: "string", format: "uri" },
hiringPageUrl: { type: "string", format: "uri" },
hiringEvidence: { type: "string" },
location: { type: "string" },
followup_source: { type: "string" }
}
}
}
}
}
});
console.log(run);
curl -s -X POST "https://api.exa.ai/agent/runs" \
-H "Content-Type: application/json" \
-H "x-api-key: $EXA_API_KEY" \
-d '{
"previousRunId": "agent_run_01j...",
"query": "From the companies you found, narrow the list to those hiring platform engineers in San Francisco. Add the hiring page URL for each match.",
"outputSchema": {
"type": "object",
"required": ["companies"],
"properties": {
"companies": {
"type": "array",
"maxItems": 10,
"items": {
"type": "object",
"required": ["company", "website", "hiringPageUrl"],
"properties": {
"company": { "type": "string" },
"website": { "type": "string", "format": "uri" },
"hiringPageUrl": { "type": "string", "format": "uri" },
"hiringEvidence": { "type": "string" },
"location": { "type": "string" },
"followup_source": { "type": "string" }
}
}
}
}
}
}'
Broad list building with Agent Max
Useeffort: "max" for work where completeness and thoroughness matter more than latency or cost, including large list building, deep multi-source research, and criteria that are hard to verify. Agent Max is in public beta: send Exa-Beta: agent-max-effort-2026-07-27 with the request. The header accepts a comma-separated list of beta tokens.
from exa_py import Exa
exa = Exa()
run = exa.beta.agent.runs.create(
query="Find all companies building browser automation tools in the United States.",
effort="max",
budget={"maxCostDollars": 10},
betas=["agent-max-effort-2026-07-27"],
)
print(run)
import Exa from "exa-js";
const exa = new Exa();
const run = await exa.beta.agent.runs.create({
query: "Find all companies building browser automation tools in the United States.",
effort: "max",
budget: { maxCostDollars: 10 },
betas: ["agent-max-effort-2026-07-27"]
});
console.log(run);
curl -s -X POST "https://api.exa.ai/agent/runs" \
-H "Content-Type: application/json" \
-H "x-api-key: $EXA_API_KEY" \
-H "Exa-Beta: agent-max-effort-2026-07-27" \
-d '{
"query": "Find all companies building browser automation tools in the United States.",
"effort": "max",
"budget": { "maxCostDollars": 10 }
}'
Attach a data partner with Exa Connect
UsedataSources to let Exa Agent pull from a premium data partner during a run. Here it enriches each company with traffic from Similarweb and funding from Harmonic, blended with web research. See Exa Connect for the full list of partners.
from exa_py import Exa
exa = Exa()
run = exa.agent.runs.create(
query="For each input company, report estimated monthly visits and total funding raised. Use the attached data partners.",
effort="medium",
data_sources=[
{"provider": "similarweb"},
{"provider": "harmonic"},
],
input={
"data": [
{"company": "Ramp", "domain": "ramp.com"},
{"company": "Mercury", "domain": "mercury.com"},
]
},
output_schema={
"type": "object",
"required": ["companies"],
"properties": {
"companies": {
"type": "array",
"maxItems": 2,
"items": {
"type": "object",
"required": ["company", "domain", "monthlyVisits", "totalFunding"],
"properties": {
"company": {"type": "string"},
"domain": {"type": "string"},
"monthlyVisits": {"type": "number", "description": "from Similarweb"},
"totalFunding": {"type": "string", "description": "from Harmonic"},
},
},
}
},
},
)
print(run)
import Exa from "exa-js";
const exa = new Exa();
const run = await exa.agent.runs.create({
query: "For each input company, report estimated monthly visits and total funding raised. Use the attached data partners.",
effort: "medium",
dataSources: [{ provider: "similarweb" }, { provider: "harmonic" }],
input: {
data: [
{ company: "Ramp", domain: "ramp.com" },
{ company: "Mercury", domain: "mercury.com" }
]
},
outputSchema: {
type: "object",
required: ["companies"],
properties: {
companies: {
type: "array",
maxItems: 2,
items: {
type: "object",
required: ["company", "domain", "monthlyVisits", "totalFunding"],
properties: {
company: { type: "string" },
domain: { type: "string" },
monthlyVisits: { type: "number", description: "from Similarweb" },
totalFunding: { type: "string", description: "from Harmonic" }
}
}
}
}
}
});
console.log(run);
curl -s -X POST "https://api.exa.ai/agent/runs" \
-H "Content-Type: application/json" \
-H "x-api-key: $EXA_API_KEY" \
-d '{
"query": "For each input company, report estimated monthly visits and total funding raised. Use the attached data partners.",
"effort": "medium",
"dataSources": [
{ "provider": "similarweb" },
{ "provider": "harmonic" }
],
"input": {
"data": [
{ "company": "Ramp", "domain": "ramp.com" },
{ "company": "Mercury", "domain": "mercury.com" }
]
},
"outputSchema": {
"type": "object",
"required": ["companies"],
"properties": {
"companies": {
"type": "array",
"maxItems": 2,
"items": {
"type": "object",
"required": ["company", "domain", "monthlyVisits", "totalFunding"],
"properties": {
"company": { "type": "string" },
"domain": { "type": "string" },
"monthlyVisits": { "type": "number", "description": "from Similarweb" },
"totalFunding": { "type": "string", "description": "from Harmonic" }
}
}
}
}
}
}'
Production checklist
- Give Agent a specific
querythat names the unit of work and the desired source quality. - Use
input.datafor known records instead of embedding rows in the prompt. - Use
input.exclusionfor records that should not be returned again. - Add
outputSchemawhenever downstream code consumes the result. - Use
maxItemson arrays when you need predictable scope and cost. - Store the returned run
idso you can poll, replay events, inspect costs, or continue from the run later.