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
Also in AI API backends
RankProjectScore
1agent-service-toolkitLangGraph agents served by FastAPI with a Streamlit chat client Live demo ↗ (opens in a new tab)4.5k stars, MIT70 out of 100
3full-stack-ai-agent-templateProject generator for FastAPI and Next.js apps with agents and RAG1.9k stars, MIT55 out of 100
#4generative-ai-project-templateuv workspace with FastAPI, NiceGUI, LiteLLM and Promptfoo evals118 stars, MIT51 out of 100
#5nodejs-api-boilerplateExpress TypeScript CRUD API template with an LLM module generator164 stars, MIT31 out of 100
#6genai-apiHono API on Cloudflare Workers proxying Gemini with bearer auth111 stars, Apache-2.028 out of 100