Skip to Content
The Ngamia platform API is in preview. Endpoints may change before general availability.
ConceptsKnowledge

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.

FieldMeaning
source_idGroups documents, for example faq, website, policies.
external_idYour ID for the document within its source.
kindOne of faq, doc, web, business, content, location.
titleShown in citations. Use titles your customers would recognise.
textThe content.
urlOptional link shown with the source.
langsw, en or mixed; detected when omitted.
tags, metaOptional 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 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.