Skip to main content
POST
Create Knowledge Base
Create a new knowledge base: a collection of documents your agents search when they need to ground an answer in your data.

When to create a new knowledge base

Create separate knowledge bases per domain, not per document. Small, well-scoped KBs retrieve dramatically better than one large mixed KB. Good scoping:
  • Product-Docs: product features, setup, integrations
  • Pricing-and-Plans: pricing, plan differences, discounts
  • Support-FAQs: common troubleshooting
Bad scoping:
  • All-Company-Docs: the LLM can’t tell what’s in it, so retrieval quality drops

Name and description matter

The name and description are how the agent decides whether to search this knowledge base. Be specific.
The description especially: the LLM reads it verbatim when deciding routing.

Example

Response:

Next steps

Once the KB is created, add documents:
See Add Document for the file upload flow. Then attach the KB to an agent:

Authorizations

x-api-key
string
header
required

Body

multipart/form-data
name
string
required

Human readable name of the knowledge base.

Example:

"HR Policy"

description
string
required

Description of the knowledge base.

Example:

"This knowledge base contains HR and compensation related information."

input
file

Document file to upload (.pdf, .docx, .doc, .txt, .pptx, .png, .jpg, .jpeg, .md or .json). Optional if text is provided.

text
string

As of 2025; we have increased the personal leaves to 15 per year.

Example:

"As of 2025; we have increased the personal leaves to 15 per year."

Response

Knowledge Base created successfully

id
string<uuid>

UUID of the newly created Knowledge Base

Example:

"5273e435-3cbb-4a11-9ea9-2c150ba19009"

message
string
Example:

"Knowledge Base created successfully"