Skip to main content

ContextCrate

ContextCrate is an open-source, self-hosted retrieval-augmented generation (RAG) platform. It ingests websites and Git repositories, turns them into searchable context, and answers questions from that context with citations you can trace back to the original source. Your content, your indexes and your credentials stay on infrastructure you control.

What you can do with it​

  • Collect sources. Crawl websites (plain HTTP or a headless browser, with robots policy and login support) and import Git repositories, including source code and images.
  • Search precisely. Combine keyword (BM25) and semantic (vector) search, optionally with a cross-encoder reranker.
  • Get grounded answers. Ask questions in the built-in chat, over the REST API, or from any OpenAI-compatible client, and get streamed answers with inline source citations.
  • Plug into your tools. Expose a crate to AI assistants through MCP, or point Open WebUI, LiteLLM or an OpenAI SDK at its chat/completions endpoint.
  • Keep teams apart. Every team or use case gets its own crate with separate sources, members, settings and indexes.
  • Run it your way. One container on a laptop, or independently scaled roles on Kubernetes.

Key concepts​

ConceptMeaning
CrateThe isolation and collaboration boundary. A crate owns sources, documents, settings, members, API keys and its own search index. See Crates.
SourceA website or Git repository, with its endpoint and credentials.
Ingestion jobA named configuration for a source: scope, filters, limits, chunk size, schedule. One source can have several jobs.
RunOne execution of a job. Runs snapshot the configuration, so later edits never change a finished run.
DocumentThe cleaned, versioned text of one page or file, produced by parsing.
ChunkA passage of a document, the unit that is embedded, searched and cited. See Chunking.
Index generationA versioned search index. Changing the embedding model builds a new generation while the old one keeps serving.
Member and keyPeople have a role in a crate (Viewer, Editor, Owner). Services use cc_ API keys. See Authorization.

How it works​

Sources are fetched by workers, parsed into clean documents, cut into chunks and indexed. At question time, ContextCrate retrieves the best chunks, optionally reranks and grades them, and an answer model writes the response from those chunks only. The full picture is in Architecture.

Deployment modes​

ModeRuns onFor
StandaloneOne process with file-backed H2, a database queue, filesystem artifacts and LuceneEvaluation, small teams, moderate crawls
DistributedIndependently scalable roles with PostgreSQL, RabbitMQ, S3-compatible storage and OpenSearchProduction on Kubernetes

Both modes share the same domain model, so a crate can be exported from one and imported into the other. See Installation.

How this documentation is organised​

The documentation has three sections, each aimed at a different reader.

SectionForStart here
ArchitectureAnyone who wants to understand the concepts and how the parts fit togetherArchitecture, then Crates, Pipeline, Authorization
Installation and administrationAdministrators who install, configure, secure and operate ContextCrateInstallation, then Configuration, Security, Operations
UsagePeople who create crates, ingest sources, search, chat and integrateUsing ContextCrate, then Tutorials and the features

Not sure where to begin?