Skip to main content
POST
/
v1
/
knowledge
Add knowledge base
curl --request POST \
  --url http://localhost:8000/v1/knowledge \
  --header 'Content-Type: application/json' \
  --data '
{
  "user_id": "alice",
  "name": "Company Handbook",
  "chunks": [
    {
      "content": "All employees must complete onboarding within 30 days."
    },
    {
      "content": "Remote work is allowed up to 3 days per week."
    }
  ]
}
'
{
  "kb_id": "kb_3f7a1c2d9e4b",
  "chunks_stored": 2
}

Body

application/json
user_id
string
required

User identifier.

name
string
required

Human-readable name for the knowledge base.

chunks
object[]
required

List of document chunks to ingest.

agent_id
string | null
app_id
string | null
workspace_id
string | null

Response

200 - application/json

Knowledge base created

kb_id
string

The ID of the created knowledge base.

chunks_stored
integer

Number of chunks ingested.