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

FastAPI template for AI agent apps with LangGraph

Created 5 months ago
1,225 stars

Top 32.1% 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

2 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
1
Star History
132 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.