Skip to main content

Knowledge Bases

Manage knowledge bases (documents) that agents can reference.

List Knowledge Bases

Returns data (array of knowledge base objects) and meta.

Get Knowledge Base

Returns data (knowledge base object with id, name, etc.) and meta.

Create Knowledge Base

Create a knowledge base with either inline text or a file upload. At least one of content or file is required. Max file size 50MB. Allowed types: PDF, TXT, DOCX, MD.

Request Body

FieldTypeRequiredDescription
namestringYesDisplay name for the knowledge base
contentstringNo*Inline text content (use this or file)
fileobjectNo*File upload: filename, data (base64), content_type (e.g. application/pdf, text/plain, application/vnd.openxmlformats-officedocument.wordprocessingml.document, text/markdown)
* At least one of content or file is required.

Example (inline)

{
  "name": "FAQ",
  "content": "Q: Hours? A: 9–5. Q: Returns? A: 30 days."
}

Example (file)

{
  "name": "Policy PDF",
  "file": {
    "filename": "policy.pdf",
    "data": "<base64-encoded file content>",
    "content_type": "application/pdf"
  }
}
Response: 201 Created with data (knowledge base object) and meta.

Update Knowledge Base

Body: name (optional). Only included fields are updated.

Delete Knowledge Base