lead-generation
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLead Generation with Exa Agent
使用Exa Agent生成潜在客户
Generate enriched lead lists using the Exa Agent API. An Agent run is an asynchronous, multi-step web research task: you describe the list you want plus an output schema, and Exa handles query decomposition, searching, verification, enrichment, and structured output internally. You do NOT need to orchestrate parallel searches, subagents, or manual deduplication.
For very large or continuously maintained lead lists with per-item verification, consider Exa Websets instead: https://docs.exa.ai/websets/api/overview
通过Exa Agent API生成丰富的潜在客户列表。Agent运行是一项异步的多步骤网络研究任务:您只需描述所需列表及输出schema,Exa会在内部处理查询分解、搜索、验证、信息补充和结构化输出。您无需协调并行搜索、子Agent或手动去重。
对于需要逐项验证的超大型或持续维护的潜在客户列表,建议改用Exa Websets:https://docs.exa.ai/websets/api/overview
Prerequisites
前提条件
This skill requires the Exa MCP server with the Agent tool enabled. Use the URL selection alias to enable .
agent_toolsagent_runIf the Agent tools are not available, tell the user:
You need the Exa MCP server installed with the Agent tools and your API key. Instructions: https://docs.exa.ai/reference/exa-mcp
Then stop.
本技能需要启用Agent工具的Exa MCP服务器。使用 URL选择别名来启用功能。
agent_toolsagent_run如果Agent工具不可用,请告知用户:
您需要安装带有Agent工具的Exa MCP服务器并配置您的API密钥。 操作说明:https://docs.exa.ai/reference/exa-mcp
然后停止操作。
Tool Restriction
工具限制
Use , plus Write and Bash (for CSV output). Do NOT use generic web search for the lead list itself.
agent_run使用,以及Write和Bash工具(用于CSV输出)。请勿对潜在客户列表本身使用通用网络搜索。
agent_runWorkflow
工作流程
1. Confirm the ICP with the user (one small Agent run if research is needed)
2. Call `agent_run` with an outputSchema
3. If the result is still running, call `agent_run` again with its `runId`
4. Read `output.structured` from the `agent_run` result
5. Write the CSV
6. Optional: expand with follow-up runs (previousRunId + input.exclusion)1. 与用户确认ICP(如需调研,可运行一次小型Agent任务)
2. 调用带有outputSchema的`agent_run`
3. 如果结果仍在运行,使用其`runId`再次调用`agent_run`
4. 从`agent_run`结果中读取`output.structured`
5. 写入CSV文件
6. 可选:通过后续运行扩展列表(使用previousRunId + input.exclusion)Step 1: Understand the ICP
步骤1:理解ICP
When the user says something like "Make a list of 200 leads for [company]", first establish the Ideal Customer Profile. If the user already described the ICP, confirm it. If not, run one small Agent run to research it:
agent_run {
"query": "Research {company_name}: what they sell, who their existing customers are, and what their ideal customer profile is.",
"effort": "low",
"outputSchema": {
"type": "object",
"properties": {
"company_description": { "type": "string", "description": "What the company does in 2 sentences or less" },
"icp_description": { "type": "string", "description": "Concise ICP description that clearly defines target companies" },
"sub_verticals": { "type": "array", "maxItems": 10, "items": { "type": "string" }, "description": "Sub-verticals breaking down the ICP" },
"useful_enrichments": { "type": "array", "maxItems": 8, "items": { "type": "string" }, "description": "Enrichment columns useful for filtering high-signal companies" }
},
"required": ["company_description", "icp_description", "sub_verticals", "useful_enrichments"]
}
}Present the ICP to the user and confirm:
- Is the ICP description accurate?
- Any companies to exclude (competitors, existing customers)?
- How many leads do they want? (default 200)
- Any specific enrichment columns they care about?
当用户提出类似“为[公司]生成200条潜在客户列表”的需求时,首先明确理想客户画像(ICP)。如果用户已描述ICP,需进行确认;如果没有,则运行一次小型Agent任务进行调研:
agent_run {
"query": "Research {company_name}: what they sell, who their existing customers are, and what their ideal customer profile is.",
"effort": "low",
"outputSchema": {
"type": "object",
"properties": {
"company_description": { "type": "string", "description": "What the company does in 2 sentences or less" },
"icp_description": { "type": "string", "description": "Concise ICP description that clearly defines target companies" },
"sub_verticals": { "type": "array", "maxItems": 10, "items": { "type": "string" }, "description": "Sub-verticals breaking down the ICP" },
"useful_enrichments": { "type": "array", "maxItems": 8, "items": { "type": "string" }, "description": "Enrichment columns useful for filtering high-signal companies" }
},
"required": ["company_description", "icp_description", "sub_verticals", "useful_enrichments"]
}
}向用户展示ICP并确认以下内容:
- ICP描述是否准确?
- 是否有需要排除的公司(竞争对手、现有客户)?
- 需要多少条潜在客户?(默认200条)
- 是否有特定需要补充的列?
Step 2: Create the Lead-Gen Run
步骤2:创建潜在客户生成任务
Design an with a bounded array. Keep schemas small, flat, and explicit; always bound arrays with .
outputSchemacompaniesmaxItemsCore fields to always include:
- (string)
company_name - (string)
website - (string, "in 12 words or less")
product_description - (integer, 1-10)
icp_fit_score - (string, "compelling one-liner in 20 words or less")
icp_fit_reasoning
Add enrichment fields tailored to the campaign (funding stage, headcount range, headquarters, hiring signals, etc.). Give string fields a length hint in their description to keep CSV output clean.
Use the run inputs for the pieces the old manual pipeline handled by hand:
- — describe the list: the ICP, geography, stage, and how many companies you want
query - — the exact structure back, with
outputSchemabounding the companies arraymaxItems - — scoring rules, source preferences, dedup/exclusion emphasis
systemPrompt - — companies to avoid (competitors, existing customers, results from earlier runs)
input.exclusion - —
effortby default;"low","auto", or"high"for large or hard lists"xhigh"
Example:
agent_run {
"query": "Find 100 companies matching this ICP: {icp_description}. Prioritize {sub_verticals}. For each company, score ICP fit 1-10 for {user_company}.",
"effort": "low",
"systemPrompt": "Prefer official company sites and recent funding announcements. Do not include duplicates or subsidiaries of the same parent company.",
"input": {
"exclusion": [
{ "company_name": "{competitor_1}" },
{ "company_name": "{existing_customer_1}" }
]
},
"outputSchema": {
"type": "object",
"properties": {
"companies": {
"type": "array",
"maxItems": 100,
"items": {
"type": "object",
"properties": {
"company_name": { "type": "string" },
"website": { "type": "string", "format": "uri" },
"product_description": { "type": "string", "description": "in 12 words or less" },
"icp_fit_score": { "type": "integer", "description": "1-10" },
"icp_fit_reasoning": { "type": "string", "description": "one-liner in 20 words or less" }
},
"required": ["company_name", "website", "product_description", "icp_fit_score", "icp_fit_reasoning"]
}
}
},
"required": ["companies"]
}
}agent_runstatus: "running"agent_run_...agent_runrunId设计包含有限数组的。保持schema简洁、扁平且明确;始终用限制数组长度。
companiesoutputSchemamaxItems始终包含的核心字段:
- (字符串)
company_name - (字符串)
website - (字符串,"不超过12个单词")
product_description - (整数,1-10)
icp_fit_score - (字符串,"不超过20个单词的有说服力的一句话")
icp_fit_reasoning
添加适合营销活动的补充字段(融资阶段、员工规模范围、总部所在地、招聘信号等)。在字符串字段的描述中添加长度提示,以保持CSV输出整洁。
用运行输入替代旧手动流程中需手动处理的部分:
- — 描述列表:ICP、地域、阶段以及所需公司数量
query - — 返回的确切结构,用
outputSchema限制companies数组maxItems - — 评分规则、来源偏好、去重/排除强调
systemPrompt - — 需要排除的公司(竞争对手、现有客户、之前运行的结果)
input.exclusion - — 默认
effort;对于大型或难以获取的列表,使用"low"、"auto"或"high""xhigh"
示例:
agent_run {
"query": "Find 100 companies matching this ICP: {icp_description}. Prioritize {sub_verticals}. For each company, score ICP fit 1-10 for {user_company}.",
"effort": "low",
"systemPrompt": "Prefer official company sites and recent funding announcements. Do not include duplicates or subsidiaries of the same parent company.",
"input": {
"exclusion": [
{ "company_name": "{competitor_1}" },
{ "company_name": "{existing_customer_1}" }
]
},
"outputSchema": {
"type": "object",
"properties": {
"companies": {
"type": "array",
"maxItems": 100,
"items": {
"type": "object",
"properties": {
"company_name": { "type": "string" },
"website": { "type": "string", "format": "uri" },
"product_description": { "type": "string", "description": "in 12 words or less" },
"icp_fit_score": { "type": "integer", "description": "1-10" },
"icp_fit_reasoning": { "type": "string", "description": "one-liner in 20 words or less" }
},
"required": ["company_name", "website", "product_description", "icp_fit_score", "icp_fit_reasoning"]
}
}
},
"required": ["companies"]
}
}agent_runstatus: "running"agent_run_...runIdagent_runStep 3: Wait and Read Output
步骤3:等待并读取输出
- If the run is still running, call with its
agent_rununtilrunIdis true or the run reaches a terminal status (outputReadyorfailed).cancelled - Read the companies from , citations from
output.structured, and the run cost fromoutput.groundingin thecostDollarsresult.agent_run
Do not paste the full raw output into the conversation — go straight to CSV.
- 如果任务仍在运行,使用其调用
runId,直到agent_run为true或任务进入终端状态(outputReady或failed)。cancelled - 从结果中读取
agent_run中的公司信息、output.structured中的引用以及output.grounding中的任务成本。costDollars
请勿将完整的原始输出粘贴到对话中——直接生成CSV文件。
Step 4: Write the CSV
步骤4:写入CSV文件
Write to , sorted by descending. Join any array fields with " | ". Use Python's (handles quoting/escaping) via Bash, or Write directly for small lists.
output.structured.companies{target_company}_leads_{YYYY-MM-DD}.csvicp_fit_scorecsv.writerPrint a summary:
undefined将写入,按降序排序。用" | "连接任何数组字段。通过Bash使用Python的(处理引用/转义),或对于小型列表直接使用Write工具。
output.structured.companies{target_company}_leads_{YYYY-MM-DD}.csvicp_fit_scorecsv.writer打印摘要:
undefinedLead Generation Complete
潜在客户生成完成
- Total leads: {count}
- ICP score distribution: 8-10: {N} | 5-7: {N} | 1-4: {N}
- Run ID: {agent_run_id}
- Cost: ${costDollars}
- Output: {filename}
undefined- 总潜在客户数:{count}
- ICP评分分布:8-10分:{N} | 5-7分:{N} | 1-4分:{N}
- 任务ID:{agent_run_id}
- 成本:${costDollars}
- 输出文件:{filename}
undefinedStep 5: Expanding the List
步骤5:扩展列表
If the user wants more leads than one run returned:
- Create a new follow-up run with set to the completed run's ID, asking for additional companies
previousRunId - Put the company records already collected into so the new run avoids them
input.exclusion - Append the new results to the CSV and re-deduplicate by normalized company name (strip "Inc"/"Ltd"/etc., case-insensitive)
For lists in the many hundreds, run a few runs sequentially this way rather than one giant run, and confirm scope with the user first: "This will require ~{N} Agent runs. Proceed?"
如果用户需要比单次任务返回更多的潜在客户:
- 创建新的后续任务,将设置为已完成任务的ID,请求更多公司
previousRunId - 将已收集的公司记录放入,以便新任务避开这些公司
input.exclusion - 将新结果追加到CSV文件,并按标准化公司名称去重(去除"Inc"/"Ltd"等后缀,不区分大小写)
对于数百条规模的列表,建议分几次运行而非一次大型任务,并且先与用户确认范围:"这需要约{N}次Agent运行。是否继续?"
Handling Failures
故障处理
- If a run ends , read the error from the
failedresult, adjust the query or schema, and retry once with different wordingagent_run - If a client cancellation is needed, abort the in-progress call
agent_run - If results are consistently below the requested count, narrow the ICP into 2-3 sub-vertical runs instead of one broad run
- 如果任务以结束,从
failed结果中读取错误信息,调整查询或schema,并用不同措辞重试一次agent_run - 如果需要取消客户端请求,中止正在进行的调用
agent_run - 如果结果持续少于请求数量,将ICP拆分为2-3个细分垂直领域的任务,而非单次宽泛任务
MCP Configuration
MCP配置
Requires an Exa API key. Get yours at https://dashboard.exa.ai/api-keys
json
{
"servers": {
"exa": {
"type": "http",
"url": "https://mcp.exa.ai/mcp?tools=agent_tools",
"headers": {
"x-api-key": "YOUR_EXA_API_KEY"
}
}
}
}需要Exa API密钥。请访问https://dashboard.exa.ai/api-keys获取您的密钥。
json
{
"servers": {
"exa": {
"type": "http",
"url": "https://mcp.exa.ai/mcp?tools=agent_tools",
"headers": {
"x-api-key": "YOUR_EXA_API_KEY"
}
}
}
}References
参考资料
- Exa Agent guide: https://docs.exa.ai/reference/agent-api-guide
- Exa MCP setup: https://docs.exa.ai/reference/exa-mcp
- Websets (verified list-building at scale): https://docs.exa.ai/websets/api/overview
- Full docs for LLMs: https://docs.exa.ai/llms.txt
- Exa Agent指南:https://docs.exa.ai/reference/agent-api-guide
- Exa MCP设置:https://docs.exa.ai/reference/exa-mcp
- Websets(大规模验证列表构建):https://docs.exa.ai/websets/api/overview
- LLMs完整文档:https://docs.exa.ai/llms.txt