Skip to main content

CLI tool for generating production-ready FastAPI RAG backend templates

Project description

FastAPI RAG: Enterprise AI Backend Generator

PyPI version Python versions License: MIT Build Status

FastAPI RAG is a sophisticated CLI tool designed to scaffold production-grade AI backends. Instead of assembly-required boilerplates, it generates a complete, modular ecosystem for RAG (Retrieval-Augmented Generation) applications, specialized AI agents, and high-performance SaaS platforms.


🌟 Why FastAPI RAG?

In the era of AI, the backend is more than just an API—it's an orchestrator. This tool generates a foundation that handles the complex "plumbing" of AI systems so you can focus on your domain logic.

  • Intelligent Orchestration: Advanced LLM-based routing and agent selection logic.
  • Stateful AI Interactions: Built-in persistence for multi-turn chat and conversation history.
  • Production-Ready RAG: Async document ingestion, status tracking, and background processing.
  • Infrastructure Agnostic: Pre-configured with swappable providers for LLMs, Vector DBs, and Caches.

🚀 Quick Start

Generate your enterprise-grade backend in seconds:

1. Installation

pip install fastapi-rag

2. Generate Project

fastapi-rag new my-ai-platform

The CLI will guide you through selecting your preferred stack (OpenAI vs. Ollama, Qdrant vs. PgVector, etc.).

3. Launch Development Stack

cd my-ai-platform
docker compose up --build

Your backend is now live at http://localhost:8000 with full RAG and Agent capabilities.


📦 What's Included in the Box?

The generated project is a fully-functional ecosystem:

  • Security: JWT-based authentication with secure password hashing.
  • AI Pipelines:
    • Async Ingestion: PDF/Text upload with background parsing and vector indexing.
    • Agentic Framework: Modular registry for specialized AI agents (SQL, RAG, Web Search).
  • Persistence: Async SQLAlchemy 2.0 with the Repository pattern.
  • Observability: Integrated Prometheus metrics and JSON logging.
  • Infrastructure: Celery + Redis for background workflows and Qdrant for vector search.

🗺️ Roadmap & Supported Providers

Category Supported / Modeled Providers
LLMs OpenAI, Ollama, Anthropic (Planned), Echo (Local Testing)
Vector DBs Qdrant, Chroma, PgVector, Pinecone
Databases PostgreSQL, MySQL
Caching Redis, Dragonfly
Queues Celery

🛠️ Repository Development

Local Setup

git clone https://github.com/example/fastapi-rag.git
cd fastapi-rag
pip install -e .[dev]

Testing

pytest

Build Distribution

python -m build

📚 Documentation


📄 License

This project is released under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastapi_rag-0.1.1.tar.gz (121.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastapi_rag-0.1.1-py3-none-any.whl (188.5 kB view details)

Uploaded Python 3

File details

Details for the file fastapi_rag-0.1.1.tar.gz.

File metadata

  • Download URL: fastapi_rag-0.1.1.tar.gz
  • Upload date:
  • Size: 121.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for fastapi_rag-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3c0518fae301a34b69714346175bee904fcf38def79d048c28389d6078440b35
MD5 14357a953f22aa8016eba4da658c7496
BLAKE2b-256 8625ee154fc1fe5ddd7a002a6980f8f14cb78772f95ca13eb62ecf61edd53727

See more details on using hashes here.

File details

Details for the file fastapi_rag-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: fastapi_rag-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 188.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for fastapi_rag-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e91b668342104c1f0f00334ff8584cc6e5aa7284e98b43b598f583ad9d43b114
MD5 a7b039e9e49e8861cc12636b2e86dbe4
BLAKE2b-256 838a298599f48536fb6135d2268291e27999436023a4f0d228821e7f01e06195

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page