fastapi-langgraph-agent-production-ready-template

一個用於建構整合 LangGraph 的 AI 代理應用程式的生產就緒 FastAPI 範本。此範本為建構可擴展、安全且易於維護的 AI 代理服務提供了穩固的基礎。

fastapi-langgraph-agent-production-ready-template 是什麼?

一個用於建構整合 LangGraph 的 AI 代理應用程式的生產就緒 FastAPI 範本。此範本為建構可擴展、安全且易於維護的 AI 代理服務提供了穩固的基礎。

fastapi-langgraph-agent-production-ready-template 概覽

這是什麼

一個生產就緒的 FastAPI 模板,用於建置整合 LangGraph 的 AI 代理應用程式。它為建置可擴展、安全且可維護的 AI 代理服務提供了基礎。該模板處理有狀態對話、長期記憶、工具呼叫、可觀測性、速率限制和身份驗證。

主要功能

  • LangGraph 有狀態代理,支援檢查點、工具呼叫和人工介入 - 透過 mem0 + pgvector 實現長期記憶,支援每位使用者的語意搜尋和快取 - LLM 服務,具備循環模型回退、指數退避重試和總超時預算 - 所有 LLM 呼叫的 Langfuse 追蹤;Prometheus 指標和 Grafana 儀表板 - JWT 身份驗證與工作階段管理;透過 slowapi 進行速率限制 - Alembic 遷移;可選的 Valkey/Redis 快取層 - 結構化日誌,每行包含請求、工作階段和使用者上下文

使用情境

建置需要狀態對話、持久記憶、可觀測性和身份驗證的生產級 AI 代理後端。適合需要堅實基礎而非教學專案的 AI 工程師。

快速開始

bash git clone my-agent && cd my-agent cp .env.example .env.development # 填入你的金鑰 make install make docker-up # 啟動 API + PostgreSQL 開啟 http://localhost:8000/docs 查看互動式 API。若要在沒有 Docker 的情況下進行本地開發,請參閱 docs/getting-started.md。

授權與價格

授權為 MIT。該專案為開源(pricing_type: open_source)。

內容整理自該專案公開的 README 與儲存庫資訊。

將此徽章加入你的 README

Featured on YunoDB 徽章樣式與說明

你是這個專案的維護者嗎?展示它已收錄於 YunoDB。

Markdown[![Featured on YunoDB](https://yunodb.com/badge/wassim249fastapi-langgraph-agent-production-ready-template.svg)](https://yunodb.com/tools/wassim249fastapi-langgraph-agent-production-ready-template?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/wassim249fastapi-langgraph-agent-production-ready-template?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/wassim249fastapi-langgraph-agent-production-ready-template.svg" alt="Featured on YunoDB" height="20"></a>