An AI website assistant I designed, built and operate as a SaaS product
Stewie is an embeddable AI assistant that learns from a company's website and documents. One script tag adds a chat that answers from that content only, cites its sources, captures leads and recognises intent. The concierge in this site's navigation is the same product, running on a Cloudflare edge stack with EU data residency.

The challenge.
Most company websites offer search or a static FAQ that misses a visitor's actual question. A generic chatbot can be worse: it guesses or drifts outside the business context. I wanted to turn existing website and document content into an assistant that answers around the clock, cites its evidence and turns relevant conversations into leads, working from the content a company already publishes rather than hundreds of hand-written answers.
The difficult part was the complete chain: crawl arbitrary sites despite messy HTML and bot protection, split and embed the content, isolate every customer, retrieve and rerank the right context, and generate grounded answers while defending against prompt injection. It also had to be inexpensive enough for a free tier and keep AI processing within the EU.
The approach.
I designed Stewie as a multi-tenant SaaS around a retrieval-augmented generation loop: crawl, parse, chunk, embed, store, retrieve, rerank and answer with sources. Durable Cloudflare Workflows handle ingestion with retries and resumable steps, Queues provide buffering, and R2 stores the source material.
Each tenant is isolated by company ID across both vector and relational queries. The product includes the embedded widget plus an inbox, leads, knowledge base, analytics and configuration dashboard. Stewie is currently in open beta; the live concierge on this website is the production product itself.
Architecture and decisions.
The common thread is an all-Cloudflare edge backbone that can scale down to almost zero, with AI processing deliberately kept in Europe.
- ·
SvelteKit on Cloudflare Workers. The application and widget run at the edge without server administration or cold starts.
- ·
Vectorize and D1 with tenant isolation. Every vector query is namespace-filtered and every relational query is scoped by company ID. D1 also stores a vector ID ledger for deterministic GDPR deletion.
- ·
Workflows, Queues and R2 for ingestion. Crawling, parsing, chunking, embedding and upserting run as a durable workflow with retries and per-step resume.
- ·
EU-resident AI. Claude generation runs through Amazon Bedrock in Frankfurt, with Cohere retrieval models and Mistral document processing in European regions under no-training terms.
- ·
Durable Objects for real time. Per-tenant rate limiting and WebSocket relays support live takeover when a human needs to join a conversation.
The hardest problems, solved.
- 1
EU-resident streaming generation. Keeping generation in Europe required a Bedrock integration and a custom decoder for its binary event stream, including fragmented tool calls. The protocol layer was written test-first.
- 2
Defence-in-depth tenant separation. Namespace filters, relational scopes, a vector ledger and non-revealing 404 responses prevent one tenant from learning anything about another tenant's data.
- 3
Prompt injection on untrusted input. Crawled pages and visitor messages are both untrusted. Instruction boundaries, marker neutralisation, abuse detection, constrained tools and rate limits protect the response and lead flow.
- 4
A widget on an unknown host page. A Shadow DOM launcher combined with a same-origin iframe keeps the widget visually integrated without stealing clicks or inheriting hostile page styles.
The result.
Stewie is a working multi-tenant assistant that crawls a business site in seconds, answers from that content with citations, captures leads and recognises intent. The product, dashboard, crawler and RAG pipeline all run in production on an EU-focused edge architecture.
For a client, this demonstrates the complete capability: from content ingestion and retrieval to a safe embedded interface and production operations. Stewie can be deployed as the product itself, or the same building blocks can support a more deeply integrated custom assistant.
Under the hood.
Frequently asked questions.
Is your question not listed? Email me directly.
Can I put an assistant like this on my own website? +
Yes. Stewie is added with one script tag and uses your own site and documents as its knowledge source. It can appear as a chat bubble or through a custom launcher such as the ask bar on this site.
How does it avoid making answers up? +
The assistant retrieves and reranks relevant passages, generates from that context and cites the source. When the answer is not present, it is instructed to say so instead of guessing. Additional controls defend against prompt injection.
Where is the data processed? +
Storage is pinned to European Cloudflare locations and AI processing uses European regions, including Amazon Bedrock in Frankfurt and Mistral in Paris. Tenant data is isolated and deletion is tracked through a vector ID ledger.
Did you build the product yourself? +
Yes. I designed and built the crawler, RAG pipeline, dashboard, widget and billing foundation. Stewie is currently in open beta, and the concierge on this website is the live product.
What would an assistant like this cost? +
The price depends on the first release and the required integrations. The operating economics are already measured: the AI cost of a full conversation is around $0.012. A client implementation receives a fixed scope and price upfront.