On this page

Overview and architecture

ContextBase indexes documents and returns matching passages or answers with sources. Each Space has its own models, pipelines and access rules.

C4 containers

ContextBase container diagram. The web UI, CLI, SDKs and MCP client call Django. Redis delivers background jobs to Celery workers. The API and workers use the Extractor, storage backends and model services.

C4 container diagram · Full-size SVG

Path of a document

ContextBase saves the original, extracts text, splits it into passages and writes search data to the Space’s indexes. The built-in decoder reads UTF-8 text files. For PDFs, Office files and scans, the API and workers can send files over HTTP to the separate ContextBase Extractor service.

A regular REST upload processes the file in the request. In a managed Space, a dedicated command to upload or replace an original queues the work. Celery workers receive document processing, reindexing and evaluation jobs through the Redis broker.

Documents and indexing · Background workers

Path of a request

The web UI, CLI and SDKs call the REST API built with Django Modern REST. An agent’s MCP client sends JSON-RPC over HTTP to the /mcp route in the same Django application.

Django checks access, runs the Space’s retrieval pipeline and returns ranked passages with their sources. To generate an answer, the pipeline passes the question and matching passages to the configured language model.

Integrations · Retrieval and answer generation

Data and storage

  • PostgreSQL holds settings, access rules and metadata. Dense vectors default to PostgreSQL with pgvector. Each Space can use another vector backend such as Qdrant, Chroma or Weaviate.

  • Originals live in the filesystem or an S3-compatible store. The quickstart uses the minio service with the Silo image.

  • Redis backs the Celery queues and Django’s shared production cache. By default, the broker and cache use separate logical databases.

Connections and storage

Choose a starting point

Task

Guide

Run a search on a sample handbook

Installation and quickstart

Connect an existing vector collection

Connections and storage

Call document search from an application or agent

Integrate ContextBase for REST, SDKs and MCP

Tune retrieval on your own questions

Search and answers and Evaluate retrieval and answers

ContextBase0.1.0

Search the documentation