Skip to content

Conversation

@yonib05
Copy link
Member

@yonib05 yonib05 commented May 16, 2025

Description

Add Anthropic Claude API support to the SDK, enabling integration with Claude models for agent functionality. This implementation includes proper message formatting, tool use
handling, and media support.

Documentation PR

PR in the agent-docs repo will be submitted separately.

Type of Change

  • New feature

Testing

[How have you tested the change?]

  • All unit tests pass
  • Verified functionality with basic agent operations
  • Verified proper message formatting and tool use
  • Validated media handling for images
  • Ran:
    • hatch fmt --linter
    • hatch fmt --formatter
    • hatch test --all

Checklist

  • I have read the CONTRIBUTING document
  • I have added 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
  • 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.

Co-authored-by: Patrick Gray <pgrayy@amazon.com>
Co-authored-by: Jason Kim <jkim@anthropic.com>
@yonib05 yonib05 requested a review from a team as a code owner May 16, 2025 16:11
@yonib05 yonib05 enabled auto-merge (squash) May 16, 2025 16:57
@yonib05 yonib05 disabled auto-merge May 16, 2025 17:16
@yonib05 yonib05 merged commit b213e34 into strands-agents:main May 16, 2025
6 checks passed
satsumas added a commit to Stability-AI/strands-sdk-python that referenced this pull request Jun 23, 2025
mkmeral pushed a commit to mkmeral/sdk-python that referenced this pull request Nov 10, 2025
feat: (Agent): Finalize Bidirectional Agent class
mkmeral pushed a commit to mkmeral/sdk-python that referenced this pull request Jan 9, 2026
- Fix invoke_async to delegate to stream_async (prevents returning first incomplete event)
- Add async context manager support (__aenter__/__aexit__) and explicit aclose() method
- Improve __del__ cleanup to handle event loop edge cases
- Change logger.info to logger.debug for consistency with project standards
- Simplify factory creation with _create_default_factory() helper method
- Add comprehensive documentation to A2AStreamEvent
- Improve test fixture pattern with pytest fixture for subprocess management
- Add comprehensive e2e tests for invoke_async, stream_async, and context manager

Addresses PR strands-agents#1174 review comments:
- Comment strands-agents#2: Critical bug - invoke_async now waits for complete events
- Comment strands-agents#5: Code duplication - invoke_async delegates to stream_async
- Comment strands-agents#6: Async cleanup - proper async context manager pattern
- Comment strands-agents#3: Logging level - changed to debug
- Comment strands-agents#4: Factory simplification - extracted helper method
- Comment strands-agents#12: Documentation - documented A2AStreamEvent behavior
- Comment strands-agents#9: Test fixture - using pytest fixture pattern
- Comment strands-agents#10: Test coverage - added comprehensive e2e tests
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.

2 participants