File size: 2,437 Bytes
2eb41d7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
104
105
106
107
108
109
110
111
112
113
114
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "smolagents"
version = "1.10.0.dev0"
description = "🤗 smolagents: a barebones library for agents. Agents write python code to call tools or orchestrate other agents."
authors = [
  { name="Aymeric Roucher", email="aymeric@hf.co" }, { name="Thomas Wolf"},
]
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
  "huggingface-hub>=0.28.0",
  "requests>=2.32.3",
  "rich>=13.9.4",
  "pandas>=2.2.3",
  "jinja2>=3.1.4",
  "pillow>=11.0.0",
  "markdownify>=0.14.1",
  "duckduckgo-search>=6.3.7",
  "python-dotenv"
]

[project.optional-dependencies]
torch = [
  "torch",
  "torchvision",
]
audio = [
  "soundfile",
  "smolagents[torch]",
]
docker = [
  "docker>=7.1.0",
  "websocket-client",
]
e2b = [
  "e2b-code-interpreter>=1.0.3",
  "python-dotenv>=1.0.1",
]
gradio = [
  "gradio>=5.13.2",
]
litellm = [
  "litellm>=1.60.2",
]
mcp = [
  "mcpadapt>=0.0.6",
  "mcp",
]
mlx-lm = [
  "mlx-lm"
]
openai = [
  "openai>=1.58.1"
]
telemetry = [
  "arize-phoenix",
  "opentelemetry-sdk", 
  "opentelemetry-exporter-otlp",
  "openinference-instrumentation-smolagents>=0.1.4"
]
transformers = [
  "accelerate",
  "transformers>=4.0.0,<4.49.0",
  "smolagents[torch]",
]
all = [
  "smolagents[audio,docker,e2b,gradio,litellm,mcp,openai,telemetry,transformers]",
]
quality = [
  "ruff>=0.9.0",
]
test = [
  "ipython>=8.31.0", # for interactive environment tests
  "pytest>=8.1.0",
  "python-dotenv>=1.0.1", # For test_all_docs
  "smolagents[all]",
  "rank-bm25", # For test_all_docs
]
dev = [
  "smolagents[quality,test]",
  "sqlalchemy", # for ./examples
]

[tool.pytest.ini_options]
# Add the specified `OPTS` to the set of command line arguments as if they had been specified by the user.
addopts = "-sv --durations=0"

[tool.ruff]
line-length = 119
lint.ignore = [
  "F403", # undefined-local-with-import-star
  "E501", # line-too-long
]
lint.select = ["E", "F", "I", "W"]

[tool.ruff.lint.per-file-ignores]
"examples/*" = [
  "E402", # module-import-not-at-top-of-file
]

[tool.ruff.lint.isort]
known-first-party = ["smolagents"]
lines-after-imports = 2

[tool.setuptools.package-data]
"smolagents.prompts" = ["*.yaml"]

[project.scripts]
smolagent = "smolagents.cli:main"
webagent = "smolagents.vision_web_browser:main"