Knowledge

Manage the collections and documents that power retrieval (RAG).

A Collection groups embedded documents into a knowledge base. A Task wires a collection into its RAG configuration, and any agent using that task as a tool gets grounded answers from it. Documents are the individual files inside — created inline, uploaded, or synced from a datasource connector.

All endpoints are scoped to an organization and project and require a bearer token. See Authentication.

Two ways to add documents: an asynchronous create (returns a group_id; poll document status until ingestion completes) and a synchronous upload that returns the fully ingested documents. Collections cannot be deleted once created — remove their documents instead.

Key endpoints

POST
/api/v1/org/:org_id/project/:project_id/collection/:collection_id/query
1curl -X POST https://app.rightbrain.ai/api/v1/org/org_id/project/project_id/collection/collection_id/query \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "query": "What is the notice period for terminating a carrier contract?"
6}'
MethodEndpointPurpose
POSTCreate collectionCreate a knowledge base.
POSTQuery collectionAsk a collection a question; returns a synthesized, grounded answer.
POSTAdd to collectionManage which documents belong to a collection (a companion endpoint removes them).
POSTUpload documentsUpload files as documents synchronously.
GETDocument embeddingsInspect a document’s embedded chunks directly.