feat: add AgentAsTool#1932
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
Issue: The original issue #1002 mentions a Question: Is this parameter intentionally deferred to a follow-up PR, or should it be included in this initial implementation? The current implementation appears to preserve context by default (since it uses the same agent instance), but there's no way for users to reset context between calls. This could be a breaking change if added later, so it would be good to clarify the intended behavior. |
Code Review SummaryAssessment: Request Changes This PR introduces a well-designed Review Categories
The core implementation looks solid - just needs the documentation PR linked to unblock merge. |
|
/strands review |
Code Review Summary - UpdatedAssessment: Approve ✅ Thank you for addressing the feedback from the previous review! All blocking issues have been resolved: Changes Addressed
Minor Notes (Non-blocking)
The implementation is well-designed, follows SDK patterns, and includes proper error handling and logging. Ready to merge once the awsarron discussion is resolved and any CI checks pass. |
…e; yield AgentAsToolStreamEvents; small fixes
|
/strands review |
|
/strands review |
Code Review Summary - Round 5Assessment: Request Changes The session manager divergence bug has been addressed with a Blocking Issues
What's Been Addressed
Design Decision Needed@mkmeral raised a valid point: should
The current state (private name + public export) is contradictory. I'd suggest option 1 (truly private) since customers have Once the export inconsistency is resolved, this is ready to merge. |
|
/strands review |
Code Review Summary - Round 6Assessment: Approve ✅ All blocking issues from previous reviews have been resolved. Issues Resolved
Final Implementation SummaryAPI Design:
Key Features:
Test Coverage: 97.20% with 676 lines of comprehensive tests The implementation is well-designed, follows SDK patterns, and addresses the original issue #1002 completely. Ready to merge! 🎉 |
Description
Will close #1002.
This PR adds the
AgentAsToolclass as well as a convenience method on theAgentclass to return an instance of it.The
AgentAsToolclass just callsstream_asyncon the underlying agent and formats the response as aToolResultEvent.The added integration test confirms that an AgentAsTool was invoked and that agent-as-tool used a tool of its own.
Related Issues
#1002
Documentation PR
strands-agents/docs#686
Type of Change
New feature
Testing
Added unit tests
Added a minimal integ test
[ x] I ran
hatch run prepareChecklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.