Open source · self-hosted · any AI model

Run an AI assistant business from one server.

cob-rag-engine is an engine for AI chat assistants. Each business you serve gets an assistant that answers from its own documents and website, on its website and on WhatsApp, in English, Hindi and Hinglish. You run the server, you set the prices, and you keep the margin.

  • AGPL-3.0, commercial licence on request
  • One server with Docker
  • Your AI key, or a free local model
Shree LabsPathology lab · Pune
AI Talk to a person

Lipid profile ke liye fasting zaroori hai kya?

Haan. Test se pehle 10 se 12 ghante fasting rakhiye; sirf paani le sakte hain1. Home collection ₹999 se upar ke order par free hai2.

1test-prep-guide.pdf · updated 3 Oct 2home-collection.pdf

Want to book a home collection? Message the lab directly.

WhatsAppCall

Your reference: KM-4R7Q

Ask about tests, prices or home collectioncob-rag-engine by Callobuzz

Example data, drawn in HTML from the real widget's layout.

Two kinds of people run it.

Most run it as a business: they sell assistants to clinics, shops, coaching classes and service firms. Others use it as the knowledge layer under their own product or their AI agents.

Founders and agencies

Sell AI assistants under your own brand

Everything between "a business signs up" and "the business pays you" is already built. You choose the plans and the prices.

  • Your brand everywhere: name, logo and colours on the dashboard, the e‑mails and the widget.
  • Businesses sign up themselves and set up their assistant in four steps.
  • Plans, prepaid wallets and fair-use limits, in rupees or dollars.
  • Online payments through Razorpay, with numbered GST invoices and credit notes.
  • A public website for your brand, with an editor, three languages and a live chat demo. Off until you switch it on.
The one-page pitch for agencies
Developers

A knowledge layer for your app or your agents

Upload documents, ask questions, get answers with their sources. Each knowledge base has its own key, its own search index and its own model.

  • A REST API with streaming answers and an OpenAPI file.
  • Python and JavaScript clients, under MIT.
  • An MCP server, cob-rag-mcp, for Claude, Cursor, n8n and other agents.
  • No LangChain in the answer path: every step is visible and can be switched.
See the code

What you and your businesses work in.

Real screens from the current dashboard, shown in your theme. The business names and numbers are example data.

The Overview screen of the cob-rag-engine dashboard (light theme), with example data. Opens the full-size picture.The Overview screen of the cob-rag-engine dashboard (dark theme), with example data. Opens the full-size picture.

The operator's overview: questions answered, model spend in rupees, sign-ups waiting for you, and where the questions came from.

  • 4 customers, 2 sign-ups waiting
  • Questions per day, by channel
  • Model spend shown as an estimate in ₹
The Business home screen of the cob-rag-engine dashboard (light theme), with example data. Opens the full-size picture.The Business home screen of the cob-rag-engine dashboard (dark theme), with example data. Opens the full-size picture.

What a business owner sees after signing in: whether the assistant is live, today's chats and leads, and the value of the month in rupees.

  • Seven plain menu items; the rest under Advanced
  • Value this month, with the formula one click away
  • The plan and its use, at a glance
The Widget screen of the cob-rag-engine dashboard (light theme), with example data. Opens the full-size picture.The Widget screen of the cob-rag-engine dashboard (dark theme), with example data. Opens the full-size picture.

One publishable key per website, the line to paste, and the real widget answering in a preview next to it.

  • Allowed sites and rate limits per key
  • Pause or rotate a key at any time
  • The preview is the real widget.js
The Leads screen of the cob-rag-engine dashboard (light theme), with example data. Opens the full-size picture.The Leads screen of the cob-rag-engine dashboard (dark theme), with example data. Opens the full-size picture.

Contact details that visitors chose to share, with their consent, qualified by the assistant and ready to call.

  • New, contacted, won and lost
  • Hand-offs to a person, in their own tab
  • Export as CSV
The Billing screen of the cob-rag-engine dashboard (light theme), with example data. Opens the full-size picture.The Billing screen of the cob-rag-engine dashboard (dark theme), with example data. Opens the full-size picture.

The business sees its plan, what it has used this month, and add-ons it can buy online; prices show the GST.

  • Self-service plan changes
  • Add-ons and credit packs, paid through Razorpay
  • Fair-use limits shown as a share, never as your costs
The Website screen of the cob-rag-engine dashboard (light theme), with example data. Opens the full-size picture.The Website screen of the cob-rag-engine dashboard (dark theme), with example data. Opens the full-size picture.

