Skip to main content
The ks-cookbook repository is a curated collection of self-contained recipes that show Knowledge Stack solving real problems. Each recipe is a single folder with a README.md, a requirements.txt (or package.json), and a script you can run end-to-end.

github.com/knowledgestack/ks-cookbook

Browse, fork, and contribute recipes.

Run any recipe in 60 seconds

1

Clone

2

Set credentials

3

Pick a recipe and run it

RAG with citations

Chunk search → LLM answer with grounded inline citations to the source PDFs.

Bulk ingest from S3

Stream a whole bucket through /v1/documents/ingest with backpressure and workflow tracking.

Hybrid search evals

Compare dense vs. full-text vs. hybrid on your corpus with a reproducible eval harness.

LangGraph agent

Multi-tool agent that uses the MCP server to search, summarize, and tag documents.

Streaming chat UI

Next.js + assistant-ui front end consuming /v1/threads/{id}/stream (SSE).

CI ingest pipeline

GitHub Action that re-ingests changed docs on every PR using kscli.

Recipe layout

Every recipe follows the same shape so you can read one and know them all:

Contributing a recipe

We accept PRs against the cookbook repo. A good recipe:
  • runs end-to-end with KS_API_KEY + KS_BASE_URL and nothing else,
  • uses the published ksapi / @knowledge-stack/ksapi SDK or kscli,
  • ships a tiny seed dataset (no large binaries),
  • documents the why in the README.md, not just the how.