Skip to content
Catalog

cn8/chatbot

The Chatbot service is the classic chatbot: no supervisor or sub-agents. You create a collection (knowledge base from URLs, documents, or text); that collection is registered and stored for you. Then you create chatbots linked to that collection and give each one instructions (system prompt). You open conversation sessions with those chatbots. In each session, user questions are matched against the collection using RAG; we retrieve the relevant chunks. When the question fits your rules, an LLM generates the answer and we return it via REST or SSE streaming. One collection, one or more chatbots, many sessions — simple and predictable.

Learn more about Chatbot
Chat & RAGsyncInstant previewchatragllm

Chatbot is built in your dashboard

A chatbot isn't a one-shot model run — you create it once, connect your knowledge base, and it answers grounded in your own content. Then a single API call puts it in your product.

1

Create a chatbot and connect your knowledge base

2

Tune the persona and test it live in the dashboard

3

Call it from your app with core-chat and your API key

Sign in to build

No account yet? Start free — 100 credits, no card.

Overview

The Chatbot service is the classic chatbot: no supervisor or sub-agents. You create a collection (knowledge base from URLs, documents, or text); that collection is registered and stored for you. Then you create chatbots linked to that collection and give each one instructions (system prompt). You open conversation sessions with those chatbots. In each session, user questions are matched against the collection using RAG; we retrieve the relevant chunks. When the question fits your rules, an LLM generates the answer and we return it via REST or SSE streaming. One collection, one or more chatbots, many sessions — simple and predictable.

Key capabilities

Create collections from your data

Create a collection from your Data Sources — crawled web pages or uploaded documents, added via the dashboard or the Management-key Data Sources API. It is stored and indexed for RAG so chatbots can query it.

Chatbots linked to collections + instructions

Create chatbots tied to one or more collections. Set system_message (instructions) per chatbot to define behavior, tone, and boundaries.

Conversation sessions

Each chat call opens or continues a conversation. Pass conversation_id to continue an existing thread; omit it for a new conversation. List, inspect, or delete sessions.

RAG + LLM, REST or SSE

Questions are grounded in the collection via RAG; retrieved sources are returned in enhanced_analysis. The LLM answers and you get the response in one shot (REST) or as a stream (SSE, set stream:true).

When to use it

Customer support bot

Build a collection from help center / FAQ; create a chatbot with support instructions; open conversation sessions per user. Answers are grounded in your docs via RAG, returned as REST or SSE.

Internal knowledge base

Index company docs and SOPs in a collection; chatbots with clear system_message serve employees. Sessions keep context; RAG + LLM answers within your rules.

Product or e-commerce assistant

Collection from product catalogs and reviews; chatbots linked to it. Sessions per user; RAG retrieves relevant items; LLM answers.

Education or onboarding

Course or onboarding content in a collection; chatbots with instructions and sessions. Questions answered from the collection within your rules.

Input & output

input

Collection sources (URLs or documents), chatbot configuration (system_message, temperature, model), conversation_id, and chat messages

JSON bodyURL or document references (for collections)

output

LLM-generated response grounded in collection via RAG, with enhanced_analysis (relevance scores, sources); REST or SSE

JSONSSE stream (stream:true)

Guides & tips

Optimize Collection Quality

  • Keep sources focused: A collection with 10 highly relevant pages will perform better than one with 1000 loosely related pages.
  • Update regularly: If your source content changes (e.g., help docs), update the collection to re-embed with fresh data.
  • Split by domain: Create separate collections for different topics (e.g., "billing-docs", "product-docs") and assign the right ones to each chatbot via collection_ids.

Choose REST or SSE

  • REST (core-chat): simplest integration, full response at once. Best for server-to-server, webhooks, or batch workflows.
  • SSE (core-chat with stream:true): tokens arrive as they're generated for a typing-effect UX. Same endpoint, just add "stream": true.

System Message Best Practices

  • Be specific: "You are a customer support agent for Acme Corp. Answer questions about billing, shipping, and returns." beats "You are helpful."
  • Set boundaries: "If the answer is not in the provided context, say 'I don't have that information' instead of guessing."
  • Define tone: "Respond in a friendly, professional tone. Use short sentences. Avoid jargon."
  • Add constraints: "Keep responses under 150 words unless the user asks for detail."

Field Naming Quirks

  • Collection identifier: returned as collection_id (cl_ prefix). Use this in details / update / delete and as the value of collection_ids when creating or updating a chatbot.
  • Chatbot identifier: returned as chatbot_key (cb_ prefix). Use as path parameter for chatbot endpoints. The chat endpoint takes it under the request body field `chatbot_id` — same value, different field name. (Just a naming difference to be aware of.)
  • Conversation identifier: returned as conversation_key (cv_ prefix). Pass back to chat as conversation_id (or conversation_key) to continue.

Specs

Latency
~1-3s first token (REST), streaming starts in ~500ms (SSE)
Async
false
Rate Limit
60 req/min per API key
Max Input
Per chatbot model context_window; messages typically fit in a few thousand tokens

Schema

Request body

chatbot_idrequiredstring

Chatbot identifier (cb_-prefixed value from chatbot_key). NOTE: field name is chatbot_id even though the value is what create returns as chatbot_key.

messagerequiredstring

User message

conversation_idstring

Pass an existing conversation_key (cv_ prefix) to continue a conversation. Omit or null to start a new one.

streamboolean · default: false

Set true to receive the response as SSE (OpenAI-compatible).

Response

data.conversation_keystring

Conversation identifier (cv_ prefix). Pass back as conversation_id to continue.

data.responsestring

Assistant reply text.

data.enhanced_analysisobject

RAG retrieval breakdown — { source_count, content_types, dominant_content_type, scoring_method, is_enhanced, relevance_scores: [{ content_id, content_type, relevance_score, match_count, title, url, source, summary, sections_count }] }.

Pricing

Pay only for what you use. Listing and management read operations are free.

ServiceUnitPrice
Create / Update Collectionitem$1.0/operation
Create Chatbotitem$1.0/chatbot
Update Chatbotitem$0.5/update
Chat (REST or SSE)token2 credits per 1K tokens (typical message 1-2 credits)
List, Get, Delete operationsitemFree

core-chat streaming bills per token (2 credits per 1K); non-streaming calls currently bill a negligible flat amount until token metering lands there too.

Long conversations include previous messages as RAG context, so the underlying model does more work as a thread grows — even though the billed amount stays flat for now.

FAQ

Related models