Knowledge
Knowledge is the set of documents a workspace’s agents can search and cite. Each workspace has its own private knowledge store, created the first time you add or search knowledge.
Documents
A document is upserted by (source_id, external_id): sending the same pair
again replaces it, and unchanged text is not re-embedded.
| Field | Meaning |
|---|---|
source_id | Groups documents, for example faq, website, policies. |
external_id | Your ID for the document within its source. |
kind | One of faq, doc, web, business, content, location. |
title | Shown in citations. Use titles your customers would recognise. |
text | The content. |
url | Optional link shown with the source. |
lang | sw, en or mixed; detected when omitted. |
tags, meta | Optional labels and metadata for filtering. |
Files
POST /v1/knowledge/files accepts PDF, Word (DOCX),
text, Markdown and HTML up to 30 MiB. Each file is virus-scanned (ClamAV) and
parsed in an isolated service with no internet access, then indexed in the
background. Follow progress with /v1/knowledge/jobs.
Search
Search is hybrid: semantic similarity (multilingual embeddings) and keyword matching, fused into one ranking. It works across Kiswahili and English, but a question is answered best by a document in the same language, so write knowledge in the languages your customers use.
POST /v1/knowledge/search runs the same search your
agents use. Use it to check what an agent will find before going live.
Writing good knowledge
- One topic per document, with a clear title.
- Keep facts current; delete or replace outdated documents.
- Put both languages in one document (
lang: "mixed") when customers use both. - Prefer short documents over long manuals; split manuals by section.