How xiongqvq/ai_find_customer works
AI Hunter is a B2B prospecting application: users submit a company site, product documents, or keywords and a target market; the backend interprets the input, searches for prospects, extracts lead details, and evaluates whether to continue. The UI also supports queued jobs, email drafting/review, campaigns, sending, and reply detection. The README documents the overall workflow and queue behavior; sampled source and the SOURCE INDEX support the cited internal links, but several runtime integrations are described only at product level.
Main entry points: builder.py Hunt graph · llm_client.py LLM client · routes.py Hunt routes · app.py FastAPI API
Components 30
User interface
- React frontend
frontend/src/api/client.ts
Lead discovery
- Hunt routes
backend/api/routes.py - Input parsing
backend/agents/parse_description_agent.py - Hunt graph
backend/graph/builder.py - Company insight
backend/agents/insight_agent.py - Keyword generation
backend/agents/keyword_gen_agent.py - Prospect search
backend/agents/search_agent.py - Lead extraction
backend/agents/lead_extract_agent.py - Round evaluation
backend/graph/evaluate.py - Search channels
backend/tools/google_maps_search.py
Job automation
- Automation routes
backend/api/automation_routes.py - Persistent job queue
backend/automation/job_queue.py - Operations metrics
backend/automation/metrics.py
Email operations
- Email drafting
backend/agents/email_craft_agent.py - Email routes
backend/api/email_routes.py - Email state store
backend/emailing/store.py - Email scheduler
backend/emailing/scheduler.py - Reply detection
backend/emailing/reply_detector.py
Shared platform
- FastAPI API
backend/api/app.py - LLM client
backend/tools/llm_client.py - LLM output validation
backend/tools/llm_output.py - Cost tracking
backend/observability/cost_tracker.py - Hunt persistence
backend/api/hunt_store.py - Progress stream
backend/api/sse.py - Settings API
backend/api/settings_routes.py - Settings persistence
backend/config/settings_store.py
Other components
- User
- SMTP / IMAP
- Search providers
- Model providers
Connections 35
- User → React frontend: submits tasks
README.md - React frontend → FastAPI API: calls API
README.md - FastAPI API → Hunt routes: routes requests
backend/api/app.py - Hunt routes → Input parsing: parses input
backend/api/routes.py - Hunt routes → Hunt graph: runs hunt
backend/api/routes.py - Hunt graph → Company insight: runs stage
README.md - Hunt graph → Keyword generation: runs stage
README.md - Hunt graph → Prospect search: runs stage
README.md - Hunt graph → Lead extraction: runs stage
README.md - Hunt graph → Round evaluation: runs stage
README.md - Hunt graph → Email drafting: runs optional stage
README.md - Prospect search → Search channels: queries channels
backend/agents/search_agent.py - Search channels → Search providers: searches providers
README.md - Company insight → LLM client: uses model
README.md - Keyword generation → LLM client: uses model
README.md - Lead extraction → LLM client: uses model
backend/agents/lead_extract_agent.py - Email drafting → LLM client: uses model
backend/agents/email_craft_agent.py - LLM client → Model providers: invokes provider
backend/tools/llm_client.py - LLM client → Cost tracking: records usage
backend/tools/llm_client.py - Email drafting → LLM output validation: validates output
backend/agents/email_craft_agent.py - Hunt routes → Hunt persistence: saves hunts
backend/api/routes.py - Hunt routes → Progress stream: publishes progress
backend/api/routes.py - FastAPI API → Automation routes: routes requests
backend/api/app.py - Automation routes → Persistent job queue: manages jobs
backend/api/automation_routes.py - Operations metrics → Persistent job queue: reads job state
backend/automation/metrics.py - FastAPI API → Email routes: routes requests
backend/api/app.py - Email routes → Email state store: reads and writes
backend/api/email_routes.py - Email routes → Email scheduler: runs scheduler
backend/api/email_routes.py - Email routes → Reply detection: checks replies
backend/api/email_routes.py - Email scheduler → Email state store: loads campaign state
backend/emailing/scheduler.py - Email scheduler → SMTP / IMAP: sends messages
README.md - Reply detection → SMTP / IMAP: checks mailbox
README.md - FastAPI API → Settings API: routes settings
backend/api/app.py - Settings API → Settings persistence: persists settings
backend/api/settings_routes.py - Settings API → SMTP / IMAP: tests connectivity
backend/api/settings_routes.py