Skip to main content

Documentation Index

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

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

This is the fastest path from a fresh account to a working ingest-and-search loop. Every step shows the same call in four flavors so you can use whatever fits your stack.
Prefer to read the contracts first? Browse the API Reference — it’s generated from the same openapi.yaml that powers the SDKs.

1. Install your client

uv tool install kscli
kscli --version

2. Get an API key

1

Open the dashboard

Sign in at app.knowledgestack.ai. Use email/password or Google SSO.
2

Create the key

Avatar → My AccountAPI KeysCreate API key. Keys start with sk-user- and are shown exactly once — copy immediately.
3

Save it where your client expects it

kscli login --api-key sk-user-xxxxxxxxxxxxxxxx
kscli whoami
Self-hosting? See Self-hosted setup below — KS_BASE_URL becomes https://localhost:18000 and signin uses /v1/auth/pw/signin with a session cookie instead of a bearer token.

3. Create a folder

Folders organize your corpus and scope every later operation. They live at POST /v1/folders (API ref).
kscli folders create --name "Quickstart"
kscli folders list --format yaml   # grab the path_part_id
Every folder has two UUIDs: id (the record) and path_part_id (its position in the tree). Use path_part_id whenever you need a parent — ingesting a document, creating a subfolder, or scoping a search.

4. Ingest a document

POST /v1/documents/ingest is multipart — it accepts the file and returns a workflow ID. The Temporal worker converts, chunks, and embeds in the background.
kscli documents ingest \
  --file ./report.pdf \
  --path-part-id <folder-path-part-id> \
  --name "Q4 Report"
Watch the workflow finish:
kscli workflows list --limit 5
kscli workflows describe <workflow-id>
Once status is COMPLETED, chunks are searchable via POST /v1/chunks/search. Default mode is dense vector similarity; pass search_type=hybrid for vector + BM25 reranked.
kscli chunks search \
  --query "what drove revenue growth" \
  --parent-path-ids <folder-path-part-id> \
  --limit 5

6. Chat with streaming citations

Threads (/v1/threads) are stateful conversations grounded in your documents. Messages stream back as Server-Sent Events with inline citations to the chunks that produced each answer.
kscli threads create --title "Earnings deep-dive"
kscli threads chat <thread-id> --message "Summarize the report" --stream

Where to next

Cookbook recipes

Runnable end-to-end examples — RAG, citations, evals, agent workflows.

kscli reference

Every command, output format, and scripting trick.

Python SDK

Generated from the OpenAPI spec — fully typed, async-ready.

TypeScript SDK

Tree-shakeable client for browsers and Node.

MCP server

Drop into LangGraph, Claude Desktop, Cursor, OpenAI Agents.

Architecture

How ingestion, search, and threads fit together.
Want a guided tour on your own data? Book a 30-minute demo and we’ll walk through ingestion, search, and chat with a founding engineer.

Self-hosted setup

Running Knowledge Stack on your own hardware? You’ll need Python 3.12+, uv, Docker + Compose, and mkcert for local HTTPS.
1

Install dev deps

make install-dev
2

Configure secrets

cp .env.secrets.example .env.secrets
At minimum: OPENAI_API_KEY, JWT_SECRET_KEY. See .env.secrets.example for the full list.
3

Generate TLS certs

make certificates
4

Start the stack

make dev-stack   # Postgres, Temporal, MinIO, Nginx
make seed        # apply migrations + sample data
make dev-api     # API on :8000 / https on :18000
make dev-worker  # required for ingestion
5

Point your client at it

export KS_BASE_URL=https://localhost:18000
kscli --base-url https://localhost:18000 folders list
Interactive docs: https://localhost:18000/api/docs

Common make targets

CommandPurpose
make testRun integration tests
make e2e-api + make e2e-testEnd-to-end suite
make lint / make fix / make typecheckCode style + types
make migration / make migrate-up / make migrate-downDB migrations
make apispecRegenerate openapi.yaml
make sdk-api-python / make sdk-api-tsRegenerate SDK clients