Skip to content

fix(ai): Cap strands-agents-tools below 0.9 - #380

Open
dfkunstler wants to merge 1 commit into
awslabs:mainfrom
dfkunstler:fix/pin-strands-agents-tools-0.9
Open

dfkunstler wants to merge 1 commit into
awslabs:mainfrom
dfkunstler:fix/pin-strands-agents-tools-0.9

Conversation

@dfkunstler

Copy link
Copy Markdown
Contributor

Issue # (if applicable)

Closes #379.

Reason for this change

strands-agents-tools 0.9.0 (PyPI, 2026-11-04) removed strands_tools.file_read and strands_tools.file_write. The package imports both at start. A new install, such as uvx --from git+..., resolves 0.9.0 and the CLI and the MCP server stop with an ImportError before they do any work. The committed uv.lock pins 0.8.6, so it does not show the defect.

Description of changes

Set the limit strands-agents-tools>=0.2,<0.9 in packages/threat-composer-ai/pyproject.toml, and update the matching requires-dist line in uv.lock (one line).

This is a short-term fix. The long-term fix moves threat_composer_workdir_file_read.py and threat_composer_workdir_file_write.py to strands.vended_tools. That change is larger: the vended read tool has no modes, globs or multi-path reads, so it changes what the agents can do and needs an eval run. It will be a separate pull request.

I regenerated uv.lock with a newer uv than the repository used (lock revision 3 to 5), and it rewrote about 200 lines. I reverted that and edited the one specifier line by hand. uv lock --check passes.

Describe any new or updated permissions being added

None.

Description of how you validated changes

Checklist

  • The title follows type(scope): Subject. It becomes the commit message on main.
  • The build passes locally. See "Verify a change" in AGENTS.md. (Package tests only; see above.)
  • If behaviour changed, the docs are updated in this pull request, or the description says why not. (No behaviour change.)
  • If this touches an area the threat model covers, the threat model is updated, or the description says why not. (It does not: a dependency bound only.)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

strands-agents-tools 0.9.0 removed strands_tools.file_read and
strands_tools.file_write. The package imports both at start, so a new
install that resolves 0.9.0 stops with an ImportError before it does any
work. The committed uv.lock pins 0.8.6, so it does not show the defect.

Cap the range at <0.9 until the two wrapper tools move to the read and
write tools in strands.vended_tools.

Refs awslabs#379

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] threat-composer-ai fails at import because strands-agents-tools 0.9.0 removed strands_tools.file_read and file_write

1 participant