BotStudio9
File RAG Agent

Document Search

Finds matching passages in documents for retrieval and AI search.

Open the workspace

Connect your own AI key and ask in plain language.

Latency (measured)
2.88 ms
Throughput (measured)
347/sec
Price
$600

Measured on win32-x64 (ZachsNitro · 13th Gen Intel(R) Core(TM) i5-13420H · 12 threads) · 2026-10-18 · 1,000 iterations · one hybrid query (vector + BM25, top 5) over 6000 chunks · per-task p50 2634 µs, p95 4731.2 µs, p99 6252.2 µs

About this bot

File RAG Agent is a C++20 retrieval engine that indexes your own documents and answers questions with the passages they came from. It reads PDF, Word (.docx), PowerPoint (.pptx), OpenDocument (.odt), HTML and plain text with no outside library, so nothing is uploaded and nothing needs installing beyond the program. The offline workspace opens in your browser and runs the same engine in WebAssembly. Encrypted PDFs are reported rather than guessed at, and scanned PDFs have no text to read.

Code preview

first 100 lines of src/ragagent/store.py - python - 21 files - 159 lines in the archive
src/ragagent/store.pypython
1"""The index: SQLite, one file, no server.
2
3Design notes worth knowing before you change anything here:
4
5* **Postings, not stored vectors.** For the sparse embedder the index is an
6 inverted list (`term -> chunk, count`). A query then touches only the chunks
7 containing its terms instead of every chunk in the corpus, which is the
8 difference between a search that stays fast at 100k chunks and one that does
9 not. Dense vectors, when that embedder is used, are stored on the chunk row
10 and scanned — brute force is honest at this scale and there is no ANN index
11 pretending to be exact.
12
13* **Content hashing.** A document is keyed by the hash of its bytes, so
14 re-ingesting an unchanged file is a no-op and re-ingesting a changed one
15 replaces its chunks rather than duplicating them.
16
17* **One transaction per ingest.** An interrupted ingest leaves the index exactly
18 as it was, never half-updated.
19"""
20
21from __future__ import annotations
22
23import hashlib
24import json
25import sqlite3
26import time
27from dataclasses import dataclass
28from pathlib import Path
29
30from .chunking import Chunk, ChunkConfig, Document
31from .embed import Embedder, HashingTfidfEmbedder, Vector, tokenize
32
33SCHEMA_VERSION = 1
34
35SCHEMA = """
36CREATE TABLE IF NOT EXISTS meta (
37 key TEXT PRIMARY KEY,
38 value TEXT NOT NULL
39);
40
41CREATE TABLE IF NOT EXISTS documents (
42 id INTEGER PRIMARY KEY,
43 path TEXT NOT NULL UNIQUE,
44 title TEXT NOT NULL DEFAULT '',
45 kind TEXT NOT NULL DEFAULT 'text',
46 hash TEXT NOT NULL,
47 meta TEXT NOT NULL DEFAULT '{}',
48 added_at REAL NOT NULL
49);
50
51CREATE TABLE IF NOT EXISTS chunks (
52 id INTEGER PRIMARY KEY,
53 document_id INTEGER NOT NULL REFERENCES documents(id) ON DELETE CASCADE,
54 idx INTEGER NOT NULL,
55 text TEXT NOT NULL,
56 heading TEXT NOT NULL DEFAULT '',
57 start INTEGER NOT NULL,
58 end INTEGER NOT NULL,
59 tokens INTEGER NOT NULL,
60 vector TEXT
61);
62
63CREATE INDEX IF NOT EXISTS chunks_document ON chunks(document_id);
64
65CREATE TABLE IF NOT EXISTS postings (
66 dimension INTEGER NOT NULL,
67 chunk_id INTEGER NOT NULL REFERENCES chunks(id) ON DELETE CASCADE,
68 count INTEGER NOT NULL
69);
70
71CREATE INDEX IF NOT EXISTS postings_dimension ON postings(dimension);
72CREATE INDEX IF NOT EXISTS postings_chunk ON postings(chunk_id);
73"""
74
75
76@dataclass
77class IngestReport:
78 added: int = 0
79 updated: int = 0
80 unchanged: int = 0
81 chunks: int = 0
82 skipped: list[tuple[str, str]] = None # type: ignore[assignment]
83 seconds: float = 0.0
84
85 def __post_init__(self) -> None:
86 if self.skipped is None:
87 self.skipped = []
88
89 def summary(self) -> str:
90 parts = [
91 f"{self.added} added",
92 f"{self.updated} updated",
93 f"{self.unchanged} unchanged",
94 f"{self.chunks} chunks",
95 ]
96 if self.skipped:
97 parts.append(f"{len(self.skipped)} skipped")
98 return ", ".join(parts) + f" in {self.seconds:.2f}s"
99
100

This is the real file from the archive you receive, with your listing's metadata already substituted.

What is in the archive

  • LICENSE.txt
  • bs9-manifest.json

Licence options

Every licence ships the same source. What differs is how far you may deploy it and whether you may put your own brand on it.

Personal is for one person on one deployment, not for business use. Commercial costs more because it covers your whole organisation on up to 3 deployments, including services you sell to your own clients: the same code, with the rights a business needs.

This listing is $600 — Pro build tier. The price decides what is in the archive; the licence marked below decides what you may do with it, and is the one that ships in your LICENSE.txt.

LicencePriceDeploymentsWhite-labelIncluded
Personal - Single deployment
This listing
$600 one-time1No
  • 1 person, 1 deployment
  • Personal, non-commercial use
  • No client resale
  • No white-label
