AI-powered lead qualification chatbot. Conversational AI that qualifies, scores, and routes leads to your CRM via webhooks.
Claude API | Make.com / n8n integration | CRM routing | Slack alerts
- Conversational Lead Qualification — AI agent asks qualifying questions naturally, not as a form
- Configurable Scoring Rules — Define your own scoring weights and thresholds in
config/scoring.json - Webhook Integration — Forward qualified leads to Make.com, n8n, or Zapier workflows
- CRM Routing — Automatically create contacts in HubSpot, Salesforce, or any CRM via webhooks
- Slack/Teams Notifications — Instant alerts when a HOT lead comes in
- Lead Scoring Dashboard — Real-time dashboard showing all leads, scores, and activity feed
- Video Avatar Mode — Optional real-time video avatar with voice (via Anam AI)
- Streaming Responses — Claude API streaming for instant, natural-feeling conversation
graph LR
A[User Chat] --> B[Claude API]
B --> C[Scoring Engine]
C --> D[Webhook]
D --> E[CRM]
D --> F[Slack Notification]
C --> G[Dashboard]
Flow:
- User starts a conversation via text chat or video avatar
- Claude API handles the conversation using your custom system prompt
- After sufficient qualifying data is collected, the scoring engine extracts and scores the lead
- Scored lead is forwarded via webhook to your automation platform
- CRM contact is created and sales team is notified
git clone https://github.com/your-username/lead-intelligence-bot.git
cd lead-intelligence-bot
npm installcp .env.example .env.localEdit .env.local with your API keys:
ANTHROPIC_API_KEY=sk-ant-api03-your-key-hereEdit the configuration files in config/:
config/questions.json— Qualifying questions your bot asksconfig/scoring.json— Scoring weights and thresholdsconfig/webhooks.json— Webhook endpoints
npm run devOpen http://localhost:3000 to see the landing page. Open http://localhost:3000/dashboard to see the lead dashboard.
npx vercelOr deploy to any platform that supports Next.js (Vercel, Railway, Netlify, etc.)
Edit src/lib/system-prompt.ts to customize the AI agent's personality, knowledge base, and conversation flow. The default prompt follows a 4-phase structure:
- Rapport — Greet and build trust
- Qualify — Ask qualifying questions one at a time
- Recommend — Summarize and recommend next step
- Capture — Collect name and email
Edit config/questions.json to define what your bot asks:
{
"questions": [
{
"id": "challenge",
"question": "What's your primary business challenge?",
"weight": 2
}
]
}Edit config/scoring.json to tune lead scoring:
{
"thresholds": { "hot": 8, "warm": 5, "cold": 1 },
"weights": {
"budget_match": 3,
"timeline_urgency": 2,
"pain_point_clarity": 2
}
}See docs/webhooks.md for setup guides for Make.com, n8n, and Zapier.
| Technology | Purpose |
|---|---|
| Next.js 16 | Full-stack React framework |
| Claude API | Conversational AI (streaming) |
| Upstash Redis | Serverless lead storage |
| Anam AI | Video avatar (optional) |
| Make.com / n8n | Workflow automation |
| HubSpot | CRM integration |
| Slack API | Team notifications |
| Tailwind CSS | Styling |
| Vercel | Deployment |
src/
├── app/
│ ├── page.tsx # Landing page with demo
│ ├── dashboard/page.tsx # Lead scoring dashboard
│ └── api/
│ ├── chat/route.ts # Claude streaming chat endpoint
│ ├── extract-lead/ # Lead extraction & scoring
│ ├── leads/ # Lead retrieval endpoint
│ └── anam-session/ # Video avatar session
├── components/
│ ├── chat-widget.tsx # Text chat interface
│ ├── demo-section.tsx # Demo mode selector
│ └── anam-avatar.tsx # Video avatar interface
└── lib/
├── system-prompt.ts # AI agent system prompt
└── leads-store.ts # Lead storage (Redis/memory)
MIT License. See LICENSE for details.