Document lifecycle
Data model
Endpoints
List documents
kb:read | Pagination: yes
Filters:
Get document
kb:read
Create document
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
kb:write
If the content field changes, the document is automatically re-chunked and re-embedded.
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 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
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
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 typeknowledge_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.
Related resources
- Agents — Parent resource
- Tools — The
knowledge_basetool type - Knowledge Base — Dashboard UI guide