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

Document lifecycle

When a document is created, it’s automatically chunked and embedded for vector search. This process runs asynchronously — poll the document status to check when it’s ready.

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. The content is automatically chunked and embedded. Note: File uploads (PDF, DOCX, XLSX, PPTX) are only available through the Dashboard UI.

Update document

Permission: kb:write If the content field changes, the document is automatically re-chunked and re-embedded.

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 an agent’s knowledge base — bypassing the automatic chunking pipeline. 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

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.

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 documents become ready and deactivates it when no ready documents remain.