Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.powabase.ai/llms.txt

Use this file to discover all available pages before exploring further.

Knowledge bases provide semantic search over your document content. They store chunked and embedded text from one or more sources, enabling retrieval-augmented generation (RAG). When you add a source to a knowledge base, the platform automatically chunks the source’s page texts, generates vector embeddings, and stores them for similarity search.

Common Patterns

Create a knowledge base, add one or more sources to trigger indexing, then use the search endpoint to query. Check indexing status by fetching the knowledge base details. Reindex when you change chunking parameters or want to re-process sources.

GET /api/knowledge-bases

List all knowledge bases.
response = requests.get(f"{BASE_URL}/api/knowledge-bases", headers=headers)

POST /api/knowledge-bases

Create a new knowledge base.
{
  "name": "Product Docs",
  "description": "Product documentation"
}
response = requests.post(f"{BASE_URL}/api/knowledge-bases", headers=headers, json={"name": "Product Docs"})

GET /api/knowledge-bases/

Get a knowledge base with its indexed sources and status.
id
string
required
KB ID
response = requests.get(f"{BASE_URL}/api/knowledge-bases/{kb_id}", headers=headers)

PATCH /api/knowledge-bases/

Update knowledge base configuration or strategy.
id
string
required
KB ID
response = requests.patch(f"{BASE_URL}/api/knowledge-bases/{kb_id}", headers=headers, json={"description": "Updated"})

DELETE /api/knowledge-bases/

Delete a knowledge base and all its indexed data.
id
string
required
KB ID
response = requests.delete(f"{BASE_URL}/api/knowledge-bases/{kb_id}", headers=headers)

POST /api/knowledge-bases//sources

Add a source to the knowledge base. Triggers asynchronous indexing.
id
string
required
KB ID
{ "source_id": "source-uuid" }
response = requests.post(f"{BASE_URL}/api/knowledge-bases/{kb_id}/sources", headers=headers, json={"source_id": source_id})

POST /api/knowledge-bases//reindex

Reindex all sources in the knowledge base.
id
string
required
KB ID
response = requests.post(f"{BASE_URL}/api/knowledge-bases/{kb_id}/reindex", headers=headers)

POST /api/knowledge-bases//search

Run a semantic vector search against the knowledge base.
id
string
required
KB ID
{ "query": "search text", "top_k": 5 }
response = requests.post(f"{BASE_URL}/api/knowledge-bases/{kb_id}/search", headers=headers, json={"query": "search text", "top_k": 5})

Error Responses

StatusCodeDescription
400invalid_configInvalid chunking or embedding configuration
404kb_not_foundNo knowledge base exists with the given ID
409already_indexingThe knowledge base is already being indexed — wait for completion before reindexing