The inspiration for LeadPilot AI came from watching the daily grind of modern sales. Sales Development Representatives often spend more than half their day on manual tasks—scraping lead data, drafting repetitive emails, and trying to stay on top of follow-ups. I wanted to build a system where the AI wasn't just a writing assistant, but a fully authorized agent capable of managing the entire top-of-funnel process autonomously.
The project was built with a focus on reliability and secure identity delegation. For the intelligence layer, I used Google Gemini 1.5 Flash to handle three critical stages:
- Discovering high-potential leads from broad descriptions.
- Crafting hyper-personalized outreach that goes beyond simple templates.
- Analyzing incoming replies to categorize lead intent.
The technical backbone relies on Node.js and Express for the API, with a distributed job queue managed by BullMQ and Redis. This architecture was essential to ensure that background tasks, like scheduled follow-ups, continue to run even if the main server restarts. To handle the "Authorized to Act" requirement of the hackathon, I integrated Auth0 with Google OAuth2. By utilizing the Auth0 Management API, the backend can securely refresh tokens and act on behalf of the user 24/7 without requiring them to stay logged in. I also implemented Fine-Grained Authorization to ensure each agent only has access to its own specific data and lead history.
To measure the impact of this automation, I modeled the efficiency gain \(E\) compared to manual outreach. If \(N\) is the number of leads, \(C_{SDR}\) is the hourly cost of a manual rep, \(T_{SDR}\) is the manual time per lead, and \(C_{AI}\) is the total infrastructure cost per lead, the efficiency multiplier is calculated as:
$$E = \frac{T_{SDR} \times C_{SDR}}{C_{AI}}$$
Using real-world estimates where \(T_{SDR} = 0.25\) hours, \(C_{SDR} = 30\), and \(C_{AI} = 0.01\):
$$E = \frac{0.25 \times 30}{0.01} = 750$$
This represents a 750x improvement in processing capacity, allowing a small team to maintain the output of a much larger sales department.
The development process wasn't without hurdles. Managing the "offline" state for Gmail API was a significant challenge that required a deep dive into Auth0's session persistence. I also spent a lot of time on prompt engineering to ensure the AI's tone was professional and curious rather than sounding like automated spam. One of the most valuable lessons I learned was the importance of the Model Context Protocol (MCP). Implementing an MCP server allowed me to standardize how LeadPilot's tools interact with other AI systems, making the project more extensible.
Moving forward, I plan to expand LeadPilot’s reach by integrating with LinkedIn and CRM platforms like Salesforce. The goal is to create a truly closed-loop autonomous sales environment where the AI handles the logistics, leaving the human team to focus entirely on closing deals.
Built With
- auth0
- bullmq
- css3
- express.js
- fga
- gemini
- html5
- ioredis
- javascript
- mcp
- mongodb
- node.js
- react
- redis
- render
- vercel
- vite
Log in or sign up for Devpost to join the conversation.