# 🚀 优化版本 - AgentGraph HF Spaces 部署配置 # 已移除未使用的依赖,优化镜像大小和构建时间 [build-system] requires = ["setuptools>=61.0"] build-backend = "setuptools.build_meta" [project] name = "agent_monitoring" version = "0.1.0" description = "Agent monitoring and testing system" readme = "README.md" requires-python = ">=3.11" license = {text = "MIT"} authors = [ {name = "Agent Monitoring Team"} ] classifiers = [ "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ] # 🎯 优化后的生产环境依赖 (移除了5个未使用/低使用包) dependencies = [ # ===== 核心Web框架 ===== "fastapi>=0.115.0", # ✅ 核心 (20+ 使用) "uvicorn>=0.34.0", # ✅ 核心 "httpx>=0.27.0", # ✅ 核心 "python-multipart>=0.0.6,<1.0.0", # ✅ 核心 "itsdangerous>=2.0.0", # ✅ Session middleware dependency # ===== 数据层 ===== "sqlalchemy>=2.0.0", # ✅ 核心 (36+ 使用) "pydantic[email]>=2.10.0", # ✅ 核心 (36+ 使用, 含 email-validator) "python-dotenv>=1.0.0", # ✅ 核心 # ===== AI/LLM核心 ===== "openai>=1.76.2", # ✅ 核心 (7+ 使用) "tiktoken>=0.9.0", # ✅ 核心 "litellm>=1.60.0", # ✅ 核心 "apscheduler>=3.10.0", # ✅ LiteLLM 依赖 (cold storage logging) "langfuse>=3.0.0", # ✅ 核心 (15+ 使用) "langsmith>=0.3.38", # ✅ 核心 (12+ 使用) "langchain>=0.3.0", # ✅ 核心 (text splitting) "langchain-community>=0.3.0", # ✅ 核心 (document loaders) "langchain-text-splitters>=0.3.0", # ✅ 核心 (text splitting - required for langchain 0.3+) "crewai>=0.108.0", # ✅ 功能性 (2+ 使用) "crewai-tools>=0.38.1", # ✅ 功能性 "langgraph>=0.5.3", # ✅ 功能性 "pydantic-ai>=0.2.11", # ✅ 功能性 # ===== 数据处理核心 ===== "pandas>=1.3", # ✅ 核心 (10+ 使用) "numpy>=1.23,<2.0.0", # ✅ 核心 "scikit-learn>=1.0", # ✅ 核心 (6+ 使用) "scipy>=1.7,<2.0.0", # 🟡 因果分析需要 (可选) # ===== 系统工具 ===== "jinja2>=3.1.2", # ✅ 核心 "psutil>=7.0.0", # ✅ 核心 # ===== 可选功能 ===== "dowhy>=0.12", # 🟡 因果分析 (3+ 使用,可选) # "openlit>=1.33.0", # 🚫 已移除: 与 litellm/anthropic 版本冲突导致 pip 无限回溯 # 🔧 开发/调试工具 (生产环境可考虑移除) "fire>=0.7.0", # 🟡 CLI工具 (1 使用) "datasets>=3.6.0", # 🟡 HF数据集 (1 使用) ] [project.urls] "Homepage" = "https://github.com/981526092/agent-graph" "Bug Tracker" = "https://github.com/981526092/agent-graph/issues" [project.scripts] agent-monitoring = "main:main" [tool.setuptools] # Automatically discover packages in the root directory [tool.setuptools.packages.find] where = ["."] [tool.pytest.ini_options] testpaths = ["tests"] python_files = ["test_*.py"] python_classes = ["Test*"] python_functions = ["test_*"] asyncio_mode = "strict" norecursedirs = ["agentgraph", "backend", "utils", "evaluation", "datasets", "frontend", ".git"] [tool.ruff] line-length = 150 target-version = "py311" select = ["E", "F", "B", "I"] ignore = [] [tool.ruff.isort] known-first-party = ["backend", "agentgraph", "utils", "evaluation"]