The editor for your own marketing site: sections, colours, three languages, versions, and an 'Ask it yourself' button wired to your assistant.

  • Off until you publish and switch it on
  • Preview at phone and desktop size
  • Publish as numbered versions

From install to invoice, in six stages.

The example is a pathology lab in Pune. Every stage below is in the engine today.

  1. Step 1 of 6 · Install

    One command on a fresh server.

    The installer checks the server, installs Docker, asks for your web address and your e-mail, and starts everything behind HTTPS on that one address.

    • Ubuntu 22.04 or 24.04, or Debian 12.
    • Nightly backups, upgrades with a backup first, and one command to go back.
    • Files stay on your server's disk. S3 is an option.
    Terminal · on the server
    git clone https://github.com/callobuzz/cob-rag-engine.git
    sudo bash cob-rag-engine/deploy/install.sh
    
      your web address  chat.yourbrand.in
      your e-mail       you@yourbrand.in
      ...
      Ready. Sign in at https://chat.yourbrand.in/app
  2. Step 2 of 6 · Add a business

    The business signs up and sets up its assistant.

    A business picks a plan, verifies its e-mail and lands on a short first‑run setup. Its dashboard shows seven plain menu items; you decide per plan what else it sees.

    • Owners and members, invitations by e-mail, an audit log.
    • You approve sign-ups, or let them in at once.
    • Owners can move between plans themselves.
    See the example
    First-run setup · Shree Labs3 of 4
    • Your websiteshreelabs.indone
    • Your brochuresprice list, test preparation guidedone
    • Install the widgetone line before </body>done
    • Try itask your first questionnext
  3. Step 3 of 6 · Learn

    It reads their documents and their website.

    PDF, Word, Excel, PowerPoint, scans and audio go in. The engine splits them along their own headings, so every passage knows which section it came from.

    • OCR for scans, including Hindi.
    • It reads the business's website and checks it again for changes.
    • Duplicates are skipped; a new upload of a file becomes a new version.
    See the example
    Knowledge · Shree Labsexample
    • shreelabs.inpages read, checked again for changes42 pages
    • test-price-list.pdfa scan, read with OCR186 passages
    • test-prep-guide.pdfversion 2, updated 3 Oct31 passages
    • Questions and answerswritten by the owner18 answers
  4. Step 4 of 6 · Answer

    It answers, and it checks its own facts.

    Before a sentence reaches the visitor, every price, date, number, phone, link and name in it must appear in a cited passage. When the documents do not say, the assistant says so and offers a person.

    • On the website widget and on the business's WhatsApp number.
    • English, Hindi and Hinglish, with a model per language.
    • Greetings and small talk answered without a model call.
    See the example
    Fact check · one answerexample

    Home collection is free on orders above ₹999.

    Kept: "₹999" is in passage 2, home-collection.pdf.

    Reports are ready within 2 hours.

    Removed: no cited passage says "2 hours".

  5. Step 5 of 6 · Leads

    Visitors become leads, and a person is one tap away.

    The assistant asks for a name and number with a consent notice, and hands the chat to the business on WhatsApp, by phone or by e-mail, with a reference code so nobody repeats themselves.

    • Contact data is encrypted, and consent follows India's DPDP Act notice rules.
    • A daily digest and an instant notice for hot leads.
    • A monthly value report in rupees, with its formula shown.
    See the example
    New lead · Shree Labsexample
    Priya S.
    Phone+91 98•• ••• 210
    WantsHome collection on Saturday morning
    ConsentGiven, notice version 2
    ReferenceKM-4R7Q
  6. Step 6 of 6 · Get paid

    Every answer is metered, and the balance pays for it.

    Each business has a prepaid balance. It tops up online, each answer is charged once, and a statement shows the month. When the balance runs out, visitors get a polite message and a way to reach a person, never an error.

    • Per-question prices, or the AI cost plus your markup.
    • Spending caps, renewal notices and a profit report for you.
    • A free local model for cheap plans: no API bill for those answers.
    See the example
    Statement · October · Shree Labsexample
    • Opening balance₹0
    • Top-up through RazorpayGST invoice issued+₹2,000
    • Answers, 1,285 of themat ₹0.80 each−₹1,028
    • Closing balance₹972

The parts you would build next are already there.

One engine, one dashboard and one installer. Every row below is in the code and has automated tests.

Knowledge and search

Documents
PDF, Word, Excel, PowerPoint, HTML, Markdown, images and audio. OCR for scans, including Hindi.
Websites
Reads a business's site safely and checks pages again for changes.
Search
Meaning search and keyword search together, tested on public benchmarks.
Versions
New uploads stack as versions. Restore an old one at any time.
Models
Any provider through LiteLLM (OpenRouter, OpenAI, Anthropic, Gemini and more), or a free local model.

