strands-agents release Nov 12, 2025 #1177
Replies: 2 comments
-
strands-agents 1.16.0Major FeaturesAsync Hooks Support - PR#1119Hooks now support asynchronous callbacks, allowing your hook code to run concurrently with other async tasks without blocking the event loop. This is particularly beneficial for async agent invocations and scenarios where hooks perform I/O operations. import asyncio
from strands import Agent
from strands.hooks import BeforeInvocationEvent, HookProvider, HookRegistry
class AsyncHook(HookProvider):
def register_hooks(self, registry: HookRegistry, **kwargs) -> None:
registry.add_callback(BeforeInvocationEvent, self.async_callback)
async def async_callback(self, event: BeforeInvocationEvent) -> None:
# Perform async operations without blocking the event loop
await asyncio.sleep(1)
print("Hook executed asynchronously!")
agent = Agent(hooks=[AsyncHook()])
await agent.invoke_async("Hello!")Thread Context Sharing - PR#1146Context variables ( from contextvars import ContextVar
from strands import Agent, tool
request_id = ContextVar('request_id')
@tool
def my_tool():
# Context variables are now accessible within tools
current_request_id = request_id.get()
return f"Processing request: {current_request_id}"
request_id.set("abc-123")
agent = Agent(tools=[my_tool])
response = agent.invoke_async("Use my tool") # Context is properly propagatedEnhanced Telemetry with Tool Definitions - PR#1113Tool definitions are now included in OpenTelemetry traces via semantic convention opt-in, providing better observability into agent tool usage, following the OpenTelemetry semantic conventions for GenAI. Opt-in via environment variable: OTEL_SEMCONV_STABILITY_OPT_IN=gen_ai_tool_definitionsfrom strands import Agent, tool
from strands_tools import calculator
# Tool definition will appear in telemetry traces
agent = Agent(tools=[calculator])
agent("What is 5 + 3?")String Descriptions in Annotated Tool Parameters - PR#1089You can now use simple string descriptions directly in from typing import Annotated
from strands import tool
@tool
def get_weather(
location: Annotated[str, "The city and state, e.g., San Francisco, CA"],
units: Annotated[str, "Temperature units: 'celsius' or 'fahrenheit'"] = "celsius"
):
"""Get weather for a location."""
return f"Weather in {location}: 72°{units[0].upper()}"
# Previously required more verbose Field() syntax or using a doc-stringMajor Bug Fixes
All changes
Full Changelog: v1.15.0...v1.16.0 |
Beta Was this translation helpful? Give feedback.
-
strands-agents-tools 0.2.15What's Changed
New Contributors
Full Changelog: strands-agents/tools@v0.2.14...v0.2.15 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, everyone! We completed a patch release for the SDK & tools
For details on the changes, please refer to the release notes:
sdk-pythontoolsBeta Was this translation helpful? Give feedback.
All reactions