CrewVee CRM
Internal ToolFull-Stack B2B CRM with Agentic AI
Overview
CrewVee CRM is a full-stack B2B SaaS CRM I built for internal sales operations. It combines a traditional lead management pipeline with autonomous AI sales agents that qualify leads 24/7 via website chat. The platform supports multi-LLM configurations (Claude, GPT-4o, Gemini, Mistral), RAG-powered knowledge bases, and deep CRM integrations — all deployed on Supabase Edge Functions for near-zero latency.
The Challenge
Sales teams spend hours on repetitive lead qualification, answering the same questions, and manually logging CRM activity. I needed a system where an AI agent handles the top of the funnel autonomously — capturing leads from website visitors, qualifying them through conversation, and syncing the results directly into a CRM pipeline. The architecture had to support multiple LLM providers, custom knowledge bases per agent, and real-time conversation handoff to human staff.
The Solution
Agentic AI Sales Engine
Each agent is fully configurable: system prompt, LLM provider (Claude, GPT-4o, Gemini, Mistral), temperature, max tokens, and conversation history limit. Agents run on Supabase Edge Functions with streaming responses and automatic lead capture via regex extraction of email, phone, name, and company from conversation context.
RAG-Powered Knowledge Base
Documents (PDF, text, website scrape) are chunked and embedded into pgvector. At inference time the agent retrieves the 5 most relevant chunks via semantic search (cosine similarity threshold 0.5) to ground its responses in accurate product/pricing information.
CRM Integrations (OAuth + API key)
Two-mode authentication supports OAuth flows for HubSpot and Pipedrive, and API key auth for Salesforce, Zoho, and ActiveCampaign. Field mappings are configurable per agent, with a full sync log tracking lead_push, deal_create, and activity_log events.
Lead Pipeline & Scoring
Leads flow through a status pipeline: new → contacted → qualified → demo_scheduled → proposal_sent → won/lost. Each lead has a composite ML + manual score, estimated MRR contribution, and a next_action_date for follow-up scheduling.
Key Features
AI Agents
Autonomous inbound sales agents with configurable LLM, prompt, and conversation limits
RAG Knowledge Base
Vector search over uploaded documents and scraped website content
CRM Sync
OAuth + API key integrations with HubSpot, Pipedrive, Salesforce, Zoho, ActiveCampaign
Edge Functions
Streaming AI responses on Supabase Deno edge for near-zero latency
Rate Limiting
Per-visitor 60 msg/hr limit + CORS origin validation at the edge
Pipeline Analytics
Weighted pipeline, MRR tracking, lead scoring, and overdue action alerts
What It Delivers
24/7 AI lead qualification without human intervention on top-of-funnel
Multi-LLM flexibility — switch between Claude, GPT-4o, Gemini per agent
Automatic lead capture from unstructured conversation (zero friction)
5 CRM integrations with configurable field mapping and audit trail
RAG knowledge base with semantic search — agents answer from real product data
Real-time staff takeover: jump into any live conversation mid-session
Package-based feature gating enforced at Edge Function level, not just UI