2
2
requires = [" hatchling" , " hatch-vcs" ]
3
3
build-backend = " hatchling.build"
4
4
5
+
5
6
[project ]
6
7
name = " strands-agents"
7
- dynamic = [" version" ]
8
+ dynamic = [" version" ] # Version determined by git tags
8
9
description = " A model-driven approach to building AI agents in just a few lines of code"
9
10
readme = " README.md"
10
11
requires-python = " >=3.10"
@@ -38,65 +39,25 @@ dependencies = [
38
39
" opentelemetry-instrumentation-threading>=0.51b0,<1.00b0" ,
39
40
]
40
41
41
- [project .urls ]
42
- Homepage = " https://github.com/strands-agents/sdk-python"
43
- "Bug Tracker" = " https://github.com/strands-agents/sdk-python/issues"
44
- Documentation = " https://strandsagents.com"
45
-
46
- [tool .hatch .build .targets .wheel ]
47
- packages = [" src/strands" ]
48
42
49
43
[project .optional-dependencies ]
50
- anthropic = [
51
- " anthropic>=0.21.0,<1.0.0" ,
52
- ]
53
- dev = [
54
- " commitizen>=4.4.0,<5.0.0" ,
55
- " hatch>=1.0.0,<2.0.0" ,
56
- " moto>=5.1.0,<6.0.0" ,
57
- " mypy>=1.15.0,<2.0.0" ,
58
- " pre-commit>=3.2.0,<4.4.0" ,
59
- " pytest>=8.0.0,<9.0.0" ,
60
- " pytest-cov>=6.0.0,<7.0.0" ,
61
- " pytest-asyncio>=1.0.0,<1.2.0" ,
62
- " pytest-xdist>=3.0.0,<4.0.0" ,
63
- " ruff>=0.12.0,<0.14.0" ,
44
+ anthropic = [" anthropic>=0.21.0,<1.0.0" ]
45
+ litellm = [" litellm>=1.75.9,<2.0.0" , " openai>=1.68.0,<1.108.0" ]
46
+ llamaapi = [" llama-api-client>=0.1.0,<1.0.0" ]
47
+ mistral = [" mistralai>=1.8.2" ]
48
+ ollama = [" ollama>=0.4.8,<1.0.0" ]
49
+ openai = [" openai>=1.68.0,<2.0.0" ]
50
+ writer = [" writer-sdk>=2.2.0,<3.0.0" ]
51
+ sagemaker = [
52
+ " boto3-stubs[sagemaker-runtime]>=1.26.0,<2.0.0" ,
53
+ " openai>=1.68.0,<2.0.0" , # SageMaker uses OpenAI-compatible interface
64
54
]
55
+ otel = [" opentelemetry-exporter-otlp-proto-http>=1.30.0,<2.0.0" ]
65
56
docs = [
66
57
" sphinx>=5.0.0,<6.0.0" ,
67
58
" sphinx-rtd-theme>=1.0.0,<2.0.0" ,
68
59
" sphinx-autodoc-typehints>=1.12.0,<2.0.0" ,
69
60
]
70
- litellm = [
71
- " litellm>=1.75.9,<2.0.0" ,
72
- " openai>=1.68.0,<1.108.0" ,
73
- ]
74
- llamaapi = [
75
- " llama-api-client>=0.1.0,<1.0.0" ,
76
- ]
77
- mistral = [
78
- " mistralai>=1.8.2" ,
79
- ]
80
- ollama = [
81
- " ollama>=0.4.8,<1.0.0" ,
82
- ]
83
- openai = [
84
- " openai>=1.68.0,<2.0.0" ,
85
- ]
86
- otel = [
87
- " opentelemetry-exporter-otlp-proto-http>=1.30.0,<2.0.0" ,
88
- ]
89
- writer = [
90
- " writer-sdk>=2.2.0,<3.0.0"
91
- ]
92
-
93
- sagemaker = [
94
- " boto3>=1.26.0,<2.0.0" ,
95
- " botocore>=1.29.0,<2.0.0" ,
96
- " boto3-stubs[sagemaker-runtime]>=1.26.0,<2.0.0" ,
97
- # uses OpenAI as part of the implementation
98
- " openai>=1.68.0,<2.0.0" ,
99
- ]
100
61
101
62
a2a = [
102
63
" a2a-sdk>=0.3.0,<0.4.0" ,
@@ -106,22 +67,46 @@ a2a = [
106
67
" fastapi>=0.115.12,<1.0.0" ,
107
68
" starlette>=0.46.2,<1.0.0" ,
108
69
]
109
- all = [
110
- " strands-agents[a2a,anthropic,dev,docs,litellm,llamaapi,mistral,ollama,openai,otel]" ,
70
+ all = [" strands-agents[a2a,anthropic,docs,litellm,llamaapi,mistral,ollama,openai,writer,sagemaker,otel]" ]
71
+
72
+ dev = [
73
+ " commitizen>=4.4.0,<5.0.0" ,
74
+ " hatch>=1.0.0,<2.0.0" ,
75
+ " moto>=5.1.0,<6.0.0" ,
76
+ " mypy>=1.15.0,<2.0.0" ,
77
+ " pre-commit>=3.2.0,<4.4.0" ,
78
+ " pytest>=8.0.0,<9.0.0" ,
79
+ " pytest-cov>=7.0.0,<8.0.0" ,
80
+ " pytest-asyncio>=1.0.0,<1.2.0" ,
81
+ " pytest-xdist>=3.0.0,<4.0.0" ,
82
+ " ruff>=0.13.0,<0.14.0" ,
111
83
]
112
84
85
+ [project .urls ]
86
+ Homepage = " https://github.com/strands-agents/sdk-python"
87
+ "Bug Tracker" = " https://github.com/strands-agents/sdk-python/issues"
88
+ Documentation = " https://strandsagents.com"
89
+
90
+
91
+ [tool .hatch .build .targets .wheel ]
92
+ packages = [" src/strands" ]
93
+
94
+
113
95
[tool .hatch .version ]
114
- # Tells Hatch to use your version control system ( git) to determine the version.
115
- source = " vcs "
96
+ source = " vcs " # Use git tags for versioning
97
+
116
98
117
99
[tool .hatch .envs .hatch-static-analysis ]
118
- features = [" anthropic" , " litellm" , " llamaapi" , " ollama" , " openai" , " otel" , " mistral" , " writer" , " a2a" , " sagemaker" ]
100
+ installer = " uv"
101
+ features = [" all" ]
119
102
dependencies = [
120
103
" mypy>=1.15.0,<2.0.0" ,
121
- " ruff>=0.11.6,<0.12.0" ,
104
+ " ruff>=0.13.0,<0.14.0" ,
105
+ # Include required pacakge dependencies for mypy
122
106
" strands-agents @ {root:uri}" ,
123
107
]
124
108
109
+ # Define static-analysis scripts so we can include mypy as part of the linting check
125
110
[tool .hatch .envs .hatch-static-analysis .scripts ]
126
111
format-check = [
127
112
" ruff format --check"
@@ -137,65 +122,54 @@ lint-fix = [
137
122
" ruff check --fix"
138
123
]
139
124
125
+
140
126
[tool .hatch .envs .hatch-test ]
141
- features = [" anthropic" , " litellm" , " llamaapi" , " ollama" , " openai" , " otel" , " mistral" , " writer" , " a2a" , " sagemaker" ]
142
- extra-dependencies = [
143
- " moto>=5.1.0,<6.0.0" ,
127
+ installer = " uv"
128
+ features = [" all" ]
129
+ extra-args = [" -n" , " auto" , " -vv" ]
130
+ dependencies = [
144
131
" pytest>=8.0.0,<9.0.0" ,
145
- " pytest-cov>=6 .0.0,<7 .0.0" ,
132
+ " pytest-cov>=7 .0.0,<8 .0.0" ,
146
133
" pytest-asyncio>=1.0.0,<1.2.0" ,
147
134
" pytest-xdist>=3.0.0,<4.0.0" ,
135
+ " moto>=5.1.0,<6.0.0" ,
148
136
]
149
- extra-args = [
150
- " -n" ,
151
- " auto" ,
152
- " -vv" ,
153
- ]
154
-
155
- [tool .hatch .envs .dev ]
156
- dev-mode = true
157
- features = [" dev" , " docs" , " anthropic" , " litellm" , " llamaapi" , " ollama" , " otel" , " mistral" , " writer" , " a2a" , " sagemaker" ]
158
137
159
138
[[tool .hatch .envs .hatch-test .matrix ]]
160
139
python = [" 3.13" , " 3.12" , " 3.11" , " 3.10" ]
161
140
162
141
[tool .hatch .envs .hatch-test .scripts ]
163
- run = [
164
- " pytest{env:HATCH_TEST_ARGS:} {args}"
165
- ]
166
- run-cov = [
167
- " pytest{env:HATCH_TEST_ARGS:} --cov --cov-config=pyproject.toml {args}"
168
- ]
169
-
142
+ run = " pytest{env:HATCH_TEST_ARGS:} {args}" # Run with: hatch test
143
+ run-cov = " pytest{env:HATCH_TEST_ARGS:} {args} --cov --cov-config=pyproject.toml --cov-report html --cov-report xml {args}" # Run with: hatch test -c
170
144
cov-combine = []
171
145
cov-report = []
172
146
173
147
174
- [tool .hatch .envs .default .scripts ]
175
- list = [
176
- " echo 'Scripts commands available for default env:'; hatch env show --json | jq --raw-output '.default.scripts | keys[]'"
177
- ]
178
- format = [
179
- " hatch fmt --formatter" ,
180
- ]
181
- test-format = [
182
- " hatch fmt --formatter --check" ,
183
- ]
184
- lint = [
185
- " hatch fmt --linter"
186
- ]
187
- test-lint = [
188
- " hatch fmt --linter --check"
189
- ]
190
- test = [
191
- " hatch test --cover --cov-report html --cov-report xml {args}"
192
- ]
193
- test-integ = [
194
- " hatch test tests_integ {args}"
148
+ [tool .hatch .envs .default ]
149
+ installer = " uv"
150
+ dev-mode = true
151
+ features = [" all" ]
152
+ dependencies = [
153
+ " commitizen>=4.4.0,<5.0.0" ,
154
+ " hatch>=1.0.0,<2.0.0" ,
155
+ " pre-commit>=3.2.0,<4.4.0" ,
195
156
]
157
+
158
+
159
+ [tool .hatch .envs .default .scripts ]
160
+ list = " echo 'Scripts commands available for default env:'; hatch env show --json | jq --raw-output '.default.scripts | keys[]'"
161
+
162
+ format = " hatch fmt --formatter"
163
+ test-format = " hatch fmt --formatter --check"
164
+
165
+ lint = " hatch fmt --linter"
166
+ test-lint = " hatch fmt --linter --check"
167
+
168
+ test = " hatch test {args}"
169
+ test-integ = " hatch test tests_integ {args}"
170
+
196
171
prepare = [
197
- " hatch fmt --formatter" ,
198
- " hatch fmt --linter" ,
172
+ " hatch run test-format" ,
199
173
" hatch run test-lint" ,
200
174
" hatch test --all"
201
175
]
@@ -216,22 +190,19 @@ warn_unreachable = true
216
190
follow_untyped_imports = true
217
191
ignore_missing_imports = false
218
192
219
- [[tool .mypy .overrides ]]
220
- module = " litellm"
221
- ignore_missing_imports = true
222
193
223
194
[tool .ruff ]
224
195
line-length = 120
225
196
include = [" examples/**/*.py" , " src/**/*.py" , " tests/**/*.py" , " tests_integ/**/*.py" ]
226
197
227
198
[tool .ruff .lint ]
228
199
select = [
229
- " B" , # flake8-bugbear
230
- " D" , # pydocstyle
231
- " E" , # pycodestyle
232
- " F" , # pyflakes
233
- " G" , # logging format
234
- " I" , # isort
200
+ " B" , # flake8-bugbear
201
+ " D" , # pydocstyle
202
+ " E" , # pycodestyle
203
+ " F" , # pyflakes
204
+ " G" , # logging format
205
+ " I" , # isort
235
206
" LOG" , # logging
236
207
]
237
208
@@ -241,12 +212,12 @@ select = [
241
212
[tool .ruff .lint .pydocstyle ]
242
213
convention = " google"
243
214
215
+
244
216
[tool .pytest .ini_options ]
245
- testpaths = [
246
- " tests"
247
- ]
217
+ testpaths = [" tests" ]
248
218
asyncio_default_fixture_loop_scope = " function"
249
219
220
+
250
221
[tool .coverage .run ]
251
222
branch = true
252
223
source = [" src" ]
@@ -263,13 +234,12 @@ directory = "build/coverage/html"
263
234
[tool .coverage .xml ]
264
235
output = " build/coverage/coverage.xml"
265
236
237
+
266
238
[tool .commitizen ]
267
239
name = " cz_conventional_commits"
268
240
tag_format = " v$version"
269
241
bump_message = " chore(release): bump version $current_version -> $new_version"
270
- version_files = [
271
- " pyproject.toml:version" ,
272
- ]
242
+ version_files = [" pyproject.toml:version" ]
273
243
update_changelog_on_bump = true
274
244
style = [
275
245
[" qmark" , " fg:#ff9d00 bold" ],
0 commit comments