I Built an AI Agent That Talks to My Website Visitors So I Don't Have to Miss Leads Anymore

Published: (March 5, 2026 at 08:12 AM EST)
6 min read
Source: Dev.to

Source: Dev.to

A Conversational Lead‑Capture Agent for My Freelance Site

There’s a specific type of frustration I kept running into as a freelance developer. Someone would land on my site, browse around for a few minutes, and then leave—no message, no inquiry, nothing. I’d never know what they wanted or if they were even close to reaching out.

The visitors who did reach out were great, but I started thinking about the ones who didn’t. Some people genuinely don’t like filling out contact forms; they feel formal, one‑sided, a bit awkward. It’s essentially writing a cold email to someone whose work you just discovered. A lot of potential clients bounce instead of enduring that friction.

So I started thinking about what the middle ground looks like: something between “browse silently and leave” and “fill out a form and wait.” That middle ground turned out to be a conversation.

The Idea

I wanted to build something that could talk to visitors the way I would if I were sitting right there with them—answering questions naturally, telling them about what I do, how I work, and what kinds of projects I take on. Not in a scripted, button‑clicking chatbot way, but in an actual back‑and‑forth exchange.

If, at some point in that conversation, the visitor shows genuine interest in working together, the agent would smoothly ask for their contact details, put together a description of what they’re looking for, and send it straight to me. No forms. No friction. Just a conversation that ends with a qualified lead in my inbox.

Try it yourself: iamtaqi.site (live on the site right now)

The key thing I was careful about from the start: the agent should never push.

  • If someone just has a general question, it answers it.
  • If someone wants to know how I approach a certain type of project, it tells them.
  • It only asks for contact info when the person themselves signals they want to move forward.

That distinction mattered a lot to me.

How I Built It

The stack I used was LangChain and LangGraph on the backend, with a RAG pipeline powering the knowledge base.

The RAG layer

RAG stands for Retrieval‑Augmented Generation. Instead of the AI making things up or relying solely on its general training data, it first retrieves real information from a specific knowledge base before forming a response.

In my case the knowledge base contains everything about me and my work: services, process, past projects, tech stack, client‑relationship approach, turnaround times, etc.

When a visitor asks something like “Do you work with React?” or “Have you built anything with AI before?”, the agent doesn’t guess. It pulls the relevant context from the knowledge base and builds its answer from that, ensuring responses are accurate, grounded, and truly reflective of what I do.

LangGraph

LangGraph handles the conversation flow. Think of it as the brain that decides what state the conversation is in and what should happen next:

  • Is the visitor still in discovery mode?
  • Are they asking something the knowledge base can answer?
  • Have they expressed enough interest to warrant asking for contact details?

LangGraph manages all of this through a graph of nodes and conditional edges, so the agent always knows where it is in the conversation and what the right next move is.

LangChain

LangChain sits underneath everything, handling:

  • Language‑model interactions
  • Prompt construction
  • Memory that lets the agent remember earlier parts of the conversation

End‑to‑end flow

  1. Visitor sends a message
  2. Agent retrieves relevant context from the knowledge base via semantic search
  3. Agent constructs a natural, on‑brand response
  4. Based on the conversation state, the agent either:
    • Answers the question
    • Asks a follow‑up
    • Gently transitions to collecting contact info if the visitor seems interested

When it does collect contact info, it also generates a short project brief based on everything discussed. By the time I receive the notification, I already have the person’s name, contact details, and a summary of what they’re looking for, allowing me to reply with full context from the first message.

What It Changed

  • No more lost warm leads – Visitors who would have bounced after a minute now have a reason to stay and engage.
  • Higher‑quality inquiries – Because the conversation is low‑pressure and genuinely helpful, the people who do reach out have already talked through their project, know what I do, and have self‑selected.
  • Instant credibility – If a visitor wonders whether I’m serious about AI development, they can have a sophisticated, AI‑focused conversation right on the page, which answers that question effectively.
  • Reduced repetitive email work – Common questions about tech stack, availability, or industry experience are handled by the agent, so when someone reaches me directly we’re already past the intro stage.

What I’d Do Differently

  1. Invest more time upfront in structuring the knowledge base.
    The quality of RAG retrieval is directly tied to how well the source documents are written and organized. Early on I had a few off‑target responses because the relevant information was buried in a long document and the retrieval wasn’t surfacing it cleanly. Writing focused, well‑structured knowledge documents made a significant difference.

  2. Build in more analytics from day one.
    Track conversation metrics, conversion rates, and retrieval performance from the start so you can iterate quickly. (The original post was cut off here, but the core idea is to have a robust analytics framework in place.)


Conversation Insights

  • Conversations that converted into leads – I’d like better visibility into the questions the agent couldn’t fully answer. Those unanswered queries are valuable product feedback when examined closely.

Closing Thought

This project began with a simple observation: people don’t always want to fill out a form, but that doesn’t mean they don’t want to connect. Replacing a form with a conversation removed a friction point I hadn’t realized was costing me leads.

If you’re a freelancer or run a small agency and have ever wondered how many visitors leave your site without reaching out, this is worth considering. The technology to build something like this is genuinely accessible now, and the ROI of not missing a single interested visitor adds up quickly.

Feel free to ask any questions about the build in the comments. Want to see it in action? Head over to iamtaqi.site and start a conversation.

0 views
Back to Blog

Related posts

Read more »

The problem with dialogue datasets

The Problem with Dialogue Datasets Most dialogue datasets used to train and evaluate language models contain only text: a speaker label, a message, and sometim...