Home Insights How We Built an AI Agent That Knows Our Entire Business — And What We Learned
Artificial Intelligence

How We Built an AI Agent That Knows Our Entire Business — And What We Learned

Sunil Sethi
Sunil Sethi
Leader & AI Specialist
· 21 min

The honest story of building the Entexis AI assistant — from a basic FAQ bot to a production agent with page awareness, guardrails, lead capture, and conversation intelligence. What worked, what failed, and what we would do differently.

Artificial Intelligence Solutions
Looking for a artificial intelligence partner?
We build domain-led systems tailored to your industry and workflow. 12 years. 2,100+ engagements.
Get in Touch →
Related Insights
Why Every Customer Support Team Should Implement AI in 2026 — 8 Ways AI Transforms Support Operations Why Small E-Commerce Stores Should Use AI in 2026: 8 Use Cases That Grow Your Sales Why Most Businesses Pick the Wrong AI Implementation Partner — And the Questions That Reveal the Right One in 2026

We Built It Because Nobody Else Would Tell the Truth

Every AI development company talks about building intelligent agents. Very few show you one running on their own website. Even fewer tell you what actually went into building it — the failures, the iterations, the decisions that seemed smart at the time and turned out to be wrong.

So here is the full story. The Entexis AI assistant — the chatbot you can open right now in the bottom-right corner of this page — took four major iterations to get to where it is today. It started as a weekend experiment and became one of the most valuable tools on our website. Not because the technology is impressive (it is, but that is not the point) — but because it taught us things about our visitors that two years of Google Analytics never did.

This is not a marketing case study. This is a build log. What we tried, what broke, what we changed, and what we learned. If you are thinking about building an AI agent for your business, this will save you months of trial and error.

4
Major iterations from FAQ bot to production agent
271
Knowledge chunks powering every conversation
63
Knowledge sources — from service pages to pricing models
20+
Guardrails preventing off-topic and sensitive responses
Build Timeline
Four Iterations — From Experiment to Production
v1
Basic FAQ Bot
Answered questions.
Did nothing with them.
v2
Knowledge + Lead Capture
Smarter answers.
Too aggressive on leads.
v3
Page Awareness + Links
Context-aware.
Started being useful.
v4
Guardrails + Intelligence
Production-ready.
Still improving weekly.

Version 1: The "Let Us Just Try It" Phase

The first version was embarrassingly simple. We took an off-the-shelf LLM, wrote a system prompt that said "You are the Entexis assistant, answer questions about our services," and pointed it at our website content. It took about a day to set up.

And honestly? It sort of worked. If someone asked "What services does Entexis offer?", it would list our services. If someone asked about case studies, it would mention a few. It was better than having no chatbot at all.

But it had problems that became obvious within the first week:

It hallucinated confidently. Someone asked about our pricing, and it made up numbers. Specific numbers. Plausible-sounding numbers that were completely wrong. This is the nightmare scenario — your own AI telling potential clients incorrect pricing information with full confidence.

It answered anything. Someone asked it to write a poem about the moon. It did. Beautifully. On our API bill. Someone else asked it to help with their Python homework. It obliged. We were essentially running a free AI assistant for anyone who visited our website.

It did nothing with the conversations. People were asking detailed questions about pricing, timelines, and specific technical requirements — clear buying signals — and the chatbot would answer helpfully and then... nothing. No lead capture. No notification to our team. Those conversations disappeared into the void.

The Wake-Up Call

In the first two weeks, we spent more on API calls for off-topic requests than on actual business conversations. One user had a 45-minute conversation about machine learning theory. Another asked the bot to compare iPhone models. We were paying for these conversations. That is when we realized guardrails are not optional — they are day one infrastructure.

Version 2: Adding a Brain and a Purpose

Version 2 was a complete rebuild. We made three fundamental changes:

1. RAG Instead of Raw Prompting

Instead of hoping the LLM remembered our website content from its training data (it did not, reliably), we built a RAG pipeline. We crawled every page on our website — service pages, case studies, industry pages, blog posts, the about page, the process page, even the contact page. We chunked the content into manageable pieces and stored them in a knowledge base.

