Knowledge Bases
Create a knowledge base
Create an empty knowledge base, then add documents to it.
POST
Create Kb
Only
name is required. The rest have defaults, so a minimal request is one field:
kb_type selects how the agent retrieves from it. non_deterministic is standard retrieval: the
agent synthesises an answer from the matching passages. deterministic answers only on a near-exact
match and returns the stored text verbatim, which suits content that must not be paraphrased -
pricing, policy wording, legal copy.
A knowledge base is created empty. Add content with
POST /v1/knowledge-bases/{kb_id}/documents, then
attach it to an agent by listing its id in knowledge_base_ids on
PATCH /v1/agents/{agent_id}. There is no separate attach endpoint:
the list is the attachment, so sending it replaces the whole set.Authorizations
Body
application/json
non_deterministic composes an answer from matching passages; deterministic answers only on a near-exact match and returns the stored text verbatim — which suits pricing, policy and legal copy that must not be paraphrased.
Pattern:
^(deterministic|non_deterministic)$Response
The created knowledge base.
One knowledge base.
language and kb_type are both growing enums — match on the values you know and fall through on the rest, rather than switching exhaustively.
documents is returned by get-by-id and is null in the list, the same convention as transcript on a call.
Create Kb