RAG Chatbot with Vector Store
From zero to a production RAG chatbot in 15 minutes — choose your vector store, ingest documents, chat
The Problem
Building a RAG chatbot requires choosing and configuring a vector store, setting up document ingestion, implementing similarity search, and connecting it all to a chat interface with streaming — dozens of decisions before you write any AI logic.
The Solution
The Full-Stack AI Agent Template generates a complete RAG pipeline with your choice of vector store (Milvus, Qdrant, ChromaDB, pgvector), document ingestion (PDF, Google Drive, S3, 130+ formats via LlamaParse), and a Next.js chat UI with WebSocket streaming — all in one command.
Working Code
# Generated by: fastapi-fullstack new --preset ai-agent
# backend/app/agent/rag.pyfrom pydantic_ai import Agentfrom app.core.vectorstore import get_vector_storefrom app.core.config import settings
agent = Agent( model=settings.LLM_MODEL, system_prompt="Answer questions using the provided context. Cite sources.",)
@agent.toolasync def search_documents(ctx, query: str, top_k: int = 5) -> str: """Search the knowledge base for relevant documents.""" store = get_vector_store() # Milvus, Qdrant, ChromaDB, or pgvector results = await store.similarity_search(query, k=top_k) return "\n\n".join([f"[{r.metadata['source']}]: {r.page_content}" for r in results])Step by Step
Choose your stack (configurator)
Run the CLI configurator or use the web-based interactive tool to select your vector store, document sources, LLM provider, and deployment options. The template supports 75+ configuration options.
Ingest documents
Upload PDFs, connect Google Drive, or point to an S3 bucket. The template handles chunking, embedding, and indexing in your chosen vector store automatically.
Chat with your data
Open the Next.js chat interface with real-time WebSocket streaming. Ask questions about your documents and get cited answers with source references.
Deploy with Docker
Run `docker compose up` to start the complete stack: FastAPI backend, Next.js frontend, vector store, and PostgreSQL — all pre-configured and ready for production.
Related Use Cases
Deep Research Agent with Sub-Agents
Build a research agent that breaks complex topics into sub-tasks, delegates to specialist sub-agents, searches the web, and synthesizes findings into a structured report.
Text-to-SQL Agent with Memory
Build an agent that converts natural language questions into SQL queries, explores database schemas, and learns from past interactions through persistent filesystem-backed memory.
Ready to build this?
Get started with Vstorm's open-source tools — production-tested, fully documented, and free.
Get StartedReady to build your first production AI agent?
Open-source tools, battle-tested patterns, zero boilerplate. Configure your stack and ship in minutes — not months.