█

AI/TLDR

Buy me a coffee
Buy me a coffee

Cognita

TrueFoundry's modular, API-driven RAG framework with a no-code UI (archived March 2026)

RAG Frameworks & PlatformsOpen source
Language
Python
License
Apache-2.0
$git clone https://github.com/truefoundry/cognita.git
IN SHORT

What is Cognita?

Cognita is an open-source framework from TrueFoundry for organising a retrieval-augmented generation (RAG) codebase so it can move from a notebook to production. It sits in the RAG Frameworks & Platforms category of the Retrieval & Knowledge (RAG) tools and is open-source, written in Python and licensed Apache-2.0. To get started: clone the repository.

Overview

Cognita DocsQA screen with collection, query controller, model, retriever and prompt template settings beside a generated answer and its source documents
The DocsQA view: pick a collection, model and retriever, ask a question, and read the answer with the chunks it was grounded inCognita README ↗

Cognita is an open-source framework from TrueFoundry for organising a retrieval-augmented generation (RAG) codebase so it can move from a notebook to production. Its README frames the problem directly: LangChain and LlamaIndex are easy to prototype with, but in production the chunking and embedding code has to run as a job, the answering code has to be a scalable API service, models have to be served behind an API and the vector database has to be deployed properly. Cognita uses LangChain and LlamaIndex under the hood and wraps each of those pieces as a modular, API-driven component.

Cognita architecture diagram: an indexing job loads, parses and embeds data sources into a vector DB and metadata store, and a backend API service's query controller retrieves and generates answers through an LLM gateway
Cognita's architecture: the indexing job on top, the query-controller API service belowCognita README ↗

A deployment is split into data sources (local disk, web URLs, S3-style storage, TrueFoundry artifacts), a Postgres-backed metadata store that records each collection's data sources, parser settings and embedding model, a model gateway configured from a single models_config.yaml, a vector database (Qdrant is the one wired in by default), an indexing job, and a FastAPI API server. The indexing job scans data sources, compares them with what is already in the vector database and only downloads, parses, chunks and embeds new or changed files, so incremental indexing is the default. On the query side, each application is a query controller class whose decorated methods become FastAPI routes.

It ships with a web frontend where non-developers can create data sources and collections, start indexing and ask questions while choosing the model, retriever, retriever configuration and prompt template. Cognita can run entirely locally through Docker Compose, with Ollama and an Infinity server as optional profiles for local LLMs, embeddings and reranking, or be deployed through TrueFoundry's application catalogue. The project is no longer actively maintained: a note to that effect was added to the README in March 2026 and the GitHub repository is archived read-only, so treat it as a reference architecture you fork rather than a dependency that will receive updates.

What it does

  • Modular, registry-based components: write your own data loader, parser or vector-DB adapter by subclassing BaseDataLoader, BaseParser or BaseVectorDB and registering it
  • Incremental indexing job that diffs data sources against the vector database and only processes new or updated files, run manually or on a cron schedule
  • Query controllers: a decorated Python class whose methods become FastAPI endpoints, with retrievers such as similarity search, query decomposition and document reranking
  • A single models_config.yaml model gateway for LLM, embedding and reranking providers, including OpenAI, Ollama and an Infinity server
  • Parsers for documents via Unstructured, multimodal (vision), web pages, audio (via a faster-whisper server) and video
  • A no-code UI for managing data sources and collections and running Q&A with configurable model, retriever and prompt

Getting started

The README recommends running the whole stack locally with Docker Compose (version 25+). It starts Postgres for metadata, a Qdrant server, the FastAPI backend and the frontend.

Clone the repository

bashbash
git clone https://github.com/truefoundry/cognita.git
cd cognita

Configure model providers

Copy the sample model config. By default it enables local providers that need Ollama and an Infinity server; to use OpenAI instead, uncomment the openai provider in models_config.yaml and set OPENAI_API_KEY in compose.env.

bashbash
cp models_config.sample.yaml models_config.yaml

Start the services

This brings up cognita-db (Postgres), qdrant-server, cognita-backend and cognita-frontend. Qdrant listens on http://localhost:6333, the backend on http://localhost:8000 and the UI on http://localhost:5001.

bashbash
docker-compose --env-file compose.env up

Add local models (optional)

Enable the ollama and infinity profiles to serve LLMs, embeddings and reranking locally; the Infinity server is then on http://localhost:7997. Add --build after pulling changes or adding packages.

bashbash
docker-compose --env-file compose.env --profile ollama --profile infinity up

Index documents and ask questions in the UI

In the frontend, create a data source (local directory, web URL, GitHub URL or TrueFoundry artifact), then create a collection by choosing an embedding model and linking the data source; indexing starts when you click Process. In the DocsQA tab, select the collection, LLM, retriever and prompt, and ask your question.

Write your own query controller

Add a class under backend/modules/query_controllers/, decorate it, and import it in that package's __init__.py. Each decorated method is exposed as a FastAPI route — here POST /my-controller/answer.

pythonpython
from backend.server.decorator import query_controller, post

@query_controller("/my-controller")
class MyCustomController():
    @post("/answer")
    def answer(query: str):
        # your retrieval + generation logic
        ...

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

Cognita's Create a new document collection panel with collection name, embedding model, data source and JSON parser configuration fields
Creating a collection in the UI
Cognita collections tab listing a collection's linked data source with a COMPLETED indexing status
Indexing status for a collection's data source
  • Reach for it as a reference layout when turning a notebook RAG prototype into separate indexing-job and query-service components
  • Reach for it when non-technical colleagues need a UI to upload documents, build collections and try different retrievers and prompts
  • Reach for it when you want a self-hosted document Q&A stack you can run end to end on one machine with Docker Compose, Ollama and Infinity
  • Reach for it as a fork-and-own starting point — the repository is archived, so plan to maintain your copy yourself

How Cognita compares

Cognita alongside other open-source rag frameworks & platforms tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
Dify★ 162kAn open-source platform with a visual workflow builder for creating LLM and RAG applications without writing much code.
graphify★ 155kTurns a folder of code, docs, PDFs and images into a local knowledge graph with tree-sitter AST parsing and Leiden communities — queryable by agents over MCP, no vector store.
RAGFlow★ 95kA RAG engine built around deep document understanding that turns complex files into a grounded, citation-backed question-answering layer.
Context7★ 65.7kContext7 pulls current, version-specific documentation and code examples for any library and feeds them into your LLM, available as a CLI skill or an MCP server.
Pathway★ 61.9kA Python framework with a Rust streaming engine that keeps ETL, real-time analytics and RAG pipelines continuously up to date as source data changes.
LightRAG★ 41kA graph-based RAG system that builds an entity-and-relationship knowledge graph for fast retrieval and easy incremental updates.
PageIndex★ 40.8kPageIndex turns long PDFs into a table-of-contents tree and uses LLM reasoning to retrieve relevant sections, with no vector database and no chunking.
Cognita★ 4.4kTrueFoundry's modular, API-driven RAG framework with a no-code UI (archived March 2026)