fastapi-langgraph-agent-production-ready-template  by wassim249

FastAPI template for AI agent apps with LangGraph

created 3 months ago
1,034 stars

Top 36.9% on sourcepulse

GitHubView on GitHub
Project Summary

This template provides a production-ready FastAPI and LangGraph foundation for building AI agent applications. It targets developers needing a scalable, observable, and maintainable backend for complex AI workflows, offering features like LLM observability, robust API design, and integrated monitoring.

How It Works

The template leverages FastAPI for high-performance asynchronous API endpoints and LangGraph for defining and executing multi-step AI agent workflows. It integrates Langfuse for LLM observability, allowing detailed tracing and analysis of agent interactions. Data persistence is handled by PostgreSQL, with ORM managing schema creation. The architecture includes Prometheus and Grafana for comprehensive monitoring of API performance, resource usage, and rate limiting statistics.

Quick Start & Requirements

  • Install: Clone repo, uv sync for dependencies.
  • Prerequisites: Python 3.13+, PostgreSQL, Docker/Docker Compose (optional).
  • Setup: Copy .env.example to .env.[env], configure POSTGRES_URL.
  • Run: make dev for local, make docker-build-env ENV=[env] and make docker-run-env ENV=[env] for Docker.
  • Docs: Swagger UI at http://localhost:8000/docs.
  • Monitoring: Prometheus at http://localhost:9090, Grafana at http://localhost:3000 (admin/admin).

Highlighted Details

  • Production-ready architecture with FastAPI, LangGraph, Langfuse, PostgreSQL.
  • Integrated monitoring stack (Prometheus, Grafana) with pre-configured dashboards.
  • Robust model evaluation framework with interactive CLI, detailed JSON reports, and custom metric support.
  • Security features including JWT authentication, session management, rate limiting, and input sanitization.
  • Environment-specific configuration management via .env files.

Maintenance & Community

No specific contributors, sponsorships, or community links (Discord/Slack) are mentioned in the README.

Licensing & Compatibility

The README does not specify a license. Compatibility for commercial use or closed-source linking is not detailed.

Limitations & Caveats

The template requires Python 3.13+, which is a recent version. The absence of a specified license raises questions about usage rights and commercial compatibility. No information is provided regarding community support or project maintenance activity.

Health Check
Last commit

1 month ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
4
Star History
362 stars in the last 90 days

Explore Similar Projects

Starred by Nat Friedman Nat Friedman(Former CEO of GitHub), Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), and
7 more.

langflow by langflow-ai

2.9%
93k
Visual tool for AI agent and workflow creation/deployment
created 2 years ago
updated 21 hours ago
Feedback? Help us improve.