The assistant

Widget
One script tag, locked to the sites you list, rate-limited per visitor.
WhatsApp
Answers on the business's own WhatsApp Business number, with the same rules as the widget.
Honest answers
A fact check per sentence, an "AI" badge, and the date each source was updated.
People
A "Talk to a person" button, office hours, reference codes and handoff on WhatsApp, phone or e-mail.
Leads
Consent notices, encrypted contact data, a daily digest and a value report in rupees.

Money

Plans
Limits per plan, self-service plan changes, add-ons and credit packs.
Wallets
Prepaid balances in rupees or dollars. The ledger cannot be edited and is checked every night.
Payments
Razorpay top-ups and refunds. Every payment is checked with Razorpay before money is added.
Invoices
Numbered GST tax invoices and credit notes as PDFs.
Fair use
Faster and slower answer lanes per plan, spending caps and alerts.

Running it

Installer
One command, one domain, HTTPS, nightly backups, upgrade and rollback.
Isolation
Each business has its own keys, search index and settings. Attacks across them are refused in tests.
COB
A built-in helper in the dashboard that answers questions about the product and can do 18 actions after you confirm them.
Website and legal
A public website for your brand and eight legal page templates to edit and publish.
Demo mode
A public demo with sample data that resets every night.

Numbers you can re-run yourself.

The benchmarks live in the repository and run through the public API. The benchmark report has the method, the raw results and the commands.

0.537search quality, against 0.393 for keyword search alonenDCG@10 on six public BEIR datasets, with the earlier embedding model, bge-base-en-v1.5.
77 msmedian search timeon a plain CPU, 45 ms with a GPU, with the earlier embedding model.
412 / 412attacks refusedone business against another, with every key kind and sign-in.
2.1 GBof RAM, measured with the earlier embedding modelwith 270,000 passages indexed. Today's default, BGE‑M3, needs about 2.3 GB more: an estimate, to be measured.
Languages, measured

Measured in English, Hindi and Hinglish

The widget's own text is in English, Hindi and Hinglish; replies in Hindi and Hinglish work.

98.9%overall, on 266 held-out turns
  • English98.9%
  • Hindi100.0%
  • Hinglish97.8%
Bars: 90% overall, 85% each language
98.6%business questions keptbar 97%
100.0%right reply languagebar 95%
0.6%label calls fell backat most 5%
Fast model, defaultGPT-6 Lunaopenai/gpt-6-luna

6 of 15 models pass every bar

GPT-6 Luna: passes every bar, 98.9% overallGemma 4 26B: passes every bar, 97.7% overallGPT-4.1 Mini: passes every bar, 97.4% overallQwen3.8 27B: passes every bar, 97.0% overallgpt-oss-120b: passes every bar, 95.1% overallGPT-4.1 Nano: passes every bar, 94.0% overallDeepseek V4.1 Flash: misses a bar, 98.5% overallQwen3 Next 80B: misses a bar, 97.0% overallMistral Small 3.2 24B: misses a bar, 96.6% overallGemini 2.5 Flash Lite: misses a bar, 95.9% overallMistral Small 2603: misses a bar, 95.9% overallGemma 4 31B: misses a bar, 95.9% overallQwen3 30B 2507: misses a bar, 95.9% overallLlama 3.3 70B: misses a bar, 92.1% overallLlama 3.1 8B: misses a bar, 91.0% overall

defaultpasses every barmisses a bar

Show all 15 models
  • GPT-6 Luna (default)98.9%passes every bar
  • Gemma 4 26B97.7%passes every bar
  • GPT-4.1 Mini97.4%passes every bar
  • Qwen3.8 27B97.0%passes every bar
  • gpt-oss-120b95.1%passes every bar
  • GPT-4.1 Nano94.0%passes every bar
  • Deepseek V4.1 Flash98.5%misses a bar
  • Qwen3 Next 80B97.0%misses a bar
  • Mistral Small 3.2 24B96.6%misses a bar
  • Gemini 2.5 Flash Lite95.9%misses a bar
  • Mistral Small 260395.9%misses a bar
  • Gemma 4 31B95.9%misses a bar
  • Qwen3 30B 250795.9%misses a bar
  • Llama 3.3 70B92.1%misses a bar
  • Llama 3.1 8B91.0%misses a bar
Reply quality, answer benchmarkGemma 4 31Bgoogle/gemma-4-31b-it
90%Hindi and Hinglish items passed
100%unanswerable questions declined

