
Use Cases•2 Dec, 2026

There are two ways to build an AI agent from your website. You can have a coding tool such as Claude Code or Codex write the code for you from the prompts below, or you can add your site to Chatbase, which takes four steps and already includes what you'd otherwise build for real traffic: usage plans, spam protection and handoff to a person.
An AI agent built from your website reads your pages, finds the ones that match each question and answers from them, rather than being trained from scratch. The two routes differ in who builds and runs that part.
You need a terminal (the command-line app on your computer), a Claude account (Claude Code) or a ChatGPT account (Codex), and an OpenAI API key. The prompts follow the approach in OpenAI's website Q&A tutorial.
Make an empty folder, open a terminal in it, then install one of the tools and start it:
An API key is the password that lets your code use OpenAI's AI. Create one in the OpenAI dashboard and save it in your terminal with export OPENAI_API_KEY="your_key". Never paste it into a prompt.
Paste this, with your own website address:
1Build a chatbot that answers questions using2the pages on my website, https://yoursite.com.3Read every page on the site (same domain only,4skip login pages and respect robots.txt) and5answer only from what those pages say. If the6answer isn't on the site, say "I don't know".7End every answer with links to the pages you8used. Use OpenAI for the AI part, with my key9from the OPENAI_API_KEY environment variable.10Run it and show me a test question.
1Put the chatbot in a simple chat window on a2web page, and tell me how to run it on my3computer.
Before it goes on your site, you'll need somewhere to host it and a limit on how many questions each visitor can ask, because every question uses your OpenAI key.
1Ask the chatbot 10 questions my customers2really ask and 3 questions my website can't3answer, and show me each answer and the pages4it used.
The 3 unanswerable questions should come back "I don't know".
1Add a command that re-reads my website,2updates only the pages that changed and3removes pages that are gone. Show me how to4run it every week.
That's a working prototype, and you now own the code that reads your site, the search, the chat window, the hosting and the weekly update.
A prototype is fine for a handful of questions. With real traffic, you also have to run these:
| What you need | Building it yourself | On Chatbase |
|---|---|---|
| Reading your site and keeping it current | Your own code and a weekly update (steps 3 and 6) | Add website with Exclude paths, then Resync now or, on Basic and up, a weekly Auto-resync that refreshes only changed pages |
| Searching your pages and answering | Your own code to store and search the pages (step 3) | Nothing to build: each source syncs and the agent uses it as soon as it does, with no retraining step |
| Chat window | Your own page and hosting (step 4) | The Chat Bubble, with an embed script you paste into your site |
| AI usage limits | Your OpenAI account's rate limits and spend limits, which depend on your usage tier | Plans include 700, 4,000 or 15,000 message credits a month (Hobby, Basic, Business), and Enterprise is priced on a commitment sized to your expected volume |
| Spam and abuse | Your own limit per visitor and spam handling | Guardrails: a message limit per visitor on the web channels (20 every 240 seconds by default), spam detection and country blocking. Abusive messages get no reply and use no credits |
| When the AI can't help | Your own handoff to a person | Escalations to the Chatbase Helpdesk, or to tickets in Zendesk, Salesforce, Intercom or Freshdesk |
Do these four steps in order:
Building it yourself is the better call when:
Chatbase fits when you:
About the author
Build AI agents for free with Chatbase
Upload files, connect sources like Notion or URLs, and go live in minutes.
Join thousands of teams using Chatbase to build AI agents that deliver exceptional support at scale — across chat, email, and voice.