generalai-agent

How SpeedMVPs Built an AI SDR Sales Development Agent: B2B SaaS AI-Agent Case Study

Sales development is a volume game with a quality problem. SDRs spend the majority of their time on research, personalisation, and sequencing tasks that are repetitive but require enough contextual judgment to resist naive automation. An AI SDR agent that researches prospects, generates personalised outreach, manages follow-up sequences, books meetings, and syncs all activity to CRM changes the unit economics of outbound sales without removing the human judgment needed to close. SpeedMVPs built an AI SDR sales development agent for a B2B SaaS client using Next.js, Supabase, OpenAI GPT-4o, Vercel, HubSpot API, and LangChain. The agent handles prospect research and personalised email generation, manages a configurable multi-touch sequence, books meetings via calendar integration, and logs all activity to HubSpot automatically. Delivered in under three weeks at a fixed price from GBP 8,000, with full code ownership transferred. UK B2B SaaS founders running outbound email campaigns must ensure their sending practices comply with UK GDPR and PECR, which require a legitimate interests basis for B2B cold outreach, a one-click unsubscribe mechanism on every email, and prompt suppression list processing for opt-outs. Founders who skip this compliance layer frequently find that their sending domain is blacklisted or their ICO registration is challenged before they have achieved meaningful pipeline. SpeedMVPs has delivered AI SDR agents for UK B2B SaaS teams where the GDPR legitimate interests assessment, unsubscribe processing, and suppression list integration are built into the agent architecture from the first sending day.

Tech Stack

Next.jsSupabaseOpenAI GPT-4oVercelHubSpot APILangChain

Project Overview and Business Context

The client was a B2B SaaS company selling workflow automation software to operations teams at mid-market UK businesses. Their outbound sales process relied on two SDRs who spent 60-70% of their time on research and email writing, with only 30-40% on calls and relationship-building. The brief was to build an AI SDR agent that handled the research and writing layer so that the SDRs could focus on calls, responses, and pipeline management. The agent needed to: import prospect lists (from LinkedIn, CSV, or HubSpot contact exports), research each prospect's company using publicly available information (company website, LinkedIn profile, recent news), generate a personalised first-touch email for each prospect that referenced specific relevant context, manage a four-touch email sequence over 14 days, detect replies and route them to the SDR for human response, book meetings via calendar link when prospects expressed interest, and sync all contact activity, email sends, opens, clicks, and replies to HubSpot. UK GDPR compliance for B2B outreach requires a legitimate interests basis, a clear unsubscribe mechanism on every email, and a suppression list process for contacts who have opted out. These requirements shaped the agent's compliance layer: every email includes a GDPR-compliant unsubscribe footer, unsubscribes are processed within 24 hours, and the suppression list is checked before every send.

Technical Architecture and Stack Decisions

The agent is built as a Next.js application with Supabase for prospect data, sequence state, and email logs, deployed on Vercel. LangChain orchestrates the multi-step research and generation workflow. The prospect research pipeline runs when a new prospect is imported. It uses a LangChain agent with two tools: a company website scraper (Puppeteer-based, fetching the homepage and About/Product pages) and a web search tool (Bing Search API) that retrieves recent news mentions and LinkedIn data for the company. The research agent is orchestrated by GPT-4o, which decides which tools to call based on the prospect's company name and the information retrieved so far, then synthesises the research output into a structured company summary: industry, company size estimate, product category, recent news or milestones, and relevant context for the client's value proposition. GPT-4o then generates the personalised first-touch email using the company summary and a system prompt encoding the client's ICP (ideal customer profile), value proposition, and email style guide. The sequence engine is a cron job that runs every two hours, checks Supabase for prospects due for their next touch, and sends the appropriate sequence email (touches 2-4 are templatised with light personalisation tokens). Replies are detected via the email provider webhook (SendGrid), which routes incoming replies to Supabase. The agent classifies reply intent (interested, not interested, out of office, unsubscribe) and notifies the assigned SDR for human responses on interested or ambiguous replies. HubSpot API integration syncs contact records, email activity logs, and meeting bookings in real time.

Key AI and ML Components

GPT-4o powers two critical tasks. Prospect research synthesis: the LangChain agent orchestrates tool calls to gather company information, and GPT-4o synthesises the retrieved information into the structured company summary used for personalisation. The quality of this synthesis directly determines the quality of the personalised email, as generic research produces generic emails. The system prompt for research synthesis instructs GPT-4o to prioritise specific, recent, and differentiating company facts over generic industry descriptions. Email generation: GPT-4o receives the company summary, the prospect's role and name, the client's value proposition, and the email style guide, and generates a personalised first-touch email. The style guide encodes sentence length (short), opening line style (no questions, no compliments, start with a specific observation), and the call-to-action format (a specific open-ended question, not a meeting request in the first email). LangChain manages the multi-step research workflow, handling tool call orchestration, retry logic on tool failures, and result aggregation. Reply intent classification uses a lightweight GPT-4o call with a few-shot classification prompt: given the reply text, classify as interested, not interested, out of office, unsubscribe, or ambiguous. This classification drives automated routing without requiring SDR review of every reply.

