lead-agent  by vercel-labs

AI-powered lead qualification and research agent

Created 10 months ago
251 stars

Top 99.8% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a reference architecture for an inbound lead qualification and research agent, built with Next.js, Vercel AI SDK, and Workflow DevKit. It automates the process of capturing leads from a contact form, conducting deep research, qualifying them using AI, drafting personalized emails, and routing them for human approval via Slack before sending. This solution is ideal for sales teams and organizations looking to streamline their lead management pipeline, improving efficiency and response times.

How It Works

The system utilizes a serverless architecture orchestrated by Vercel's Workflow DevKit for durable background tasks. Upon form submission, a workflow is initiated. An AI SDK Agent performs comprehensive web research on the lead. Subsequently, Vercel AI SDK's generateObject categorizes the lead (e.g., QUALIFIED, FOLLOW_UP) with reasoning, and generateText drafts a personalized email. The draft is then sent to Slack for human review and approval using Slack's Bolt framework and Vercel's adapter, ensuring human oversight before final dispatch.

Quick Start & Requirements

  • Primary install: Clone the repository (git clone https://github.com/vercel-labs/lead-agent.git), navigate into the directory (cd lead-agent), and install dependencies (pnpm install).
  • Prerequisites: Node.js 20+, pnpm (recommended), a Slack workspace with bot token and signing secret, Vercel AI Gateway API Key, and Exa API Key. Configure these in a .env.local file.
  • Run: Execute pnpm dev to start the development server. Access the application at http://localhost:3000.
  • Links: Official documentation for Slack app creation is referenced.

Highlighted Details

  • Durable workflow execution managed by Workflow DevKit.
  • AI-powered lead qualification with generated reasoning, customizable via qualificationCategorySchema.
  • Autonomous research agent built with the AI SDK Agent class, allowing for custom tools and prompt tuning.
  • Human-in-the-loop email approval process integrated with Slack's Block Kit for intuitive review.

Maintenance & Community

No specific details regarding maintainers, community channels (like Discord/Slack), sponsorships, or roadmap are provided in the README.

Licensing & Compatibility

  • License: MIT.
  • Compatibility: The MIT license permits broad use, including commercial applications and integration with closed-source systems.

Limitations & Caveats

This project is presented as a reference architecture and requires significant customization. Users must fill in placeholder functions in lib/services.ts for core business logic, such as custom knowledge base searches. It also necessitates obtaining and configuring API keys for Vercel AI Gateway, Exa.ai, and setting up a Slack application.

Health Check
Last Commit

6 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
0 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.