Create a knowledge base
Create an empty knowledge base, then add documents to it.
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.
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
Your API key as a Bearer token, e.g. Authorization: Bearer vk_….
Body
What to call this knowledge base.
1 - 255Your own note about what is in it.
english or multilingual, matching the content you will upload.
^(english|multilingual)$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.
^(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.
The knowledge base's id. List it in an agent's knowledge_base_ids to attach it.
What it is called.
Your own note about what is in it.
The language its content is in.
How answers are produced: 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.
How many documents it holds.
When it was created (UTC, ISO 8601).
When it last changed (UTC, ISO 8601).
The documents themselves, with their ingestion status.