AI-powered sales discovery agent that generates comprehensive research materials for target companies using the Amp SDK.
Prospector automates sales research by generating 8 detailed markdown files for any target company:
- Account Brief - Company overview, business model, and customer segments
- Organization & Contacts - Key personas, buying committee, and decision-makers
- Tech Stack - Technology infrastructure, job signals, and gaps
- Initiatives & Triggers - Strategic initiatives and timing opportunities
- Competition & Landscape - Competitive positioning and market analysis
- Call Plan & Talk Track - Discovery questions and demo storyline
- Discovery Framework - Structured conversation framework
- Custom Demo - Tailored Amp demo with prospect-specific use cases
- Node.js >= 18.19.0
- AMP_API_KEY - Get yours at ampcode.com/settings/keys
git clone https://github.com/sjarmak/amp-prospector.git
cd amp-prospector
npm installcp .env.example .env
# Edit .env and add your AMP_API_KEYOr set it directly in your shell:
export AMP_API_KEY=sgamp_your_api_key_herenpx tsx ./src/execute-agent.ts "Company name or website"# Research by company name
npx tsx ./src/execute-agent.ts "Shopify"
# Research by domain
npx tsx ./src/execute-agent.ts "stripe.com"
# With debug logging
DEBUG=1 npx tsx ./src/execute-agent.ts "Databricks"Discovery files are written to ./discovery/<company-slug>/:
discovery/
└── shopify/
├── 01_account_brief.md
├── 02_org_and_contacts.md
├── 03_tech_stack.md
├── 04_initiatives_and_triggers.md
├── 05_competition_and_landscape.md
├── 06_call_plan_and_talk_track.md
├── 07_discovery_framework.md
└── 08_custom_demo.md
All files include YAML frontmatter with metadata and structured content with citations.
Prospector uses the Amp SDK to orchestrate three phases:
- Uses
web_searchandread_web_pagetools via Amp SDK - Gathers company information, recent initiatives, and tech signals
- Researches Amp capabilities from official documentation
- Produces a structured JSON research bundle
- Processes research data through Amp SDK
- Generates 8 comprehensive markdown files
- Includes prospect-specific insights and recommendations
- Validates output structure and completeness
- Validates YAML frontmatter in all files
- Writes files to
./discovery/<company-slug>/ - Ensures all 8 required files are present
AMP_API_KEY(required) - Your Amp API keyDEBUG=1(optional) - Enable verbose logging
You can customize the research by modifying the ProspectorInput type in src/types.ts:
{
company: string // Required: Company name or domain
domains?: string[] // Optional: Additional domains to research
contacts?: string[] // Optional: Specific contacts to research
personas?: string[] // Optional: Target personas (default: engineering leadership)
objectives?: string[] // Optional: Sales objectives
timeframe?: string // Optional: Research timeframe (default: "last 12 months")
outDir?: string // Optional: Custom output directory
}src/
├── execute-agent.ts # CLI entry point
├── orchestrator.ts # Three-phase coordinator
├── types.ts # TypeScript interfaces
├── writeFiles.ts # File writing and validation
├── research/
│ └── research.ts # Research phase using Amp SDK
├── generate/
│ └── generate.ts # Generation phase using Amp SDK
└── prompts/
├── systemProspector.ts # System prompt for research quality
├── researchPrompt.ts # Research phase instructions
└── generationPrompt.ts # Generation phase instructions
Error: AMP_API_KEY environment variable is required
Solution: Create a .env file with your API key or export it:
export AMP_API_KEY=sgamp_your_key_hereError: Expected exactly 8 files, got X
Solution: The AI generation failed. Check your API key and try again. Enable DEBUG=1 for more details.
Error: File X is missing YAML frontmatter
Solution: The generated file format is incorrect. This is rare but can happen. Try running again.
The agent makes multiple web searches and page reads. If you hit rate limits:
- Wait a few minutes and retry
- Check your Amp account for usage limits at ampcode.com/settings
The agent follows the pattern from amp-sample-jira-agent, using:
- Amp SDK for AI orchestration and tool access
- tsx for direct TypeScript execution (no build step)
- dotenv for environment configuration
# Install dependencies
npm install
# Run with debug logging
DEBUG=1 npx tsx ./src/execute-agent.ts "Test Company"
# Format and lint (if you add these tools)
npm run lint
npm run formatMIT