Create Knowledge Base
POST /knowledge-basesOne empty set, with a ceiling, an owner and an embedding model.
The model defaults to this deployment’s embedder rather than to a literal: a base created naming a model nothing here can produce is a base every write fails against.
Request body — KnowledgeBaseCreate
Section titled “Request body — KnowledgeBaseCreate”| Field | Type | Notes | |
|---|---|---|---|
slug | string | required | min length 1 max length 120 |
name | string | required | min length 1 max length 200 |
scope | workspace | organization | platform | optional | Default "workspace". |
kind | string | optional | Default "general". min length 1 max length 60 |
owner_agent_id | string (uuid) | null | optional | — |
owner_persona_id | string (uuid) | null | optional | — |
is_private | boolean | optional | Default false. |
subject_kind | user | guest | null | optional | — |
subject_id | string | null | optional | max length 200 |
embedding_model | string | null | optional | max length 120 |
consolidation | object | null | optional | — |
Responses
Section titled “Responses”| Status | Description | Body |
|---|---|---|
201 | Successful Response | KnowledgeBaseView |
422 | Validation Error | HTTPValidationError |
Example
Section titled “Example”The body shows the fields the schema always carries. Which combination is legal is a service rule the schema cannot express, so read the description above before copying this.
curl -X POST https://your-deployment.example.com/knowledge-bases \ -H "Authorization: Bearer $COBRE_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "slug": "string", "name": "string" }'Response — KnowledgeBaseView
Section titled “Response — KnowledgeBaseView”| Field | Type | Notes | |
|---|---|---|---|
id | string (uuid) | required | — |
slug | string | required | — |
name | string | required | — |
scope | workspace | organization | platform | required | — |
kind | string | required | — |
owner_agent_id | string (uuid) | null | required, nullable | — |
owner_persona_id | string (uuid) | null | required, nullable | — |
is_private | boolean | required | — |
is_frozen | boolean | required | — |
embedding_model | string | required | — |
embedding_dim | integer | required | — |
item_count | integer | required | — |
subject_kind | user | guest | null | required, nullable | — |
subject_id | string | null | required, nullable | — |
last_consolidated_at | string (date-time) | null | optional | — |
curation_counts | object | null | optional | — |
created_at | string (date-time) | required | — |
updated_at | string (date-time) | required | — |