Skip to main content
The knowledge base is a RAG (Retrieval-Augmented Generation) document store. Upload documents with information an agent should reference during calls — product details, FAQs, pricing, opening hours, etc.

Ownership model

Documents belong to an organization, not to a single agent. Which agent may use which document is a separate grant (kb_agent_documents), managed in the Dashboard under Unternehmenswissen (Company Knowledge) and on the agent’s detail page. The endpoints stay addressed per agent (/v1/agents/{agentId}/knowledge-base) and return everything that agent can search, with a scope field: A document created through the API is assigned to the agent’s organization and granted to that agent, so it is also visible in Company Knowledge and can be granted to further agents from there.

Document lifecycle

When a document is created, the processing pipeline picks it up (pending), chunks and embeds the content for vector search and sets the status to ready. This runs asynchronously — poll the document status to check when it’s done. The status cannot be set through the API.

Data model

Endpoints

List documents

Permission: kb:read | Pagination: yes Filters:

Get document

Permission: kb:read

Create document

Permission: kb:write Creates a text-based document (source_type: manual). The content is chunked and embedded by the processing pipeline. Note: File uploads and website imports are only available through the Dashboard UI.

Update document

Permission: kb:write Updatable: title, content. If content changes, the status goes back to pending and the pipeline re-chunks and re-embeds the document. Other fields (including status) are ignored.

Delete document

Permission: kb:write | Returns 204 No Content Deletes the document and all associated chunks and embeddings.

Direct Chunk API

For advanced integrations, you can write pre-processed chunks directly to a document — replacing what the automatic pipeline produced. This is useful when your external system handles its own text splitting and embedding generation.

Chunk data model

The embedding field expects a 1536-dimensional vector compatible with OpenAI’s text-embedding-3-small model. Chunks without embeddings will not appear in vector search results.

List chunks

Permission: kb:read | Pagination: yes Returns all chunks for a specific document.

Create chunks (batch)

Permission: kb:write Insert one or more pre-processed chunks. The parent document must exist and belong to the agent.

Delete all chunks for a document

Permission: kb:write | Returns 204 No Content Removes all chunks for the given document. Useful before re-uploading updated chunks.

Typical external integration flow

Do not PATCH the document’s content afterwards — that re-triggers the pipeline, which rebuilds the chunks from content. The document status is managed by the pipeline and cannot be set via the API.

Access control

Chunk operations are scoped to your organization. You can only write chunks for agents that belong to an organization you are a member of.

Retrieval

During a call the agent searches the chunks of every document it has been granted — the documents it created through the API plus everything ticked for it in Company Knowledge. Chunks of documents the agent was not granted are never returned.

Relationship to the KB tool

For the agent to actually use the knowledge base during calls, a tool of type knowledge_base must be configured and enabled on the agent. See Tools — knowledge_base. The Dashboard automatically activates the KB tool when a document granted to the agent becomes ready and deactivates it when the agent has no ready document left.