← Blog

What Is Claude Bot and How Does It Work?

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

"Claude bot" is a term that gets used for at least three different things, and mixing them up leads to confusion fast. It can mean ClaudeBot, Anthropic's web crawler that fetches pages to train and ground its models. It can mean Claude itself acting as a chat assistant — in the Claude app, in Slack, or embedded in a product. Or it can mean a custom bot you build on top of Claude's API — a Discord bot, a support widget, an internal Slack assistant — that uses Claude as its reasoning engine.

This article covers all three briefly, then focuses on the part most builders actually care about: how a Claude-powered bot works under the hood when you build one yourself.

The three meanings, quickly

1. ClaudeBot, the crawler. This is an automated agent operated by Anthropic that requests web pages the same way a search engine crawler does. It respects robots.txt, identifies itself with a ClaudeBot user agent, and is used to gather publicly available text for training and for retrieval. If you saw "ClaudeBot" in your server logs, this is what visited — not a chat conversation, just an HTTP request.

2. Claude as a chat assistant. When people say "I talked to Claude bot," they usually mean the conversational assistant available at claude.ai, in the mobile app, or through integrations like Slack. There's no separate "bot" product here — it's just Claude, referred to informally as a bot because that's the common shorthand for any conversational AI.

3. A bot you build using Claude. This is the technical, developer-facing meaning, and it's the one worth explaining in detail: a piece of software you write that sends messages to Claude's API and does something with the responses — replies in a chat channel, answers support tickets, summarizes documents, runs a workflow with tools.

How a Claude-powered bot actually works

At the core, a Claude bot is a loop: your code sends a request containing conversation history and instructions, Claude returns a response, and your code does something with it — displays it, stores it, or feeds it back in for another turn.

1. The request

Every call to Claude's messaging API includes:

A minimal request looks like this:

curl https://api.subtoapi.app/v1/messages \
  -H "Authorization: Bearer $SUBTOAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4",
    "max_tokens": 512,
    "system": "You are a concise support bot.",
    "messages": [
      {"role": "user", "content": "How do I reset my password?"}
    ]
  }'

2. The model generates a response

Claude processes the input as tokens (chunks of text, roughly 3-4 characters each), predicts the next tokens one at a time based on everything in the context window, and stops when it either finishes its answer or hits max_tokens. It has no memory between requests — every call is stateless. If your bot needs to "remember" earlier turns, your code has to resend the full conversation history each time.

3. Your bot decides what to do with the output

For a simple Q&A bot, this just means posting the returned text into a chat channel. For anything more useful, bots typically do one of two things beyond plain replies:

4. The loop repeats

A multi-turn bot conversation is really just the same request being sent over and over with a growing messages array, sometimes interleaved with tool calls. There's no hidden bot logic on Anthropic's side beyond the model itself — everything about how the bot behaves (persona, guardrails, what tools exist, how errors are handled) lives in your code and your system prompt.

Where SubToAPI fits

If you already have Claude access and want to build a bot without setting up separate infrastructure, SubToAPI turns that access into a standard HTTPS API. You get an application key (sub_live_...), send requests to /v1/messages, and get streaming, tool use, and usage metadata without managing a second billing relationship. It's useful specifically for the "build a bot" scenario described above — the request/response shape matches what's shown in this article. Check /docs/quickstart to get a bot talking in a few minutes, or /pricing if you're comparing plans for a team project.

FAQ

Is ClaudeBot the same as the Claude chat assistant?

No. ClaudeBot is a web crawler that fetches pages over HTTP for training and retrieval purposes. The chat assistant is the conversational product people interact with directly. They share a name but do completely different jobs.

Does a Claude bot remember previous conversations automatically?

No. The API is stateless — each request is self-contained. To maintain context across turns, your application has to resend the relevant message history with every call, which is standard practice documented at /docs/messages.

Can a Claude bot take actions, not just answer questions?

Yes, through tool use. You define functions Claude is allowed to call (like "search database" or "send email"), the model requests them when needed, your code executes the actual logic, and the result goes back into the conversation. See /docs/tools for the request/response format.

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 →