Picked for writing replies. Choosing the label for a turn is the fast model's job, measured on its own above.

English, Hindi and Hinglish, measured: the default fast model openai/gpt-6-luna labels 266 held-out turns at 98.9% overall (English 98.9%, Hindi 100.0%, Hinglish 97.8%), keeps 98.6% of business questions, replies in the right language 100.0% of the time and falls back on 0.6% of its label calls, with thinking verified off; it passes every bar, as do 5 of the other 14 models tested. Reply quality is measured separately: in the answer benchmark google/gemma-4-31b-it, the Hindi and Hinglish pick, passes 90% of the Hindi and Hinglish items and declines 100% of the unanswerable ones.

See benchmarks/README.md, or the benchmark report for every model and the method.

Four ways in.

A knowledge base has a key. The key can upload, ask and read usage for that knowledge base, and nothing else.

  • REST: every route is in docs/openapi.json.
  • Python and JavaScript: the clients are in clients/, under MIT.
  • Widget: a publishable pk_ key that only chats, only on the sites you list.
  • MCP: cob-rag-mcp gives agents 52 tools and a command-line tool.
Show the code examples
Terminal · upload, then ask
# the knowledge base's own key
curl $API/api/v1/ingest -H "X-API-Key: ck_…" \
  -F file=@test-price-list.pdf
# 202 Accepted: a worker reads, splits and indexes it

curl $API/api/v1/query -H "X-API-Key: ck_…" \
  --json '{"query": "Is fasting needed for a lipid profile?"}'
# the answer, its citations and the cost of the call
Python · clients/python
from cob_rag_client import CobRag

rag = CobRag("https://chat.yourbrand.in", api_key="ck_…")
rag.ingest("test-price-list.pdf", wait=True)

answer = rag.query("Is fasting needed for a lipid profile?")
print(answer["answer"], answer["citations"])

for token in rag.query_stream("Summarise the home collection rules"):
    print(token, end="")
JavaScript · clients/js
import { CobRag } from "cob-rag-client";

const rag = new CobRag({ baseUrl: "https://chat.yourbrand.in", apiKey: "ck_…" });

const { answer, citations } = await rag.query("Is fasting needed for a lipid profile?");

for await (const token of rag.queryStream("Summarise the home collection rules")) {
  process.stdout.write(token);
}
HTML · on the business's website
<!-- one line, before </body> -->
<script src="https://chat.yourbrand.in/widget.js"
        data-key="pk_…" async></script>

Why not LangChain, LlamaIndex or Dify?

LangChain and agent SDKs (OpenAI Agents SDK, Claude Agent SDK, LangGraph) are toolkits for building AI. cob-rag-engine is the finished knowledge platform and chatbot business your agents and your customers use: install it and sell AI assistants the same day.

Say it in four lines
  1. LangChain, LlamaIndex and the agent SDKs give you parts to build with; cob-rag-engine is the finished knowledge platform: customers, keys, documents, fact-checked answers, a website widget and billing, already built and tested.
  2. They are not rivals: your LangChain, LlamaIndex, OpenAI or Claude agent plugs into it over MCP and uses it as its governed knowledge base.
  3. Dify is a full platform too, but it is built for designing apps, and its licence needs written authorization to run it for many customers; cob-rag-engine is built to resell, with plans and billing, Hindi and Hinglish, WhatsApp and DPDP consent, and answers that stay inside the customer's own documents.
  4. So you sell assistants from day one instead of building the platform under them, and if all you need is a one-off prototype, LangChain alone is the right call.

What cob-rag-engine gives you

