← Blog

How to Build a Claude-Powered Onboarding Chatbot

2026-11-02 · 5 min read · SubToAPI Team

What a Claude-powered onboarding chatbot actually does

An onboarding chatbot replaces (or supplements) your static "Getting Started" checklist with a conversational guide that answers questions in context, walks users through setup steps, and adapts to what they've already done. Instead of a generic tutorial, the user types "I can't find the API key field" and gets an answer specific to your product, in your tone, right where they're stuck.

Claude is a good fit for this because it handles multi-turn conversation naturally, can call tools to check or update onboarding progress, and can be given a tightly scoped system prompt so it stays on-topic instead of wandering into unrelated support territory. The rest of this guide walks through the architecture, the prompt design, and the API calls needed to ship one.

Architecture: three moving parts

A practical onboarding chatbot has three components:

  1. A system prompt that defines the chatbot's scope, tone, and the specific onboarding flow it should push users through.
  2. Context injection — user-specific data (plan, signup date, completed steps) passed into each request so Claude's answers are personalized.
  3. Tool calls that let Claude take actions: mark a step complete, fetch a doc snippet, or escalate to human support.

You don't need a custom LLM backend to wire this up. If you already have Claude access, you can expose it as a straightforward HTTPS API with SubToAPI and call it from your frontend or backend like any other REST endpoint — no separate Anthropic billing setup, just an application key (sub_live_...) scoped to your onboarding feature.

Step 1: Design the onboarding flow before you write a prompt

Map out the steps a new user needs to complete — connect an account, invite teammates, configure a setting, send a first test request. Write this as a short numbered list. This list becomes the backbone of your system prompt and the reference Claude uses to know what "next step" means for a given user.

Onboarding steps for Acme App:
1. Verify email
2. Connect a data source
3. Invite at least one teammate
4. Run first sync
5. Review the dashboard

Step 2: Write a scoped system prompt

Keep the chatbot narrowly focused. A common failure mode is a bot that tries to answer everything, including unrelated support questions, and ends up giving wrong or outdated answers. Constrain it explicitly.

You are the onboarding assistant for Acme App.
Your only job is to help the user complete these 5 onboarding steps: [list].
You know the user's current step from the context provided in each message.
If asked something unrelated to onboarding or setup, say you're not able to help with that
and suggest they use the in-app support chat.
Keep answers under 4 sentences unless the user asks for more detail.
Never invent feature names or UI locations you weren't told about.

Step 3: Inject user context per request

Pass the user's current state as part of the message rather than hardcoding it in the system prompt, since it changes per user and per request.

curl https://api.subtoapi.app/v1/messages \
  -H "Authorization: Bearer $SUBTOAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4-5",
    "system": "You are the onboarding assistant for Acme App. Steps: 1) Verify email 2) Connect data source 3) Invite teammate 4) Run first sync 5) Review dashboard.",
    "messages": [
      {"role": "user", "content": "User context: plan=Team, completed_steps=[1,2], current_step=3. Question: how do I invite someone?"}
    ]
  }'

This keeps the system prompt stable (good for caching and consistency) while the per-user state flows through the conversation turn. See /docs/messages for the full request shape.

Step 4: Add tool use for real actions

A chatbot that only talks is less useful than one that can act. Give Claude a tool to mark steps complete or pull a live doc snippet instead of guessing.

{
  "tools": [
    {
      "name": "mark_step_complete",
      "description": "Marks an onboarding step as done for the current user",
      "input_schema": {
        "type": "object",
        "properties": { "step_number": { "type": "integer" } },
        "required": ["step_number"]
      }
    }
  ]
}

When Claude decides a step is finished based on the conversation, it returns a tool call instead of plain text; your backend executes it (updates the database) and sends the result back in the next turn. This is the difference between a bot that says "great, step 3 is done" and one that actually updates the user's progress. Full setup is in /docs/tools.

Step 5: Stream the response for a responsive UI

Onboarding chatbots live inside an active signup flow, so latency matters more than in a background job. Stream tokens as they generate instead of waiting for the full response.

const res = await fetch("https://api.subtoapi.app/v1/messages", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SUBTOAPI_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    model: "claude-sonnet-4-5",
    stream: true,
    system: systemPrompt,
    messages: [{ role: "user", content: userMessage }]
  })
});

for await (const chunk of res.body) {
  process.stdout.write(chunk.toString());
}

Details on event types and parsing are in /docs/streaming.

Step 6: Guardrails and fallback behavior

Getting this running quickly

If you're starting from scratch, you don't need to manage separate Anthropic API billing or provisioning to prototype this. SubToAPI turns your existing Claude access into an API key you can call from day one, with usage visibility so you can see exactly how many onboarding conversations are costing you before you scale the feature to all signups. Start with the free trial at /signup, follow /docs/quickstart to get your first request working, and check /pricing once you know your expected volume.

Questions

Does the chatbot need to know every feature of my product? No — and it shouldn't. Scope it to the onboarding steps only. A narrow system prompt with a fixed step list produces more reliable answers than one asked to cover the entire product surface.

Should onboarding progress be tracked by the chatbot or my backend? Your backend. Use tool calls so Claude can request a step be marked complete, but the actual write to your database should go through your own validation logic, not be trusted blindly from the model's output.

Can I reuse the same chatbot for support after onboarding finishes? You can reuse the infrastructure, but use a different system prompt. Mixing onboarding guidance and general support in one prompt tends to produce vaguer answers for both use cases.

Turn your Claude access into an HTTPS API

SubToAPI gives you application API keys, streaming, tool use and usage insights on top of your existing Claude access — set up in minutes.

Start free  Read the quickstart →