This release includes breaking changes for platform teams planning a safe upgrade.
✓ No known CVEs patched in this version
Topics
+13 more
Affected surfaces
Summary
AI summaryBroad release touches Major Bug Fixes, Major Features, fix, and https://github.com/strands-agents/sdk-python/pull/1117.
Full changelog
Major Features
MCP Resource Operations - PR#1117
The MCP client now supports resource operations, enabling agents to list, read, and work with resources provided by MCP servers. This includes static resources, binary resources, and parameterized resource templates.
from strands.tools.mcp import MCPClient
with MCPClient(server_transport) as client:
# List available resources
resources = client.list_resources_sync()
for resource in resources.resources:
print(f"Resource: {resource.name} at {resource.uri}")
# Read a specific resource
content = client.read_resource_sync("file://documents/report.txt")
text = content.contents[0].text
# List resource templates (parameterized resources)
templates = client.list_resource_templates_sync()
for template in templates.resourceTemplates:
print(f"Template: {template.uriTemplate}")
Bedrock Guardrails Latest Message Option - PR#1224
Bedrock models now support the guardrail_latest_message parameter, which sends only the latest user message to AWS Bedrock Guardrails for evaluation instead of the entire conversation history. This reduces token usage and enables conversation recovery after guardrail interventions.
from strands.models.bedrock import BedrockModel
model = BedrockModel(
model_id="us.anthropic.claude-sonnet-4-20250514-v1:0",
guardrail_id="your-guardrail-id",
guardrail_version="DRAFT",
guardrail_latest_message=True # Only evaluate the latest user message
)
See the Bedrock Guardrails documentation for more details.
LiteLLM Non-Streaming Support - PR#512
The LiteLLM model provider now correctly handles non-streaming responses, fixing an issue where stream=False would raise an error. Both streaming and non-streaming modes now work seamlessly.
from strands.models.litellm import LiteLLMModel
# Use non-streaming mode for simpler response handling
model = LiteLLMModel(
model_id="gpt-3.5-turbo",
params={"stream": False}
)
# Works correctly now - no more ValueError
agent = Agent(model=model)
result = agent("What is 2+2?")
Major Bug Fixes
-
Concurrent Agent Invocations - PR#1453
Fixed critical agent state corruption when multiple concurrent invocations occurred on the same agent instance. A newConcurrencyExceptionis now raised to prevent concurrent invocations and protect agent state integrity. -
Gemini Empty Stream Handling - PR#1420
Fixed UnboundLocalError crash when Gemini returns an empty event stream by properly initializing variables before the stream loop. -
Deprecation Warning on Import - PR#1380
Fixed unwanted deprecation warnings appearing when importingstrandsby using lazy__getattr__to emit warnings only when deprecated aliases are actually accessed.
What's Changed
- docs: update github agent action to reference S3_SESSION_BUCKET by @dbschmigelski in https://github.com/strands-agents/sdk-python/pull/1418
- feat: provide extra command content as the the prompt to the agent by @zastrowm in https://github.com/strands-agents/sdk-python/pull/1419
- [FEATURE] add MCP resource operations in MCP Tools by @xiehust in https://github.com/strands-agents/sdk-python/pull/1117
- fix: import errors for models with optional imports by @mehtarac in https://github.com/strands-agents/sdk-python/pull/1384
- add BidiGeminiLiveModel and BidiOpenAIRealtimeModel to the init by @mehtarac in https://github.com/strands-agents/sdk-python/pull/1383
- bidi - async - remove cancelling call by @pgrayy in https://github.com/strands-agents/sdk-python/pull/1357
- feat(bedrock): add guardrail_latest_message option by @aiancheruk in https://github.com/strands-agents/sdk-python/pull/1224
- fix(gemini): UnboundLocal Exception Fix by @emattiza in https://github.com/strands-agents/sdk-python/pull/1420
- fix! Litellm handle non streaming response fix for issue #477 by @schleidl in https://github.com/strands-agents/sdk-python/pull/512
- feat(agent-interface): introduce AgentBase Protocol as the interface for agent classes to implement by @awsarron in https://github.com/strands-agents/sdk-python/pull/1126
- ci: update pytest requirement from <9.0.0,>=8.0.0 to >=8.0.0,<10.0.0 in the dev-dependencies group by @dependabot[bot] in https://github.com/strands-agents/sdk-python/pull/1161
- feat: pass invocation_state to model providers by @tirth14 in https://github.com/strands-agents/sdk-python/pull/1414
- Add Security.md file by @yonib05 in https://github.com/strands-agents/sdk-python/pull/1454
- chore: Update release notes sop by @zastrowm in https://github.com/strands-agents/sdk-python/pull/1456
- fix(integ): make calculator tool more robust to LLM output variations by @cagataycali in https://github.com/strands-agents/sdk-python/pull/1445
- fix: resolve string formatting error in MCP client error handling by @cagataycali in https://github.com/strands-agents/sdk-python/pull/1446
- bidi - move 3.12 check to nova sonic module by @pgrayy in https://github.com/strands-agents/sdk-python/pull/1439
- ci: update sphinx requirement from <9.0.0,>=5.0.0 to >=5.0.0,<10.0.0 by @dependabot[bot] in https://github.com/strands-agents/sdk-python/pull/1426
- fix: add concurrency protection to prevent parallel invocations from corrupting agent state by @zastrowm in https://github.com/strands-agents/sdk-python/pull/1453
- fix(mcp): propagate contextvars to background thread by @cagataycali in https://github.com/strands-agents/sdk-python/pull/1444
- Update to opus 4.5 by @Unshure in https://github.com/strands-agents/sdk-python/pull/1471
New Contributors
- @aiancheruk made their first contribution in https://github.com/strands-agents/sdk-python/pull/1224
- @emattiza made their first contribution in https://github.com/strands-agents/sdk-python/pull/1420
- @schleidl made their first contribution in https://github.com/strands-agents/sdk-python/pull/512
- @tirth14 made their first contribution in https://github.com/strands-agents/sdk-python/pull/1414
Full Changelog: https://github.com/strands-agents/sdk-python/compare/v1.21.0...v1.22.0
Weekly OSS security release digest.
The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.
No spam, unsubscribe anytime.
Share this release
About harness-sdk
A model-driven approach to building AI agents in just a few lines of code.
Related context
Related tools
Beta — feedback welcome: [email protected]