How to create a chatbot: three ways, step by step
There are three ways to create a chatbot: a no-code builder that learns from your website and documents, your own code on an AI model's API, or a rule-based flow builder with buttons and fixed paths. If your visitors ask questions your website already answers, a no-code builder is the shortest route; building it yourself also means building the search, the chat window, the hosting and the upkeep. Either way, first decide what it should answer and who takes over when it can't.
· 14 min read
We make Asktopus, a no-code AI chatbot that learns from your website, so the no-code steps below use it. Facts about other providers come from their own pages, linked under each part.
Which way should you create your chatbot?
| Compared on | No-code builder that learns from your content | Your own code on an AI model's API | Rule-based flow builder |
|---|---|---|---|
| Who builds it | You, in a dashboard | A developer | You, in a visual editor |
| Answers questions in visitors' own words | YesFrom your pages, documents and articles | YesOnce you've built the search over your content | PartlyOnly along the paths you drew, unless the tool adds AI |
| When your content has no answer | PartlyDepends on the tool: ask whether it says so or guesses | PartlyWhat you instruct it to do, and test | YesNever improvises: every reply is one you wrote |
| Carries out tasks such as bookings | PartlySome tools can; Asktopus doesn't | YesIf you connect it to your systems | YesIts strength: booking requests, lead forms |
| Best when | Visitors ask many questions whose answers are written down | It must work inside your own systems | A few fixed jobs: bookings, leads, routing |
The lines blur: some flow builders add AI, and some AI tools carry out a few tasks. Asktopus answers from your content and, once you switch it on, passes what it can't answer to a person; it doesn't book, look up orders or run flows.
What should you decide before you create a chatbot?
Five answers shape everything after them, so write them down first:
- What it should answer. List the 15 to 20 questions you get most often. Those whose answer is written down and the same for everyone are chatbot questions; "Where is my order?" needs your systems or a person.
- From which content. Your website, PDFs, a help center, a product catalogue. A chatbot can't answer what isn't written anywhere, and when two pages disagree, it may quote either.
- Where it lives. Your website, a link of its own, a messaging app such as WhatsApp, or your own app. Tools differ by channel.
- Who takes over when it can't, and what it must never answer, such as medical, legal or financial advice.
- Answer or act. Bookings, order lookups and account changes take integrations or your own code. A chatbot that answers from your content can explain how to book, not make the booking.
If your list is mostly questions with written answers, the no-code route below fits; our comparison of seven AI chatbots for websites helps you pick a tool, including where Asktopus isn't the best fit. If it's mostly tasks, build it yourself or use a flow builder.
How do you create a chatbot from your own content without code?
These are the steps in Asktopus, with the dashboard's own labels. Other no-code builders follow a similar order: content, then behavior, then testing, and the code on your site last.
Check what your content can already answer
Enter your web address in our free FAQ generator. It reads that page and up to four pages it links to and writes up to ten questions and answers, each with the page it came from. A question you expected and don't see may not be on your site yet.
Create an account
Sign up at app.asktopus.com. The trial runs 14 days with the Starter plan's limits and needs no credit card. If we email you a link to verify your address, click it: step 7 needs a verified address.
Add your website
Click Add site, keep For a website, enter your web address and click Create site. The scan starts on its own and groups your pages into sections from your sitemap. No website? Choose Without a website: the assistant answers from the documents and articles you give it, on a link of its own. If bot protection turns crawlers away, this guide shows how to let Asktopus in.
Choose which pages it learns from
Under Choose which pages to include, tick the sections that hold answers, such as services, prices, delivery, FAQ and contact, and click Start training. Training typically takes 1 to 10 minutes, depending on your site's size.
Add what your website doesn't say
On the Knowledge tab, Upload Document takes PDF, Word (.docx), text and Markdown files, or a CSV of questions and answers, up to 50 MB each. What isn't written down anywhere goes in an article under Articles (click Publish when it's done). Add source reads a help center on another address, and Sync products brings in a webshop's products with prices and stock.
Set how it sounds and what it won't discuss
Describe the voice under Tone and persona on the Settings tab. On the Widget tab, write a Greeting Message, add up to four Suggested questions, and list topics it should decline under Blocked topics, such as "medical diagnosis" for a clinic.
Decide who takes over
"Talk to a person" is off until you switch it on: on the Settings tab, turn on Human handoff and choose Where messages go (Email, Slack or Webhook). Visitors then get a Talk to a person button, can type that they want a person, and are offered one under any answer the assistant couldn't give. Their messages also appear on the Handoffs tab (handoff guide).
Test it on the Try it tab
Open Try it and work through the checklist below. When an answer is wrong, fix the page or document it came from, click Update knowledge on the Knowledge tab, and ask again.
Put it where your visitors are
Copy the code under Embed code on the Overview tab and paste it just before
</body>on your website; how to add an AI chatbot to your website shows where that is on WordPress and other platforms. Shopify stores install the Asktopus app instead. To share the assistant as a link, switch on Chat page on the Overview tab.
How do you build a chatbot yourself on an AI model's API?
Building your own makes sense when the chatbot must work inside your own systems and you have a developer to build and run it. Beyond a loop that sends each message to a model and shows the reply, it needs:
- An API key, kept on your server. You get one from a provider such as Anthropic or OpenAI. OpenAI's advice is never to put it in a browser or a mobile app, where anyone can take it and make requests on your account, and to route requests through your own server. Use is billed by the token: Anthropic prices each model per million input and output tokens.
- A search over your content. The model doesn't know your prices or policies, so before each answer your code finds the matching passages and sends them along (our explainer on RAG shows how). That takes an embedding model and a vector database. Anthropic doesn't offer its own embedding model and points to Voyage AI; OpenAI has its text-embedding-3 models and a hosted file search tool over files you upload.
- Conversation history, if replies should build on earlier messages. Claude's Messages API is stateless by default: your server sends the whole conversation with each request. OpenAI's Responses API can keep the thread with
previous_response_idor its Conversations API, though withprevious_response_idall earlier input tokens are still billed. - A way to say "I don't know". Anthropic's guide to reducing hallucinations suggests explicitly allowing the model to say so and telling it to use only the documents provided, techniques it says reduce hallucinations without eliminating them. Claude's API can also return citations: the exact passages each claim rests on.
The core of it with Anthropic's Python SDK, where search() is your retrieval step:
import anthropic
client = anthropic.Anthropic() # reads ANTHROPIC_API_KEY; run this on your server
MODEL = "claude-opus-5-5" # or another current model from Anthropic's models page
INSTRUCTIONS = """You answer questions from visitors to [Business]'s website.
Answer only from the passages below. If they don't contain the answer,
say you don't know and point to the contact page."""
def reply(history: list, question: str) -> str:
"""history: this visitor's conversation so far, kept on your server."""
passages = search(question) # your retrieval: the closest chunks of your content
history.append({"role": "user", "content": question})
response = client.messages.create(
model=MODEL,
max_tokens=16000,
system=INSTRUCTIONS + "\n\nPassages:\n" + passages,
messages=history,
)
history.append({"role": "assistant", "content": response.content})
return "".join(block.text for block in response.content if block.type == "text")Around those lines sits the larger job: the search index, the chat window, limits against abuse, storing conversations lawfully (GDPR and AI chatbots), re-reading pages when they change, and a way to reach a person. A no-code builder has built that already. Building it yourself buys control and the ability to act in your own systems, such as looking up an order, which tools that answer from your content, Asktopus among them, don't do.
Sources: Anthropic docs: Using the Messages API (multiple conversational turns), Anthropic docs: Get started (API key as an environment variable), Anthropic docs: Models overview, Anthropic docs: Pricing, Anthropic docs: Embeddings, Anthropic docs: Reduce hallucinations, Anthropic docs: Citations, OpenAI Help Center: Best practices for API key safety, OpenAI API docs: Conversation state, OpenAI API docs: Vector embeddings, OpenAI API docs: File search (read 3 December 2026)
When is a rule-based flow builder the better choice?
A flow builder doesn't need to understand language: you draw the conversation as a tree of messages and buttons, and the visitor clicks through it. A visitor whose question isn't on the menu goes in circles, but a fixed path is right for booking and quote requests that need the same details every time, for qualifying leads, for replies that must never vary (wording your lawyer approved), and for routing ("Sales, support or billing?") before a person takes over.
Tidio's Flows, for example, are built in a drag-and-drop editor with more than 40 templates, including appointment booking, quote requests and recovering carts. Landbot describes itself as a no-code AI agent and chatbot builder for websites and WhatsApp that combines a chatbot's structured logic with an AI agent, and it qualifies leads and books meetings.
The cost is upkeep: every new question is a branch you build by hand, and every price change means finding each place it's written. Asktopus has no flow builder and isn't on WhatsApp, so if fixed paths or messaging apps matter most, a tool like these fits better. When a person should be in the conversation instead, see AI chatbot vs. live chat.
Sources: Tidio: Flows, Landbot: home page (read 3 December 2026)
How do you write instructions for a chatbot?
Every AI chatbot runs on instructions, the system prompt the model reads before it answers. Good ones are short and set the role, the tone, the limits and the fallback when your content has no answer. Anthropic's prompting guide notes that a role in the system prompt focuses the model's behavior and tone, and that even a single sentence makes a difference. For a chatbot you build yourself, start along these lines:
You answer questions from visitors to the website of [Business], a [what you do] in [place].
Answer only from the passages provided. If they don't contain the answer, say you don't know
and suggest the contact form. Never guess a price, time, date or policy.
Write in a friendly, plain tone, in two to four sentences. Say "we" for [Business].
You can't book, cancel or change orders. Explain how the visitor can, if the passages say how.
Reply in the language the visitor writes in.Keep facts out of the instructions: prices, opening hours and policies belong in the content the chatbot searches, where you change them once.
In Asktopus, answering only from your content, saying when it doesn't know and replying in the visitor's language are built in. Tone and persona (up to 1,000 characters; see the tips for writing it) shapes the voice and doesn't override those rules. Blocked topics works in two steps. A question that contains one of the topics word for word never reaches the AI model, and the visitor is told the assistant can only answer questions about the website's content; common attempts such as "ignore your instructions" get the same reply. The assistant itself declines the same topics when they're worded differently or asked in another language. The blocked topics guide explains what to list.
Sources: Anthropic docs: Prompting best practices (Give Claude a role) (read 3 December 2026)
How do you test a chatbot before it goes live?
Test with the questions your customers really ask, in their words, before anyone else sees it. In Asktopus, the Try it tab opens the same chat your visitors get. Test chats count toward your conversations just as visitors' chats do; the trial's 300 conversations leave room for a thorough test. Check:
- YesYour 15 to 20 common questions, typed the way customers type them: short, misspelled, without context.
- YesEvery answer with a number in it, such as a price, a fee or an opening time.
- YesQuestions your content doesn't answer. It should say it doesn't know, not guess.
- YesPages that disagree. An old price list next to a new pricing page gives two answers; remove the old one.
- YesOther languages, if your visitors write in them.
- YesQuestions it must decline, and a few attempts to make it break its instructions.
- YesThe way to a person. Send a test request, check that it arrives, and agree who answers it and how fast.
- YesA phone. Ask a question on your site from a phone too.
When an answer is wrong, fix the source, not the chatbot: correct the page and click Update knowledge, replace the document, or write an article that says it plainly.
How do you keep a chatbot accurate after launch?
A chatbot is only right for as long as its content is:
- Read the conversations. On the Conversations tab, answers visitors rated are marked Helpful or Not helpful, and answers the assistant couldn't give Didn't know the answer. Read them weekly for the first month.
- Answer what it couldn't. Questions to answer, on the Knowledge tab, lists the last 30 days' questions the assistant couldn't answer or a visitor found unhelpful, most asked first. Write an article opens a draft for one.
- Update after every change. When a price, an opening time or a policy changes, click Update knowledge. Pro also reads the site again every 7 days, and Business every 3 days.
If you build the chatbot yourself, each of these is a feature to build too.
More questions
- Can I create a chatbot for free?
- You can start without paying, though a model API charges for what each request sends and receives. Asktopus has a 14-day free trial with no credit card, and after it the assistant keeps answering on a free plan with 30 conversations a month on one site, with our branding in the chat. Paid plans are on the pricing page, and AI chatbot pricing explains how different tools charge.
- How do AI chatbots work?
- Most business chatbots search your content for the passages closest to the question, and a language model writes the reply from those passages: retrieval-augmented generation, which our explainer walks through. A rule-based chatbot has no model; it shows replies and buttons written in advance.
- Is ChatGPT a chatbot or an AI agent?
- Both, depending on the mode. OpenAI's help center describes Chat in ChatGPT as fast, conversational assistance with everyday questions, and Work as an agent designed for longer, multi-step work and finished deliverables. The same line runs through business chatbots: a chatbot answers, and an agent carries out tasks, which needs access to your systems.
Sources: OpenAI Help Center: ChatGPT Work and Codex (read 3 December 2026)
By Klaus Byskov Pedersen, founder of Asktopus