When a visitor asks a question, the system pulls the most relevant chunks and injects them into the conversation context. The AI generates responses grounded in our actual content, not its general training data. Hallucination dropped dramatically — not to zero, but to a level we could manage with guardrails.

2. Conversation Tracking and Lead Capture

Every conversation now gets tracked — session ID, visitor IP, page URL, message history. We added a lead capture form that pops up after a few messages, asking for name and email. We also built auto-detection: if a visitor mentions their email address in conversation, the system captures it automatically and creates a lead in our CRM.

3. A Real System Prompt

The V1 system prompt was one sentence. The V2 prompt was a full page — covering tone of voice, what to say about pricing (never quote specific numbers), how to handle project discussions (ask about their needs first, do not rush to sell), when to suggest sharing contact details, and what to do with off-topic questions.

This version was significantly better. But it had a new problem we did not anticipate.

It was too aggressive with lead capture. The form popping up after exactly 3 messages felt robotic. Someone would ask two genuine questions, and before they could ask a third — bam, "Before we continue, can I get your details?" It felt like talking to a salesperson who asks for your business card before you have finished your first sentence.

What We Learned

Lead capture timing is not about message count. It is about intent. Someone asking "What is your email?" on their first message is ready to connect. Someone asking "How does SaaS development work?" on their fifth message is still researching. The trigger should be contextual, not numerical.

Version 3: Context Is Everything

Version 3 added two features that transformed the chatbot from "useful" to "genuinely valuable."

Page Awareness

The chatbot now knows which page the visitor is on. If someone is on our CRM Development page and asks "How do you approach this?", the bot does not give a generic answer about software development — it talks specifically about CRM architecture, industry-specific data models, and our CRM case studies.

If someone is on the Contact page, the bot knows they are ready to engage and adjusts its tone accordingly — more direct, more action-oriented. If they are reading a blog post, it stays educational and naturally mentions relevant services.

This single feature improved the relevance of responses more than any other change we made. The same question — "Tell me more" — generates completely different answers depending on where the visitor is. That is how human conversations work, and it is how AI conversations should work.

Links to Relevant Pages

This sounds obvious in hindsight, but Version 2 would mention our services without linking to them. "We offer SaaS Development" — but no way for the visitor to actually visit the SaaS Development page. They would have to navigate there manually.

Version 3 injects all our page URLs into the system prompt. When the bot mentions SaaS Development, it includes a clickable link. When it references a case study, it links to the case study page. When it suggests contacting us, it links to the contact page. Every mention of a service, industry, or case study becomes a navigation opportunity.

This turned the chatbot from a dead-end conversation into a guided tour of our website.

Version 4: The Production Agent

Version 4 is what you are talking to right now. It added the layer that separates a chatbot from a production system: guardrails, intelligence, and operational maturity.

Production Architecture
What Powers the Entexis AI Assistant Today
Every component that makes the agent reliable, not just functional
Input + Context
Visitor Interaction
Chat widget (Shadow DOM)
Page URL detection
Session persistence
Conversation history
Suggested questions
The visitor's world
Intelligence + Safety
LLM + RAG + Guardrails
271 knowledge chunks
Page-aware prompting
Off-topic blocking
Pricing protection
URL injection
The brain + the rules
Actions + Analytics
Business Outcomes
Lead capture (contextual)
CRM integration
Email notifications
Conversation logging
Rating feedback
The business value
Guardrails
Off-topic, pricing, competitor queries
SSE Streaming
Real-time token-by-token response
Proactive Triggers
Time-based + exit intent
Knowledge Base
63 sources, auto-crawled + manual

What V4 Added

