LongTrainer

Production-Ready RAG Framework for Multi-Tenant Chatbots

Building a RAG chatbot from scratch means wiring together LangChain, a vector DB, memory management, multi-tenancy, and streaming. LongTrainer does all of this in 10 lines of code. Multi-tenant bots, persistent MongoDB memory, 9 vector DB providers, streaming, tool calling, and LangGraph agents - all batteries included.

$pip install longtrainer

Everything you need for production RAG

No more wiring together dozens of components. LongTrainer handles the full stack.

Multi-Tenant Isolation

Each bot has its own documents, vector store, memory, and config. Perfect for SaaS applications where each customer needs a separate AI assistant.

9 Vector DB Providers

FAISS, Pinecone, Chroma, Qdrant, PGVector, MongoDB Atlas, Milvus, Weaviate, and Elasticsearch. Configure per bot.

Streaming Responses

Sync and async streaming out of the box. Real-time token-by-token responses for better user experience.

LangGraph Agent Mode

Switch from RAG mode to full LangGraph agent mode with tool calling. Web search, calculators, custom APIs - any LangChain tool.

Dynamic Model Factory

OpenAI, Claude, Gemini, AWS Bedrock, HuggingFace, Groq, Together AI, and Ollama. Configure the LLM per bot.

CLI and REST API

Built-in FastAPI server. Run `longtrainer serve` for a zero-code REST API. Docker-ready for production deployment.

Supported Integrations

Vector Databases

  • FAISS
  • Pinecone
  • Qdrant
  • Chroma
  • PGVector
  • MongoDB Atlas
  • Milvus
  • Weaviate
  • Elasticsearch

LLM Providers

  • OpenAI
  • Anthropic Claude
  • Google Gemini
  • AWS Bedrock
  • HuggingFace
  • Groq
  • Together AI
  • Ollama (local)

Document Loaders

  • PDF, DOCX, TXT
  • AWS S3
  • Google Drive
  • Confluence
  • GitHub
  • Notion
  • JSON
  • Dynamic injection

Common questions

Need LongTrainer deployed in production?

We build custom RAG systems using LongTrainer for enterprise clients. Schedule a free consultation.