cob-rag-engine compared with LangChain, LlamaIndex, Dify and agent SDKs
Compared oncob-rag-engineLangChainLlamaIndexDifyAgent SDKs
What it isA self-hosted knowledge platform and chatbot serviceAn open-source library of parts for AI appsA framework for ingesting, indexing and retrieving data (paid hosted LlamaCloud and LlamaParse)An open-source platform to build LLM apps visually: workflows, agents, knowledge baseLibraries that run an agent: model, tools, loop
Time to a working chatbot businessInstall, create a customer, upload documents, paste one script tagYou build the app, accounts, interface and billing around itYou build the product around the retrievalQuick for your own app in its builder; reselling needs its written authorizationYou build the product around the agent
Multi-customer platformTenants, per-knowledge-base keys, roles, plans; isolation tested, 412 of 412 attempts refusedNot part of the libraryNot part of the frameworkMulti-tenant operation needs Dify's written authorization (modified Apache 2.0)Not part of the SDKs
Document pipeline, including Hindi OCRParsing, OCR with Hindi, cleanup, near-duplicate review, versionsLoaders you choose and wire upStrong loaders and parsing; Hindi OCR is yours to set upKnowledge base and pipelines; scans depend on pluginsNot what they are for
Grounded answers, no made-up factsConfidence gate and a sentence-by-sentence fact check; says "I don't know"You write the checksYou write the checksRetrieval and citations; checks are built in your workflowGuardrail hooks; you write the checks
Website widget, leads, WhatsAppWidget and WhatsApp answers, leads with DPDP consent, handoff to a personNot part of the libraryNot part of the frameworkEmbeddable chat app; leads and handoff are yours to buildNot part of the SDKs
BillingPlans, wallets, per-question or cost-plus pricing, Razorpay payments, GST invoicesNot part of the libraryNot part of the frameworkApp logs; not a billing system for your customersNot part of the SDKs
Dashboard and in-app assistantDashboard, COB and in-app docsNot part of the libraryNot part of the frameworkIts own studio and consoleNot part of the SDKs
Works with agentsYes: MCP (52 tools), REST, Python and JS SDKs, read-only named keysYes, it is an agent toolkitYes, it has agents tooBuilds agents itself and has APIsYes, it is the agent loop

Facts from each project's own licence, documentation and repository. Dify's licence was checked on 5 October 2026. RAGAS, used by the optional evaluation add-on, brings LangChain in for quality scoring only.

Open source, with a commercial licence on request.

The engine and the dashboardsrc/, services/
AGPL-3.0
The Python and JavaScript clientsclients/js, clients/python
MIT
The widget scriptsthe code that loads on a business's website
MIT
The MCP servercob-rag-mcp, its own repository
MIT

What AGPL-3.0 means in practice. You can run the engine, change it, and sell services with it. If you change the engine and let other people use the changed version over a network, you must publish your changes under the same licence.

Why the client parts are MIT. They go into other people's websites and apps. MIT keeps those websites and apps free of any AGPL condition.

A commercial licence is for companies that cannot accept the AGPL-3.0 conditions. Contact Callobuzz.

Contributions are welcome under the contributor licence agreement.

What it does not do yet, and what comes next.

So you can decide before you build on it, not after.

Not in the code yet

  • Release 0.2.0: automated tests, no full live run yetThe engine has run real deployments before. This release passed its automated tests (about 19,000 unit tests, about 400 integration tests and the dashboard's tests), but the newest parts (online payments, WhatsApp answers, the public website and the installer) have not yet had a full live run on a fresh server. That run is next. If something breaks, please open an issue on GitHub.
  • No live takeover inboxYour team cannot chat with a visitor inside the dashboard yet. A visitor who wants a person gets WhatsApp, a call or e-mail.
  • No voice assistantThere is no phone or voice channel.
  • No Drive, Notion or Confluence connectorsUpload files, read a website, or push records through the API.
  • No single sign-onSign-in is e-mail and password, with owner and member roles.
  • Razorpay only, and tested against a simulatorNo Stripe yet. Payments and WhatsApp were tested against simulated Razorpay and Meta servers, not live accounts.
  • One server, no hosted versionDocker Compose on one server is the supported path, and there is no Kubernetes chart. There is no hosted cob-rag-engine: you run it yourself.

Coming next, in this order

  • NextLive chat and a bot teamAn inbox where staff take over a chat, and named specialist bots with a visible handover.
  • PlannedGraphRAG and imagesAnswers that join facts across documents, and diagrams and pictures as searchable content, as optional add-ons.
  • PlannedAgents that do thingsBooking a home collection or checking an order. Agent mode and web search exist in the code but are not in the API yet.
  • LaterData connectorsGoogle Drive, Notion and Confluence, with incremental sync.

Put it on a server, or try it on your computer.

On a server

A fresh Ubuntu 22.04 or 24.04, or Debian 12, and a domain that points at it. The requirements page lists the server sizes.

Terminal · on the server
git clone https://github.com/callobuzz/cob-rag-engine.git
sudo bash cob-rag-engine/deploy/install.sh

Add --dry-run to see every step without changing anything.

On your computer

Windows, macOS or Linux with Docker. The wizard asks a few questions, writes the settings with new secrets, and you start the stack.

Terminal · on your computer
git clone https://github.com/callobuzz/cob-rag-engine.git
cd cob-rag-engine
make setup            # or: python scripts/setup.py
docker compose up -d --build

The step-by-step guide covers the first sign-in, your first business and its widget.