22requires = [" hatchling" , " hatch-vcs" ]
33build-backend = " hatchling.build"
44
5+
56[project ]
67name = " strands-agents"
7- dynamic = [" version" ]
8+ dynamic = [" version" ] # Version determined by git tags
89description = " A model-driven approach to building AI agents in just a few lines of code"
910readme = " README.md"
1011requires-python = " >=3.10"
@@ -38,66 +39,25 @@ dependencies = [
3839 " opentelemetry-instrumentation-threading>=0.51b0,<1.00b0" ,
3940]
4041
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" ]
4842
4943[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.13.0" ,
44+ anthropic = [" anthropic>=0.21.0,<1.0.0" ]
45+ litellm = [" litellm>=1.75.9,<2.0.0" , " openai>=1.68.0,<1.102.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
6454]
55+ otel = [" opentelemetry-exporter-otlp-proto-http>=1.30.0,<2.0.0" ]
6556docs = [
6657 " sphinx>=5.0.0,<6.0.0" ,
6758 " sphinx-rtd-theme>=1.0.0,<2.0.0" ,
6859 " sphinx-autodoc-typehints>=1.12.0,<2.0.0" ,
6960]
70- litellm = [
71- " litellm>=1.75.9,<2.0.0" ,
72- " openai>=1.68.0,<1.102.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-
10161a2a = [
10262 " a2a-sdk>=0.3.0,<0.4.0" ,
10363 " a2a-sdk[sql]>=0.3.0,<0.4.0" ,
@@ -106,22 +66,34 @@ a2a = [
10666 " fastapi>=0.115.12,<1.0.0" ,
10767 " starlette>=0.46.2,<1.0.0" ,
10868]
109- all = [
110- " strands-agents[a2a,anthropic,dev,docs,litellm,llamaapi,mistral,ollama,openai,otel]" ,
111- ]
69+ all = [" strands-agents[a2a,anthropic,docs,litellm,llamaapi,mistral,ollama,openai,writer,sagemaker,otel]" ]
70+
71+
72+ [project .urls ]
73+ Homepage = " https://github.com/strands-agents/sdk-python"
74+ "Bug Tracker" = " https://github.com/strands-agents/sdk-python/issues"
75+ Documentation = " https://strandsagents.com"
76+
77+
78+ [tool .hatch .build .targets .wheel ]
79+ packages = [" src/strands" ]
80+
11281
11382[tool .hatch .version ]
114- # Tells Hatch to use your version control system ( git) to determine the version.
115- source = " vcs "
83+ source = " vcs " # Use git tags for versioning
84+
11685
11786[tool .hatch .envs .hatch-static-analysis ]
118- features = [" anthropic" , " litellm" , " llamaapi" , " ollama" , " openai" , " otel" , " mistral" , " writer" , " a2a" , " sagemaker" ]
87+ installer = " uv"
88+ features = [" all" ]
11989dependencies = [
12090 " mypy>=1.15.0,<2.0.0" ,
12191 " ruff>=0.11.6,<0.12.0" ,
92+ # Include required pacakge dependencies for mypy
12293 " strands-agents @ {root:uri}" ,
12394]
12495
96+ # Define static-analysis scripts so we can include mypy as part of the linting check
12597[tool .hatch .envs .hatch-static-analysis .scripts ]
12698format-check = [
12799 " ruff format --check"
@@ -137,65 +109,54 @@ lint-fix = [
137109 " ruff check --fix"
138110]
139111
112+
140113[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" ,
114+ installer = " uv"
115+ features = [" all" ]
116+ extra-args = [" -n" , " auto" , " -vv" ]
117+ dependencies = [
144118 " pytest>=8.0.0,<9.0.0" ,
145- " pytest-cov>=6 .0.0,<7 .0.0" ,
119+ " pytest-cov>=7 .0.0,<8 .0.0" ,
146120 " pytest-asyncio>=1.0.0,<1.2.0" ,
147121 " pytest-xdist>=3.0.0,<4.0.0" ,
148- ]
149- extra-args = [
150- " -n" ,
151- " auto" ,
152- " -vv" ,
122+ " moto>=5.1.0,<6.0.0" ,
153123]
154124
155- [tool .hatch .envs .dev ]
156- dev-mode = true
157- features = [" dev" , " docs" , " anthropic" , " litellm" , " llamaapi" , " ollama" , " otel" , " mistral" , " writer" , " a2a" , " sagemaker" ]
158-
159125[[tool .hatch .envs .hatch-test .matrix ]]
160126python = [" 3.13" , " 3.12" , " 3.11" , " 3.10" ]
161127
162128[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-
129+ run = " pytest{env:HATCH_TEST_ARGS:} {args}" # Run with: hatch test
130+ 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
170131cov-combine = []
171132cov-report = []
172133
173134
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}"
135+ [tool .hatch .envs .default ]
136+ installer = " uv"
137+ dev-mode = true
138+ features = [" all" ]
139+ dependencies = [
140+ " commitizen>=4.4.0,<5.0.0" ,
141+ " hatch>=1.0.0,<2.0.0" ,
142+ " pre-commit>=3.2.0,<4.4.0" ,
195143]
144+
145+
146+ [tool .hatch .envs .default .scripts ]
147+ list = " echo 'Scripts commands available for default env:'; hatch env show --json | jq --raw-output '.default.scripts | keys[]'"
148+
149+ format = " hatch fmt --formatter"
150+ test-format = " hatch fmt --formatter --check"
151+
152+ lint = " hatch fmt --linter"
153+ test-lint = " hatch fmt --linter --check"
154+
155+ test = " hatch test {args}"
156+ test-integ = " hatch test tests_integ {args}"
157+
196158prepare = [
197- " hatch fmt --formatter" ,
198- " hatch fmt --linter" ,
159+ " hatch run test-format" ,
199160 " hatch run test-lint" ,
200161 " hatch test --all"
201162]
@@ -216,22 +177,19 @@ warn_unreachable = true
216177follow_untyped_imports = true
217178ignore_missing_imports = false
218179
219- [[tool .mypy .overrides ]]
220- module = " litellm"
221- ignore_missing_imports = true
222180
223181[tool .ruff ]
224182line-length = 120
225183include = [" examples/**/*.py" , " src/**/*.py" , " tests/**/*.py" , " tests_integ/**/*.py" ]
226184
227185[tool .ruff .lint ]
228186select = [
229- " B" , # flake8-bugbear
230- " D" , # pydocstyle
231- " E" , # pycodestyle
232- " F" , # pyflakes
233- " G" , # logging format
234- " I" , # isort
187+ " B" , # flake8-bugbear
188+ " D" , # pydocstyle
189+ " E" , # pycodestyle
190+ " F" , # pyflakes
191+ " G" , # logging format
192+ " I" , # isort
235193 " LOG" , # logging
236194]
237195
@@ -241,12 +199,12 @@ select = [
241199[tool .ruff .lint .pydocstyle ]
242200convention = " google"
243201
202+
244203[tool .pytest .ini_options ]
245- testpaths = [
246- " tests"
247- ]
204+ testpaths = [" tests" ]
248205asyncio_default_fixture_loop_scope = " function"
249206
207+
250208[tool .coverage .run ]
251209branch = true
252210source = [" src" ]
@@ -263,13 +221,12 @@ directory = "build/coverage/html"
263221[tool .coverage .xml ]
264222output = " build/coverage/coverage.xml"
265223
224+
266225[tool .commitizen ]
267226name = " cz_conventional_commits"
268227tag_format = " v$version"
269228bump_message = " chore(release): bump version $current_version -> $new_version"
270- version_files = [
271- " pyproject.toml:version" ,
272- ]
229+ version_files = [" pyproject.toml:version" ]
273230update_changelog_on_bump = true
274231style = [
275232 [" qmark" , " fg:#ff9d00 bold" ],
0 commit comments