Internal RAG chat assistant scaffolded from the FastAPI + Next.js agent template
From README links · today
Generated a self-hosted AI chat app with RAG, auth, and streaming UI.
What they did
Started from the vstorm-co full-stack-ai-agent-template, a FastAPI + Next.js 15 project generator, to stand up an internal knowledge assistant rather than writing boilerplate from scratch. They ran the Django-style CLI (fastapi-fullstack) to scaffold a project, choosing Pydantic AI as the agent framework and pgvector as the vector store so everything stayed in the existing Postgres instance. The generator produced the backend (FastAPI, SQLAlchemy models, JWT auth, admin panel, Celery workers) and the frontend (Next.js 15 chat UI with WebSocket streaming and a live plan/task checklist). They then wired the RAG pipeline: an ingestion path that chunks internal markdown and PDF docs, embeds them, and upserts into pgvector, plus a retrieval tool registered on the Pydantic AI agent so answers cite source chunks. Auth was left on the generated JWT flow with an admin user seeded via the CLI; conversation sharing was enabled so teammates could pass links to each other. Finally they ran the Docker Compose stack locally, exercised the chat with sample questions, and checked the observability hooks before handing it to a small pilot group.
How it went
A working internal assistant demo: streaming chat with visible task plans, grounded answers over a small doc set, login and admin screens functioning, and the whole stack running via Docker Compose. Polish is template-grade — the UI and auth are solid out of the box, but retrieval quality and prompt tuning were only lightly iterated, and no production deployment (K8s manifests, secrets management, eval suite) was completed.
Worth knowing
The template is a generator, so much of the value depends on picking options correctly up front; switching vector stores or agent frameworks later means regenerating or hand-editing. RAG quality needs real evaluation — chunking and embedding choices are defaults, not tuned. Celery, OAuth providers, and K8s are scaffolded but require configuration and secrets you must supply. Nothing here covers cost controls or approval workflows beyond what the companion AgenticOS project offers.
Wiring
Order: (1) install the generator (pip install fastapi-fullstack) and run its init command, selecting FastAPI + Next.js, Pydantic AI, pgvector, JWT auth, Celery, and Docker. (2) Bring up Postgres with the pgvector extension via the generated docker-compose, run migrations, and seed the admin user through the CLI. (3) Add an ingestion module that reads docs, chunks them, calls the configured embedding model, and writes vectors plus metadata to the pgvector table. (4) Define a Pydantic AI tool that takes a query, embeds it, does a similarity search, and returns top-k chunks with source ids; attach it to the agent's tool list alongside any other tools. (5) Point the Next.js chat client at the FastAPI WebSocket endpoint; the generated streaming handler forwards agent tokens and task-plan events to the UI. (6) Configure env vars for the model provider key, database URL, JWT secret, and embedding model in .env, shared between backend and compose. (7) Optionally enable Celery for async ingestion jobs and the admin panel for browsing shared conversations.
Try it yourself
Scaffold an internal knowledge assistant in this repo using the full-stack-ai-agent-template CLI: choose Pydantic AI as the agent framework and pgvector as the vector store, keep JWT auth with an admin user, and enable conversation sharing. Then add a RAG ingestion script that chunks the docs/ folder, embeds it into pgvector, and registers a retrieval tool on the agent so chat answers cite sources. Run it with Docker Compose and show me the chat UI streaming a grounded answer.
Tools in this stack
Run this stack
Install the stack into this project. It writes AGENTS.md and the manifest, merges the MCP servers into .mcp.json, and — with --yes — runs the tool installs.
npx runchr install runchr/stack-full-stack-ai-agent-template-and-pydantic-aicurl -s https://api.runchr.com/api/recipes/runchr/stack-full-stack-ai-agent-template-and-pydantic-ai/manifestThis stack has no prompt yet. You get the tools and the wiring, not the prompt.
The manifest is also at api.runchr.com/api/recipes/runchr/stack-full-stack-ai-agent-template-and-pydantic-ai/manifest.