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
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
kb:read | Pagination: yes
Filters:
Get document
kb:read
Create document
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
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
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
kb:read | Pagination: yes
Returns all chunks for a specific document.
Create chunks (batch)
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
kb:write | Returns 204 No Content
Removes all chunks for the given document. Useful before re-uploading updated chunks.
Typical external integration flow
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 typeknowledge_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.
Related resources
- Agents — Parent resource
- Tools — The
knowledge_basetool type - Knowledge Base — Dashboard UI guide