File size: 3,688 Bytes
9da434e
 
 
c2ea5ed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9da434e
c2ea5ed
 
 
 
9da434e
 
c2ea5ed
9da434e
 
 
 
 
434c40e
9da434e
 
 
4ac5f73
9da434e
 
 
 
 
 
85b0533
9da434e
 
d6c7c85
 
0b205c4
9da434e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61546e3
9da434e
 
 
 
c2ea5ed
 
9da434e
c2ea5ed
 
 
 
 
 
 
 
 
 
 
 
795b72e
 
 
 
 
 
 
 
c2ea5ed
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# 🚀 优化版本 - 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"]