22nd of 6 in AI API backends
fastapi-langgraph-agent-production-ready-template
FastAPI service for a LangGraph agent with auth, memory and tracing
- Stars
- 2.7k
- License
- MIT
- Last commit
- Sep 2026
- Language
- Python
Overview
FastAPI backend with a stateful LangGraph agent (Postgres checkpointing, tool calling, human-in-the-loop), mem0 long-term memory on pgvector, JWT auth and sessions, slowapi rate limiting, Alembic migrations, optional Valkey/Redis cache, Langfuse tracing, Prometheus and Grafana, and evals. make docker-up starts the API on port 8000 with PostgreSQL. OpenAI only via ChatOpenAI; any OpenAI-compatible base URL works.
Who it is for: Python teams productionizing a single LangGraph agent
Strengths
- JWT sessions, rate limiting and structured per-request logging included
- mem0 long-term memory runs in-process on pgvector; no mem0 cloud
- Circular model fallback with retries and a total timeout budget
- Langfuse, Prometheus and Grafana wired; Langfuse can be disabled
Weaknesses
- OpenAI (or OpenAI-compatible) only; multi-provider is an open issue
- README leads with a sponsor pitch for Atlas Cloud
- Needs the pgvector extension and an OpenAI key for memory
- Not a GitHub template; clone and strip
What it needs
- Python, OpenAI via langchain_openai.ChatOpenAI (any OpenAI-compatible base URL)
- Needs PostgreSQL with pgvector, OpenAI API key, Valkey/Redis (optional), Langfuse (optional)
- Docker
- env example file
Also in AI API backends
See all 6| Rank | Project | Score |
|---|---|---|
| 1 | agent-service-toolkitLangGraph agents served by FastAPI with a Streamlit chat client | 70 out of 100 |
| 3 | full-stack-ai-agent-templateProject generator for FastAPI and Next.js apps with agents and RAG | 55 out of 100 |
| #4 | generative-ai-project-templateuv workspace with FastAPI, NiceGUI, LiteLLM and Promptfoo evals | 51 out of 100 |
| #5 | nodejs-api-boilerplateExpress TypeScript CRUD API template with an LLM module generator | 31 out of 100 |
| #6 | genai-apiHono API on Cloudflare Workers proxying Gemini with bearer auth | 28 out of 100 |