Skip to content

Conversation

zastrowm
Copy link
Member

@zastrowm zastrowm commented Aug 28, 2025

Description

#557 provided ToolContext which enabled tool_use but we held off on invocation_state until we had customer demand/use-cases. Issues #579 and #750 point out use cases that can't be easily solved today, so we'll allow invocation_state to be plumbed through.

We still have problems with the SDK updating the invocation_state, but it's an existing problem that we can't address until 2.0.

Naming

I went with invocation_state to match what we use in AgentTool.stream(), though the description refers to keyword arguments passed to agent invocation.

Related Issues

Addresses issue #579, #750

Documentation PR

Will be a follow-up PR in the docs repo

Type of Change

New feature

Testing

How have you tested the change? Verify that the changes do not break functionality or introduce warnings in consuming repositories: agents-docs, agents-tools, agents-cli

  • I ran hatch run prepare

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

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

Unshure
Unshure previously approved these changes Aug 28, 2025
@zastrowm zastrowm merged commit b008cf5 into strands-agents:main Aug 28, 2025
12 checks passed
Ratish1 pushed a commit to Ratish1/sdk-python that referenced this pull request Aug 30, 2025
Addresses issue strands-agents#579, strands-agents#750

---------

Co-authored-by: Mackenzie Zastrow <zastrowm@users.noreply.github.com>
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.

4 participants