#6262nd of 110 in Backend and cloud templates

fastapi-langgraph-agent-production-ready-template

FastAPI backend template for LangGraph agents with memory, auth and tracing

Run it:RackNerd ↗ (opens in a new tab)RepoCloud ↗ (opens in a new tab)Affiliate links, no effect on a rank.

Releases and problems feed (RSS)

Stars
2.8k
License
MIT
Last commit
Oct 2026
Language
Python
Stars, last 34 weeks+697
28 Mar 2026: 2,056 stars4 Apr 2026: 2,085 stars11 Apr 2026: 2,110 stars18 Apr 2026: 2,136 stars25 Apr 2026: 2,168 stars2 May 2026: 2,192 stars9 May 2026: 2,217 stars16 May 2026: 2,244 stars23 May 2026: 2,279 stars30 May 2026: 2,310 stars6 Jun 2026: 2,340 stars13 Jun 2026: 2,375 stars20 Jun 2026: 2,403 stars27 Jun 2026: 2,426 stars4 Jul 2026: 2,452 stars11 Jul 2026: 2,478 stars18 Jul 2026: 2,500 stars25 Jul 2026: 2,514 stars1 Aug 2026: 2,535 stars8 Aug 2026: 2,558 stars15 Aug 2026: 2,582 stars22 Aug 2026: 2,596 stars29 Aug 2026: 2,616 stars5 Sept 2026: 2,630 stars12 Sept 2026: 2,649 stars19 Sept 2026: 2,663 stars26 Sept 2026: 2,671 stars3 Oct 2026: 2,684 stars10 Oct 2026: 2,692 stars17 Oct 2026: 2,700 stars24 Oct 2026: 2,714 stars31 Oct 2026: 2,721 stars7 Nov 2026: 2,731 stars14 Nov 2026: 2,741 stars21 Nov 2026: 2,753 stars

2,056 on 28 Mar 20262,753 on 21 Nov 2026

From GitHub's daily star counts.

Checked on GitHub.

Overview

A Python backend template that wires a stateful LangGraph agent into FastAPI with JWT sessions, slowapi rate limiting, Alembic migrations and PostgreSQL checkpointing. Long-term memory runs in-process through mem0 and pgvector, and LLM calls go through a service with retries and circular model fallback. Observability comes from Langfuse tracing, Prometheus metrics and Grafana dashboards.

Who it is for: AI engineers building a LangGraph agent API on FastAPI and Postgres

Strengths

  • Circular model fallback with tenacity retries and a total timeout budget
  • Per-user long-term memory via mem0 and pgvector in your own PostgreSQL
  • Langfuse tracing, Prometheus metrics and Grafana dashboards included
  • Custom tools are added by registering a LangChain @tool function

Weaknesses

  • Ships a single agent; supervisor or sub-agent setups must be wired by hand
  • mem0 memory needs an OpenAI API key for fact extraction and embeddings
  • Requires PostgreSQL with the pgvector extension
  • Non-OpenAI providers need extra packages and registry edits

What it needs

  • Python, OpenAI, Anthropic, Ollama, Google GenAI
  • Needs PostgreSQL, pgvector, Langfuse (optional), Valkey/Redis (optional), Prometheus and Grafana (optional)
  • Docker
  • env example file

Also in Backend and cloud templates

See all 110
Also in Backend and cloud templates
RankProjectScore
#60dropwizardJava framework bundling Jetty, Jersey and Jackson for REST services8.6k starsApache-2.065 out of 100
#61typescript-express-starterCLI that generates TypeScript Express REST API projects with selectable tooling2.9k starsMIT65 out of 100
#63backendProduction-ready NestJS Todo API with a 16-chapter guide on CI/CD and observability486 starsMIT62 out of 100
#64taotao-cloud-projectSpring Cloud Alibaba microservice scaffold with a B2B2C mall and big-data modules379 starsApache-2.061 out of 100
#65genlayer-project-boilerplateGenLayer starter with a Python betting contract, tests, and Next.js frontend19.5k stars+312 (+1.6%) in 30 daysMIT60 out of 100