Knowledge
Document Q&A with citations.
- PDF, Markdown, DOCX, HTML, and CSV ingestion
- BM25 + rank fusion retrieval
- Inline [S1] citations link back to the source excerpt
- Refuses to answer when the corpus has no grounding
Knowledge Q&A, customer support, transcript-based voice, and image understanding. Four capabilities in a zero-dependency, single-process Bun server you run on your own infrastructure.
Your runtime. Your storage. Your provider keys.
git clone https://github.com/sabbia-ai/sabbia
cd sabbia && cp .env.example .env
bun run src/index.ts # → http://localhost:3000Requires Bun 1.2+. Set your provider key in .env, or use SABBIA_MOCK=1 for offline inference. Setup details →
Ground answers. Route requests.
Work with transcripts and images.
Document Q&A with citations.
A customer-support agent with clear boundaries.
Transcript-mode agents for telephony integrations.
Browser audio capture is outside the product. The agent consumes transcripts; your application handles STT/TTS.
Open VoiceAsk one image to explain itself.
Upload sources, inspect citations, review guardrail verdicts, and track model calls. Use the same runtime for knowledge, support, transcript sessions, and image analysis.
Open the consoleWhat is the return window?
Returns are accepted for thirty days with a receipt. [S1]
allow“Returns are accepted for thirty days with a receipt.”
Local state and an explicit
gateway for model calls.
Static HTML, CSS, and JavaScript
Routes, agent turns, and ingestion
Event journal / SSE resume by sequenceSources, transcripts, and persisted events
text · vision · guard
Key-pool rotation + cooldownsLogical request flow. Storage is local; live model inference runs at the provider endpoint you configure.
Bun runs the TypeScript server and static console directly. No package installation or application build.
HTTP, SSE, ingestion, SQLite, and agent orchestration share one Bun process.
Knowledge answers use source labels you can open in the console’s excerpt inspector.
Every thread event is journaled with a sequence number for replay after a disconnect.
Conversation turns pass PII and safety checks before the final reply is delivered.
A round-robin key pool rotates on rate limits and transient failures, with cooldowns.
| Method | Path | Purpose |
|---|---|---|
| GET | /healthz | Check runtime, database, and provider key health. |
| GET | /api/models | Read the explicit model registry. |
| POST | /v1/threads | Create a conversation on an agent surface. |
| POST | /v1/threads/:id/turns | Submit a message and receive its SSE events. |
| GET | /v1/threads/:id/events | Replay the journal and subscribe to live SSE. |
| POST | /v1/corpora | Create a document collection. |
| POST | /v1/corpora/:id/sources | Upload a document for background ingestion. |
| POST | /v1/corpora/:id/search | Retrieve scored source passages. |
| POST | /v1/assets | Upload an image to the local object store. |
| POST | /v1/vision/analyses | Analyze one image: describe, text, table, or qa. |
| POST | /v1/voice/sessions | Start a transcript session and its voice thread. |
| POST | /v1/voice/sessions/:id/turns | Log a transcript and return the caller turn’s agent reply. |
Bun 1.2 or later, writable local storage, and a provider API key. Set SABBIA_MOCK=1 in .env to try deterministic offline inference without a key. Docker Compose is also supported.
The explicit registry includes GPT-OSS for text, Nemotron and Llama models for vision and safety, and separate fast routing roles. Live calls use your configured NVIDIA-compatible endpoint. See the full registry and token budgets.
SQLite stores conversations, transcript segments, events, and document chunks in your data directory. Original uploads live in its object store. Prompts, relevant source passages, and images used for live inference go to your configured provider. There is no telemetry.
Yes. Your telephony or audio application transcribes caller audio, sends the transcript to the Voice API, and turns the returned reply into audio. The Sabbia console accepts text; it does not capture browser audio.
No. Retrieval combines SQLite FTS5 BM25 results with a lexical fallback using reciprocal rank fusion. It does not require embeddings or a separate vector service.
Sabbia AI is licensed under Apache-2.0. You can run it on your own infrastructure and adapt it under that licence.