Off-Topic Guardrails
The agent now refuses poems, code help, personal advice, and anything unrelated to Entexis or software development. It does so politely — "I am the Entexis assistant, I can help you with our services or software development questions" — but firmly. No more free AI for homework help. This single change cut our off-topic API spend to near zero.
Pricing Protection
The agent never quotes specific dollar amounts. Ever. Because pricing depends on requirements, and a chatbot giving a number — even a range — sets an expectation that may be completely wrong for the actual project. Instead, it explains that pricing depends on scope and suggests connecting with the team for an accurate estimate. We learned this the hard way when V2 told a visitor our CRM development "starts from a specific number" — a figure that came from a knowledge base entry we had not sanitized out. The visitor came to the sales call expecting that price. Awkward does not begin to describe it.
Contextual Lead Capture
Instead of a form popping up after exactly 3 messages, the lead form now triggers based on buying signals — when the conversation involves pricing, timelines, project requirements, or phrases like "how do I get started." It still has a fallback message-count trigger, but the contextual trigger fires first for visitors who show intent. The conversion feel is completely different. Instead of an interruption, it feels like a natural next step.
Conversation Memory
If a visitor starts a conversation, leaves the page, and comes back later — the conversation picks up where they left off. No more repeating yourself. The session persists in the browser and the history loads from the database. This seems like a small thing, but it matters enormously for visitors who research across multiple sessions before reaching out.
Proactive Engagement
After 25 seconds on the site, a small bubble appears near the chat icon — "Have a question about our services? I am here to help." It is dismissible and only shows once per session. On desktop, it also triggers on exit intent — when the cursor moves toward the browser's close button. Subtle, not annoying. We tested aggressive popups. They increased chat opens but decreased conversation quality. The soft bubble approach gives better results — fewer but more intentional conversations.

The Knowledge Base — The Part Nobody Talks About

Everyone focuses on the LLM. Nobody talks about the knowledge base. But the knowledge base is what makes your agent yours — without it, you just have a generic AI with a custom name tag.

Our knowledge base has 63 sources and 271 chunks. Here is what that actually means:

75+
Pages auto-crawled from our website — services, case studies, blog posts
25+
Manual knowledge entries — pricing models, team info, FAQs, working hours
275+
Total chunks after splitting — each one a self-contained piece of knowledge
Weekly
Update frequency — new content gets crawled and added regularly

The auto-crawled content covers what we do — services, industries, case studies, blog posts. But the manual entries are what make the agent genuinely useful. These are the things that exist in your team's heads but not on your website:

Pricing and engagement models. Not specific numbers — but how we structure engagements. Fixed price, time and material, monthly retainer. What each model is best for. How to get a quote.

Team structure and working hours. Our timezone, communication preferences, project management approach. Things a visitor might ask that no web page covers.

Frequently asked questions that are not on the FAQ page. Minimum project size, NDA policies, post-launch support, technology stack preferences. The questions your sales team answers in every single first call — put those in the knowledge base, and your agent handles them before the call even happens.

Upwork profile and track record. Many of our enquiries come from people who found us on Upwork. The agent can discuss our Upwork history, ratings, and completed projects.

The Knowledge Base Lesson

The questions your visitors actually ask are not the questions you put on your FAQ page. Read your conversation logs for two weeks before designing your knowledge base. You will be surprised by what people want to know — and how differently they phrase it from what you expected.

What We Got Wrong — And Would Do Differently

Transparency time. Here are the mistakes we made that cost us time and money:

01
We Launched Without Guardrails
Version 1 had zero guardrails. It would answer anything. Poems, homework, coding problems, relationship advice. Every off-topic response cost us money and added zero value. If I were doing this again, guardrails would be the first thing I built — before the knowledge base, before the UI, before anything. Define what the agent should not do before defining what it should do.
02
We Put Pricing in the Knowledge Base
We had a knowledge entry that quoted a specific starting-from range for a simple CRM. The agent surfaced it to visitors. Visitors came to sales calls expecting those numbers. Some projects needed ten times that budget. The mismatch created awkward conversations and wasted everyone's time. Never put specific prices in a chatbot's knowledge base. Pricing depends on requirements. Let the human team handle pricing conversations.
03
We Did Not Read the Logs for the First Month
We built the chatbot, deployed it, and moved on to other projects. A month later, we finally looked at the conversation logs. They were gold. Visitors were asking questions we never anticipated — about specific technologies we support, about comparisons with competitors we had never heard of, about use cases we had not considered. A month of visitor intelligence, wasted. Now I read the logs weekly. It is the single most valuable 30 minutes I spend.
04
We Over-Engineered the First Version
Before we built the RAG pipeline, we explored vector databases, embedding models, and semantic search. We spent a week evaluating Pinecone vs Weaviate vs pgvector. Then we realized that for a knowledge base of our size (a few hundred chunks), a simple keyword match would work perfectly well. We were solving for scale we did not have. Start simple. You can add sophistication when you actually need it.
Lessons Learned
What Actually Matters — In Order of Priority
If we were starting from scratch tomorrow, this is the build order
Guardrails First
Define what the
agent must NOT do
before anything else
Priority 1
Knowledge Base
Crawl your site +
add manual FAQs
your team answers daily
Priority 2
Context Awareness
Page detection +
links in responses +
conversation history
Priority 3
Lead Intelligence
Contextual capture +
CRM integration +
team notifications
Priority 4
Analytics + Iteration
Read logs weekly +
rating feedback +
improve constantly
Priority 5

