#1111th of 19 in RAG and search

rag-api

FastAPI service for per-file document embedding and retrieval on pgvector

Stars
926
License
MIT
Last commit
Sep 2026
Last release
Jul 2026
Language
Python
Stars, last 29 weeks+149
22 Apr 2026: 777 stars29 Apr 2026: 783 stars6 May 2026: 791 stars13 May 2026: 794 stars20 May 2026: 805 stars27 May 2026: 812 stars3 Jun 2026: 816 stars10 Jun 2026: 824 stars17 Jun 2026: 830 stars24 Jun 2026: 836 stars1 Jul 2026: 842 stars8 Jul 2026: 848 stars15 Jul 2026: 850 stars22 Jul 2026: 853 stars29 Jul 2026: 859 stars5 Aug 2026: 868 stars12 Aug 2026: 870 stars19 Aug 2026: 875 stars26 Aug 2026: 877 stars2 Sept 2026: 883 stars9 Sept 2026: 885 stars16 Sept 2026: 892 stars23 Sept 2026: 897 stars30 Sept 2026: 902 stars7 Oct 2026: 904 stars14 Oct 2026: 907 stars21 Oct 2026: 911 stars28 Oct 2026: 915 stars4 Nov 2026: 917 stars11 Nov 2026: 926 stars

777 on 22 Apr 2026926 on 11 Nov 2026

From GitHub's daily star counts.

Checked on GitHub.

Overview

Async FastAPI and Langchain service that ingests documents, embeds them under a file_id, and answers similarity queries against pgvector or Atlas MongoDB. Built mainly as the RAG backend for LibreChat, but usable for any ID-based retrieval. Reads and deletes are scoped to an owner taken from a verified JWT.

Who it is for: LibreChat self-hosters and devs needing a file-ID-based RAG API

Strengths

  • Many embedding providers: OpenAI, Azure, Bedrock, Google GenAI, VertexAI, Hugging Face, TEI, Ollama
  • Reads and deletes are scoped by JWT owner before ranking
  • Batched async ingestion with bounded memory and rollback on failure
  • Optional RAG_DISTANCE_THRESHOLD drops weak matches to cut downstream LLM tokens

Weaknesses

  • entity_id is caller-asserted; untrusted callers need upstream authorization
  • Upgrading the service before the client orphans agent knowledge-base files on delete
  • Chunks with no user_id become unreadable after upgrade unless backfilled with SQL
  • Omitting JWT_SECRET disables authentication and stamps all chunks as public

What it needs

  • Python, OpenAI, Azure OpenAI, AWS Bedrock, Google GenAI
  • Needs PostgreSQL with pgvector (or Atlas MongoDB), Embedding provider API (OpenAI by default)
  • Docker

What changed

From the release notes. No flag means the note does not say so, not that the upgrade is safe.

Also in RAG and search

See all 19
Also in RAG and search
RankProjectScore
1xerjElasticsearch-compatible search server that auto-indexes folders for coding agents Live demo ↗ (opens in a new tab)18.9k stars+15,411 (+437%) in 30 daysApache-2.086 out of 100
2llm-appYAML-configured RAG server that keeps a vector database synced with a document folder58.7k starsMIT82 out of 100
3sonicLightweight schema-less search index that returns object IDs, written in Rust Live demo ↗ (opens in a new tab)21.4k starsMPL-2.082 out of 100
#4qmdLocal hybrid search over markdown notes and docs, with CLI and MCP server31.1k stars+755 (+2.5%) in 30 daysMIT78 out of 100
#5paradedbPostgres extension adding BM25 full-text, vector and hybrid search9.5k stars+124 (+1.3%) in 30 daysAGPL-3.076 out of 100