No per-request KB selection
Retrieval scope is a governance decision made by binding collections to groups. A caller cannot widen it by naming a collection in the request.
A knowledge base collection is a set of documents that Brutor extracts, chunks, embeds
and stores in a per-tenant vector store (Qdrant collection brutor_kb_{tenant_id}). Bind a
collection to a resource group and every chat completion made
under that group is grounded automatically: the Core Proxy retrieves the most relevant
chunks and injects them as a system message before the request reaches the provider.
| Concern | Component | Surface |
|---|---|---|
| Collections, documents, uploads, admin search preview | Control Plane (:5050) | /v1/admin/knowledge-base/... (hyphenated) |
| Source connectors and identity mappings | Control Plane (:5050) | /v1/admin/kb-connectors/..., /v1/admin/kb-connector-identities/... |
| Tenant embedding model and full re-embed | Control Plane (:5050) | PATCH /v1/admin/tenants/{tenant_id}, POST /v1/admin/tenants/{tenant_id}/re-embed-kb |
| Extraction, chunking, embedding, vector writes | KB Uploader (internal :8200) | Polls kb_documents with status = 'pending' |
| Scheduled pulls from external sources | KB Connector Sync (internal :8201) | Claims due rows in kb_connectors |
| Retrieval and context injection | Core Proxy (:8100) | POST /v1/proxy/llm/chat/completions |
| End-user browse view | Core Proxy (:8100) | /v1/portal/knowledgebases (plural, one word), /v1/portal/kb-identities |
Admin endpoints take an admin JWT (POST /v1/admin-users/tenant/login); portal endpoints
take a portal JWT (POST /v1/portal/auth/login); chat takes an API key or a portal JWT. The
admin UI for all of this is AI Estate → Resources → Knowledge Base (Collections and
Connectors).
Pick the tenant’s embedding model (once per tenant). Every collection in the tenant shares one vector space. See Embeddings & re-embedding.
Create a collection and bind it to a resource group.
curl -s -X POST http://localhost:5050/v1/admin/knowledge-base/collections \ -H "Authorization: Bearer $ADMIN_JWT" -H "Content-Type: application/json" \ -d '{"name": "sales-playbooks", "group_ids": ["group-01M61N36QYK1HVPN41KAE35PHP"]}'Details: Collections & access.
Add content: upload files (Upload & ingestion) or configure a connector (Source connectors).
Wait for status: "ready" on each document. Ingestion is asynchronous; a 201 on
upload means queued.
Chat. Any POST /v1/proxy/llm/chat/completions made under the bound group is
grounded, with no change to the request. See
Retrieval & grounding.
No per-request KB selection
Retrieval scope is a governance decision made by binding collections to groups. A caller cannot widen it by naming a collection in the request.
One vector space per tenant
The embedding model is set on the tenant (default_embedding_model_id), not per
collection. Switching it means re-embedding everything.
Embeddings are governed traffic
Ingest and query embeddings go through the Core Proxy’s
/v1/proxy/llm/embeddings, so they are logged, metered and policy-checked like any
other model call.
Tenant isolation at the vector store
Every Qdrant call carries a fresh 300-second JWT scoped to exactly one tenant’s collection, so Qdrant itself refuses cross-tenant reads.