Commercial - Team use
$1,200 one-time3No
  • Up to 3 deployments
  • Any number of users in one organisation
  • Commercial use, including services you sell
  • No source resale or sublicensing
  • No white-label
Agency Bundle - 5 Client Pack
$5,000 one-time
(all bots · contact sales)
Email to buy
5No
  • Up to 5 client deployments
  • Per-client keys
  • Agency use allowed
  • Email support
  • No white-label
Agency Unlimited ($7500 one-time)
$7,500 one-time
(all bots · contact sales)
Email to buy
UnlimitedNo
  • Unlimited deployments
  • Unlimited keys
  • Agency use allowed
  • Priority support
  • All future updates
  • No white-label
Enterprise / White-label (Custom)
CustomRequest a quoteUnlimitedYes
  • Everything in Agency Unlimited
  • Full white-label with your logo
  • Custom domain
  • Source code option
  • Dedicated support
  • Custom SLA

Personal and Commercial are sold here. Agency and Enterprise cover every bot in the catalogue and are arranged by email: use the button on that row and we reply with a payment link. Questions first? Contact us.

Enterprise is quoted rather than listed. The licence that ships in your archive's LICENSE.txt is the one marked above. Licence prices are what each grant is worth; checkout charges this listing's price, once.

Questions before you buy

+Can I try it before I buy?
Yes. The live terminal on this page runs the same engine the download ships, on our server. Paste your own numbers into it; nothing you type is kept.
+Does it run on Mac or Linux?
The download includes a ready-to-run program for Windows, Linux, macOS.
+Can my team use it?
Personal is 1 person, 1 deployment, not for business use. Commercial covers one organisation: any number of its staff, up to 3 deployments, commercial use including services you sell. Need more deployments or client use? The Agency licences in the table above are arranged by email.
+Are updates included?
You buy this version with its full source, and it keeps working without us. Personal and Commercial do not include future updates; Agency Unlimited does.
+What if it does not work?
Before you download, you can have a full refund within 14 days for any reason. After download, you are refunded if the archive does not build from its own README, a feature named on the listing is missing or broken, or the licence does not match - a fix is offered first. Full terms: refund policy.
Read from the source

What's inside

File RAG agent: 107KB of source (2,651 lines of logic, 14 files), plus the shared agent core. Everything below is counted from that code — nothing on this list comes from the listing text.

5 commands you can run
  • bot bench
  • bot benchmark
  • bot index
  • bot info
  • bot query
Tests
None ship with this engine yet.
Output
readable text · JSON
Speed
Measured: 2.88 ms mean / 347/sec — win32-x64, 2026-10-18, 1,000 iterations, one hybrid query (vector + BM25, top 5) over 6000 chunks. The live test below runs on this site's server, which has fewer cores than the build machine, so its timings are lower than this.
Outright purchase

What's inside the zip

The download is the real program and its full source, yours to keep. The terminal further down this page is a separate, read-only demo copy of the same engine: it keeps nothing and cannot write files.

offline-hybrid-retrieval-engine/
  (the START files are one folder up, beside App/; everything below is in App/)
  START_HERE.bat / start_here.command / start_here.sh   opens the workspace in your browser
  workspace/                   the workspace page, with the engine and a terminal inside it
  START_TERMINAL.bat / .command / .sh   the program itself, in a terminal window
  COMMANDS.txt                 every command, with examples
  README.md                    build, run, test, licence notes
  bin/bot.exe (or bot-macos / bot-linux)   the program, ready to run
  src/, include/ ...             the full C++ source you own
  LICENSE.txt                  what your licence allows

How it works

  1. 1Download the zip

    Unzip it anywhere. No installer, no account.

  2. 2Double-click START_HERE

    Or run the commands below from a terminal in that folder.

  3. 3Read the output

    It indexes three short documents in memory, asks how to rotate the signing key, and checks that the document about keys comes back first. Offline: no files are read or written.

All commands

Click one to put it in the live terminal below, or to copy it for the download. The full list, with every option, is COMMANDS.txt in the zip and bot --help.

  • Index every supported text file under the folder docs and save the index as corpus.bs9
  • The five best passages for a question, with the blended, vector and BM25 scores
  • BM25 only, as JSON for another program or a language model's prompt
  • Documents, chunks, vocabulary and memory of a saved index
  • Ingest a folder without saving and report files/s and MB/s on this machine
  • The standard measurement: the same one the published figure comes from
  • Self-test: three documents in memory, one question, the right one first

Live output

Captured from a real run of bot --run-test on linux-x64 (the Linux x64 prebuilt program, prebuilt/file-rag-agent/bot-linux), 2026-10-05. Unedited.

  • self-test ok (top hit keys.txt, score 0.784745)
Full output
$ bot --run-test
self-test ok (top hit keys.txt, score 0.784745)

What the price buys

  • ✓ The full C++ source - you own your copy
  • ✓ A single ready-to-run program, no dependencies
  • ✓ Pay once and keep it
  • ✓ Runs offline, on your machine; your numbers never leave it
Personal
$600

One person, one deployment, personal use. The same program and source.

Commercial
$1,200

One organisation, any number of its staff, up to 3 deployments, commercial use - including services you sell. No source resale, no white-label.

Both licences ship the identical archive; the difference is what you may do with it.

Subscription workspace

Ask in plain language, or speak your question.

Type or speak a request. The engine answers from its own expert brief, using the AI key you connect (Gemini, OpenAI or Anthropic). Your key stays on your computer. Subscribers also get the desktop app.

  • Connect your own AI key once, on the Connect AI tab.
  • The engine never shows its code or file names.
  • Works in your browser, and as the desktop app with a subscription.
TEST IT - LIVE RUN

This listing ships its own engine tree, which does not have a live test build yet.