What the Conversation Logs Taught Us

This is the part I find most fascinating. After months of reading conversation logs, here is what we learned about our visitors that we could never have learned from traditional analytics:

People compare us to companies we have never heard of. Multiple visitors asked how we compare to specific agencies in Bangalore and Delhi that we did not know existed. That is competitive intelligence you cannot get from any other source.

The questions people ask are not the questions we anticipated. We expected questions about our services and pricing. We got questions about our team size, our remote work policy, whether we sign NDAs, what happens after launch, and whether we work with startups or only enterprises. We added all of these to the knowledge base.

Visitors from different pages have completely different intent. Someone on the homepage is exploring. Someone on a case study page is evaluating. Someone on the contact page is ready to act. The same chatbot needs to handle all three — and the page awareness feature makes this possible.

The first question someone asks predicts whether they will convert. Visitors who start with a specific problem — "We need a CRM for our brokerage" — convert at a dramatically higher rate than those who start with general exploration — "What do you do?" This insight now informs how we prioritize lead follow-ups.

Try It Yourself

The chatbot is live on this page. Click the icon in the bottom-right corner and test it. Ask it about our services. Ask it something off-topic and see how it handles it. Ask about pricing and watch how it redirects. Try to break it — we have, extensively, and we would love to know if you find something we missed.

If the broader question behind this build is what teams are actually doing with AI agents in 2026 — across chatbots, workflow automation, and autonomous systems — read the companion piece: AI Agents in 2026: What Businesses Are Actually Building — From Chatbots to Autonomous Workflows.

If the question is narrower and more practical — whether your business website actually needs an AI chatbot in the first place — read the companion piece: Why Every Business Website Needs an AI Chatbot in 2026.

And if the technical foundation — RAG, retrieval augmented generation, the architecture that made the Entexis agent actually accurate — is the part you want to understand, read the companion piece: What Is RAG and Why Every Business Should Care.

The AI agent is not the product. The conversations are the product. Every chat log is a window into what the market actually wants, how buyers think about your services, and what questions stand between them and becoming customers. The technology enables the conversations. The conversations generate the insights. The insights improve everything — the agent, the marketing, the sales process, the service positioning. That feedback loop is the real value of building an AI agent, and the part most teams discover only after they ship one.

Want to Build Something Similar?

At Entexis, we build AI agents, website chatbots, and lead-qualification systems for businesses across fintech, real estate, NGOs, and e-commerce — with RAG architecture, guardrails, page awareness, and conversation analytics baked in from day one. If you are scoping a production AI agent and want a team that has already made the expensive mistakes, let us run you through a no-pressure discovery session. Start the conversation with Entexis.

Ready to Add AI
to Your Business?

From intelligent chatbots to workflow automation — we build AI solutions that understand your domain, your data, and your users. Tell us what you need.

We'll get back within one business day.

← Previous Insight
TradingView Automated Trading in 2026: What Teams Are Actually Building — From Pine Script to Full Trading Platforms
Next Insight →
AI Agents in 2026: What Businesses Are Actually Building — From Chatbots to Autonomous Workflows
What We Build

Solutions We Deliver

See It in Action

Related Case
Studies

Internal Operations
Internal Operations

Entexis CRM — We Were Building CRMs for Clients While Running Our Own Business on Spreadsheets

6-Stage
Lead Pipeline
3 Roles
Access Control
Read Case Study →
More Case Studies