# Lead generation with exa agent Human Guide

## What This Is For
Generate enriched lead lists using Exa Agent. It gives the agent a clearer input/output frame for paid media: what context to ask for, what decisions to make, and what usable artifact to return.

Use this as a human-readable version of the Lead generation with exa agent agent skill. It is meant for marketers, operators, founders, and other non-coders who want the workflow without reading agent-specific implementation instructions.

## When To Use This
- Use this when you need a repeatable process for lead generation with exa agent.
- Use this when the task needs judgment, examples, constraints, or a clear output format rather than a one-off prompt.
- Use this when you want to hand an AI assistant enough context to produce a usable marketing artifact.

## When Not To Use This
- Do not use this when you only need a quick factual answer.
- Do not use this when the work depends on private data you cannot share with the assistant.
- Do not use this as a replacement for legal, compliance, financial, or medical review.

## What You Need Before Starting
- The goal or business outcome you want.
- The audience, customer segment, or market context.
- Any source material the assistant should respect, such as notes, briefs, examples, URLs, or brand guidance.
- Constraints such as tone, length, channel, deadline, region, or approval requirements.
- A clear definition of what a good final answer should look like.

## Step-By-Step Workflow
1. State the job clearly: "Use the Lead generation with exa agent guide to help me with..."
2. Add context: audience, goal, offer, channel, source material, and constraints.
3. Ask the assistant to identify missing inputs before producing the final output.
4. Have the assistant follow the skill-specific guidance below.
5. Review the result against the final checklist and ask for revisions where needed.

## Skill-Specific Guidance
- 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?
- `product_description` (string, "in 12 words or less")
- `icp_fit_score` (integer, 1-10)
- `icp_fit_reasoning` (string, "compelling one-liner in 20 words or less")
- `query` — describe the list: the ICP, geography, stage, and how many companies you want
- `outputSchema` — the exact structure back, with `maxItems` bounding the companies array
- `systemPrompt` — scoring rules, source preferences, dedup/exclusion emphasis
- `input.exclusion` — companies to avoid (competitors, existing customers, results from earlier runs)
- `effort` — `"low"` by default; `"auto"`, `"high"`, or `"xhigh"` for large or hard lists

## Decision Points And Nuance
The original skill emphasizes: Prerequisites, Tool Restriction, Workflow, Step 1: Understand the ICP, Step 2: Create the Lead-Gen Run, Step 3: Wait and Read Output, Step 4: Write the CSV, Lead Generation Complete, Step 5: Expanding the List, Handling Failures.

Use these questions to steer the work:
- What is the intended audience or buyer?
- What source material must be preserved?
- What should the assistant optimize for: clarity, persuasion, accuracy, speed, creativity, or conversion?
- What examples represent the desired quality bar?
- What should the assistant avoid?

## Common Mistakes
- Use `agent_run`, plus Write and Bash (for CSV output). Do NOT use generic web search for the lead list itself.
- "required": ["company_description", "icp_description", "sub_verticals", "useful_enrichments"]
- `input.exclusion` — companies to avoid (competitors, existing customers, results from earlier runs)
- "systemPrompt": "Prefer official company sites and recent funding announcements. Do not include duplicates or subsidiaries of the same parent company.",
- "required": ["company_name", "website", "product_description", "icp_fit_score", "icp_fit_reasoning"]
- "required": ["companies"]
- Do not paste the full raw output into the conversation — go straight to CSV.
- Put the company records already collected into `input.exclusion` so the new run avoids them

## Copy-And-Paste Prompt
```text
Use the Lead generation with exa agent human guide.

My goal:
[Describe the business outcome]

Audience:
[Describe who this is for]

Context and source material:
[Paste notes, examples, links, or existing copy]

Constraints:
[Tone, length, channel, timeline, must-include items, must-avoid items]

Before producing the final output, ask me for any missing information that would materially improve the result.
```

## Final Checklist
- [ ] The output matches the original goal.
- [ ] The audience and context are reflected in the answer.
- [ ] Important constraints and source material were preserved.
- [ ] The assistant made the relevant decisions explicit.
- [ ] The final artifact is ready to use, review, or hand to the next person.

## Source
This guide was generated from the exa-labs/agent-skills skill entry for `lead-generation`.

## Source Skill Notes
These notes preserve the nuance from the original skill. Use them as supporting reference when the workflow above feels too generic.

# Lead Generation with 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

## Prerequisites

This skill requires the Exa MCP server with the Agent tool enabled. Use the `agent_tools` URL selection alias to enable `agent_run`.

If 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.

## Tool Restriction

Use `agent_run`, plus Write and Bash (for CSV output). Do NOT use generic web search for the lead list itself.

## Workflow

```
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)
```

## Step 1: Understand the 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?

## Step 2: Create the Lead-Gen Run

Design an `outputSchema` with a bounded `companies` array. Keep schemas small, flat, and explicit; always bound arrays with `maxItems`.

**Core fields to always include:**

- `company_name` (string)
- `website` (string)
- `product_description` (string, "in 12 words or less")
- `icp_fit_score` (integer, 1-10)
- `icp_fit_reasoning` (string, "compelling one-liner in 20 words or less")

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:

- `query` — describe the list: the ICP, geography, stage, and how many companies you want
- `outputSchema` — the exact structure back, with `maxItems` bounding the companies array
- `systemPrompt` — scoring rules, source preferences, dedup/exclusion emphasis
- `input.exclusion` — companies to avoid (competitors, existing customers, results from earlier runs)
