Skip to main content
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

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

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).
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.
Watch the workflow finish:
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.

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.

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

2

Configure secrets

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

Generate TLS certs

4

Start the stack

5

Point your client at it

Interactive docs: https://localhost:18000/api/docs

Common make targets