Challenges Solved and How

Prospect research quality varies significantly based on company website quality and public presence. For well-documented companies with informative websites, the research synthesis produces specific, useful personalisation context. For companies with sparse websites, the research output is generic and the personalisation quality falls. The system handles this with a confidence score on the research output: if the scraper and search tools return fewer than three specific, differentiating facts about the company, the prospect is flagged for manual SDR research before email generation, rather than sending a weakly personalised email that reads as generic despite the AI effort. Email sending reputation is critical for outbound sales. High-volume AI-generated email outreach can damage sending domain reputation if email quality or deliverability is not managed carefully. The build uses a warmed sending domain, SPF, DKIM, and DMARC records, SendGrid infrastructure with engagement-based sending, and a daily send volume cap calibrated to the domain's reputation score. GDPR unsubscribe processing was tested extensively: every unsubscribe link generates a one-click opt-out to Supabase, the suppression list is checked synchronously before every send, and unsubscribes are synced to HubSpot within the 24-hour window required by UK GDPR for timely processing.

Outcome and Measurable Results

The client deployed the AI SDR agent for a 12-week live period with two SDRs actively reviewing and managing the agent's output. SDR research and email writing time fell from an average of 6 hours per day to 1.5 hours per day per SDR, with the freed time reallocated to calls and follow-up conversations. Personalised first-touch email open rates were 38% (versus an industry average of 21-28% for cold outreach in this segment) and reply rates were 6.4% (versus a typical 2-4% baseline for manual cold email). The agent booked 23 qualified meetings over the 12-week period from a prospect list of 840 contacts, a meeting booking rate of 2.7%, significantly above the 1.1% rate the two SDRs had achieved manually in the prior quarter on equivalent prospect lists. HubSpot data quality improved as a side effect: every email send, open, and click was logged automatically rather than relying on SDR diligence.

Lessons for Similar Projects

Personalisation quality is the single most important variable in AI outbound. A well-researched, specifically relevant email from an AI agent outperforms a generic email from a human. An AI email that is generic is worse than a human email that is generic because it reads as obviously automated. Invest the build effort in the research synthesis layer. Build a compliance layer from day one, not as a post-launch addition. UK GDPR requirements for B2B email outreach (legitimate interests assessment, unsubscribe processing, suppression list management) are not optional. Retrofitting compliance to a live outbound system that has already been sending is expensive and creates regulatory risk. Keep humans in the loop for reply handling. Automated response to sales replies is a fast path to poor prospect relationships and wasted pipeline. The agent classifies intent and routes to humans; it does not attempt to continue the conversation autonomously. This is the right boundary for an AI SDR in the current landscape.

Frequently Asked Questions

Is AI-generated B2B cold email legal under UK GDPR?+

Yes, with the correct legal basis. B2B cold email in the UK uses legitimate interests as the lawful basis under UK GDPR, combined with compliance with PECR for electronic marketing. Requirements include: a legitimate interests assessment demonstrating that the outreach is relevant to the recipient's professional role, a clear unsubscribe mechanism on every email, prompt processing of unsubscribe requests, and a suppression list to prevent re-contacting opted-out contacts. SpeedMVPs builds all of these requirements into the agent's compliance layer.

How does the agent personalise emails at scale without sounding generic?+

The research pipeline retrieves specific, recent, differentiating facts about each prospect's company from their website and public web sources. GPT-4o synthesises this into a company summary and generates a first-touch email that references specific company context: a recent product launch, a stated company challenge, a technology they use, or a market they serve. The system only sends high-confidence personalised emails; low-confidence research outputs are flagged for SDR review rather than generating a generic email that reads as AI-produced.

Can the AI agent respond to prospect replies automatically?+

No, and this is a deliberate design choice. The agent classifies reply intent (interested, not interested, out of office, unsubscribe) and routes interested or ambiguous replies to the SDR for human response. Autonomous AI responses to sales prospects carry significant relationship risk: a misclassified reply handled automatically can destroy a promising lead. Human SDRs remain responsible for all two-way conversation. The agent handles the outbound initiation layer only.

Which CRM systems does the agent integrate with?+

The MVP is built with HubSpot integration. Salesforce, Pipedrive, and Zoho CRM integrations are available as configured extensions using their respective REST APIs. CRM integration syncs contact records, email activity (sends, opens, clicks, replies), and meeting bookings. SpeedMVPs builds the integration layer as part of the project and documents the API endpoints so the client can extend the integration to additional CRM fields without further development work.

How long does it take to set up and start sending?+

From kickoff to first live email send is typically 2-3 weeks. The timeline includes the agent build, email domain configuration and warming (SPF, DKIM, DMARC, sending reputation warm-up), HubSpot integration, and a calibration period where the client reviews and approves AI-generated email drafts before enabling automatic sending. The sending volume warm-up period can run concurrently with the technical build.

Building something similar? Get a free consultation at speedmvps.co.uk

Get a Free Quote