Skip to content

Commit 2bd1245

Browse files
feat: migrate multi-agent tools to sdk native patterns and model support (#143)
* feat: Major refactor - Migrate to Strands SDK native patterns & add comprehensive model support 🚀 Overview: - Migrate custom implementations to native Strands SDK patterns - Add comprehensive model provider support (9+ providers) - Enhance reliability, performance, and user experience - Maintain backward compatibility 🔄 Key Changes: - agent_graph.py → graph.py (SDK GraphBuilder integration) - use_llm.py → use_agent.py (enhanced nested agent creation) - Complete swarm tool architecture overhaul - Enhanced think tool with model switching - Production-ready workflow orchestration - New model utilities system in src/strands_tools/models/ 📊 Impact: - Files Changed: 25+ files - Lines Added: ~2,000 lines - Lines Removed: ~1,100 lines - New model providers: Bedrock, Anthropic, LiteLLM, LlamaAPI, Ollama, OpenAI, Writer, Cohere, GitHub - 700+ test cases covering new functionality ✅ Backward compatibility maintained with gradual migration path * fix(deps): convert SSH git URLs to HTTPS for GitHub runner compatibility - Changed git+ssh://[email protected] URLs to git+https://github.com URLs - Fixes git clone failures in CI/CD environments that lack SSH key access - Updated both main dependencies and hatch-static-analysis dependencies * feat: restore deprecated tools for backward compatibility and update deps - Add use_llm and agent_graph tools back with deprecation warnings - These tools will be removed in next major release - Move Stability AI documentation to docs/stability_ai_tool.md - Update pyproject.toml dependencies to use proper version ranges - Add comprehensive test suites for both deprecated tools - Maintain backward compatibility while guiding users to new APIs * build: replace git dependency with version constraint for strands-agents * refactor(models): move models to utils/models directory - Move all model files from strands_tools/models/ to strands_tools/utils/models/ - Update import statements in graph.py, think.py, use_agent.py, and workflow.py - Reorganize codebase structure for better organization * fix(deps): remove duplicate strands-agents dependency - Removed duplicate strands-agents[a2a] dependency from pyproject.toml - Keeps only the base strands-agents dependency --------- Co-authored-by: Arron <[email protected]>
1 parent b1dd277 commit 2bd1245

28 files changed

+5354
-2528
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ errors/
1313
repl_state/
1414
venv/
1515
*.egg-info
16+
.DS_Store

src/strands_tools/stability_ai_tool.md renamed to docs/stability_ai_tool.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,4 +142,4 @@ The available parameters that can be passed to the tool are:
142142
## References
143143

144144
- [Strands Agents Tools](https://strandsagents.com/latest/user-guide/concepts/tools/tools_overview/)
145-
- [Stability AI Stable Image Generation](https://platform.stability.ai/docs/api-reference#tag/Generate)
145+
- [Stability AI Stable Image Generation](https://platform.stability.ai/docs/api-reference#tag/Generate)

src/strands_tools/agent_graph.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,11 @@ def agent_graph(tool: ToolUse, **kwargs: Any) -> ToolResult:
514514
messages = kwargs.get("messages")
515515
tool_config = kwargs.get("tool_config")
516516

517+
logger.warning(
518+
"DEPRECATION WARNING: agent_graph will be removed in the next major release. "
519+
"Migration path: replace agent_graph calls with graph for equivalent functionality."
520+
)
521+
517522
try:
518523
# Create tool context
519524
tool_context = {

0 commit comments

Comments
 (0)