Module 1 of 4 · Part 3: Share Your System
0%
0 of 8 lessons complete
You are building something real.

Your Chatbot, from your root

Build an assistant that answers your visitors only from your own content, in your own voice, that you own. One root feeds all.

After this module: You have a live AI assistant on your own site, answering only from your content, speaking in your voice, that you own and run.

This module's pack

Module 9 pack: the chatbot build

The Librarian that fills your Library, the Brain edge function, the widget, the migrations, and eight guides that walk the whole build. Unzip it and open README.md first: it walks you through the one Terminal command (./scripts/preview.sh) that opens the starter page, so you meet the Face before any setup. The starter page needs that command to look right, so opening it straight from Finder renders it bare.

Download pack
See what's inside (31 files)

Scripts (3)

build-kb-index.py, the Librarian that turns your pages into searchable passages  ·  kb-search.py, a tool to test what your assistant retrieves  ·  preview.sh, which serves the starter page locally

Brain (1)

site-chat/index.ts, the edge function that retrieves the right passages, refuses off-topic questions, and answers in your voice

Database (5)

Five migrations, run in order: chatbot_kb (the knowledge table and search)  ·  assistant_messages (the analytics log)  ·  kb_boost (content weighting)  ·  assistant_tokens (token-cost tracking)  ·  site_chat_rate (the daily rate limit that guards your card)

Face (2)

assistant.js, the widget your visitors see, shipped as a plain circle-with-eyes in the template palette, ready to become YOUR character  ·  a starter page that hosts the widget out of the box, so you meet the Face before any setup

Guides (8)

Guides 83 to 90, one per lesson: the idea  ·  the Library  ·  the Brain  ·  the Wall  ·  the Face  ·  make it yours  ·  see what people ask  ·  free and paid from one engine

Website basics (7)

The Module 6 brand and shared files, copied verbatim (tokens, typography, Karla, favicon, og image, styles, loader), so the starter page opens in the brand before your site exists

Docs (2 + config)

README.md, the install quickstart: order, secrets, what to swap  ·  BLUEPRINT.md, the full build explained piece by piece, with the security model  ·  config.toml, .env.example and .gitignore, so nothing 401s and no key lands in git

Before you start

You already have what this needs from Parts 1 and 2: a Supabase project, edge functions, and a deployed site with real content. You add two things: an API key for the answers (Anthropic) and one for the search (Gemini, which is cheap). Both live on the server side, never in the browser: on your edge function for the live assistant, and in a local .env file for the Librarian you run from your own machine. Set aside about two hours for the install, or three if this is your first time running a script from the Terminal.

Those keys mean a provider account with billing turned on, and you pay per answer. It is genuinely small: a few cents for a real answer, refusals and searches near zero, a few dollars a month at normal traffic. It is still your bill, so set it up with eyes open: before you enter card details, set a spending guard in the provider's billing console (Anthropic lets you set a hard monthly limit; Google lets you set a budget alert). The pack also ships its own daily rate limit (site_chat_rate) that guards your card from the app side; Lesson 7 shows the running cost to the cent and where to change the limit.

👇 After this module

You have a live assistant on your own site. It answers from your published pages, in your voice, refuses anything off topic, and offers a call when it cannot help. You own it, and you can see every question it gets and what each one cost.

What you'll do in this module

What you'll leave with

  • A live, on-brand assistant on your own site
  • Answers grounded only in your content, each one linking to the real page
  • A warm refuse-and-book-a-call for anything off topic
  • Full ownership: your database, your code, no per-message rent
  • A log of every question asked, and a known cost per answer in cents
  • The path to a free and a paid version from the same engine

Why this matters

Across Parts 1 and 2 you built a system that runs your business. This module turns that same system outward. The assistant is not a tool you bolt on. It is another output of the root you already have. Someone lands on your site, asks a real question, and it answers the way you would, only from what you have actually published.

Start here

Lesson 1: One root feeds all

Your assistant is a native output of your root, the same source that runs your business.
It answers only from your published content, and links to the real page.
The scope gate is the feature: on topic it answers, off topic it books a call.
You own it. Your database, your code, a few cents per answer.
1Decide what your assistant can see: your public pages, minus anything private.
2Run the Librarian from the pack to build your Library from your pages.
3Deploy the Brain from the pack: the edge function that retrieves, scope-gates, and answers in your voice.
4Walk the Wall with Claude until you trust it in public.
5Drop in the Face: load the widget site-wide and choose three starter questions.
6Wire the questions and cost into your daily brief, then tune voice, scope, and weighting.
Module Complete!
You finished all 8 lessons. Part 3 has begun.