Ingest, ask, generate — all powered by AI.
- Ingest — Upload PDF, Markdown, plain text, or import from URLs. Content is automatically parsed, chunked, and indexed for search.
- Ask — Ask questions in natural language and get answers with source citations. Supports multi-turn conversation with streaming output.
- Generate — Produce structured multi-chapter reports from the content in your knowledge base.
- Observe — Built-in tracing across every LLM call and retrieval step.
Prerequisites: Docker & Docker Compose, an OpenAI-compatible API key.
git clone https://github.com/siuhui/knowledge-studio.git
cd knowledge-studio
cp apps/api/.env.example apps/api/.env
# Edit .env: fill in KS_LLM__API_KEY and KS_EMBEDDING__API_KEY
docker compose -f infra/docker-compose.yml up -dOpen http://localhost:3000, register an account, create a knowledge base, and upload your first document.
| Service | URL |
|---|---|
| Web UI | http://localhost:3000 |
| API docs (Swagger) | http://localhost:8000/docs |
| MinIO console | http://localhost:9001 (minioadmin / minioadmin) |
Two ways to run in development
Full stack with live reload for both API and frontend. Database and MinIO data are bind-mounted to infra/data/ so they survive container teardown.
cp apps/api/.env.example apps/api/.env
docker compose -f infra/docker-compose.yml -f infra/docker-compose.dev.yml up -dRun only infrastructure in Docker, start backend and frontend manually for the fastest feedback loop.
Requirements: Python 3.12+, pnpm (for Node.js 20+).
docker compose -f infra/docker-compose.yml -f infra/docker-compose.dev.yml up -d db minio
# Backend
cd apps/api
cp .env.example .env
python -m venv .venv
source .venv/Scripts/activate # Windows Git Bash (Linux/macOS: .venv/bin/activate)
pip install -r requirements-dev.txt
uvicorn app.main:app --reload --port 8000
# Frontend (separate terminal)
cd apps/web
pnpm install && pnpm dev| Layer | Technology |
|---|---|
| Backend | Python 3.12, FastAPI, SQLAlchemy |
| Database | PostgreSQL 16 + pgvector |
| Storage | MinIO (S3-compatible) |
| Frontend | Next.js 15, React 19, Tailwind CSS v4 |
| AI | OpenAI-compatible API, Anthropic |
| Telemetry | Langfuse (OpenTelemetry) |
MIT