@@ -54,6 +54,7 @@ Strands Agents Tools is a community-driven project that provides a powerful set
5454- 🐝 ** Swarm Intelligence** - Coordinate multiple AI agents for parallel problem solving with shared memory
5555- 🔄 ** Multiple tools in Parallel** - Call multiple other tools at the same time in parallel with Batch Tool
5656- 🔍 ** Browser Tool** - Tool giving an agent access to perform automated actions on a browser (chromium)
57+ - 📈 ** Diagram** - Create AWS cloud diagrams, basic diagrams, or UML diagrams using python libraries
5758
5859## 📦 Installation
5960
@@ -128,6 +129,7 @@ Below is a comprehensive table of all available tools, how to use them with an a
128129| workflow | ` agent.tool.workflow(action="create", name="data_pipeline", steps=[{"tool": "file_read"}, {"tool": "python_repl"}]) ` | Define, execute, and manage multi-step automated workflows |
129130| batch| ` agent.tool.batch(invocations=[{"name": "current_time", "arguments": {"timezone": "Europe/London"}}, {"name": "stop", "arguments": {}}]) ` | Call multiple other tools in parallel. |
130131| browser | ` browser = LocalChromiumBrowser(); agent = Agent(tools=[browser.browser]) ` | Web scraping, automated testing, form filling, web automation tasks |
132+ | diagram | ` agent.tool.diagram(diagram_type="cloud", nodes=[{"id": "s3", "type": "S3"}], edges=[]) ` | Create AWS cloud architecture diagrams, network diagrams, graphs, and UML diagrams (all 14 types) |
131133
132134\* * These tools do not work on windows*
133135
@@ -450,6 +452,55 @@ response = agent("discover available agents and send a greeting message")
450452# - send_message(message_text, target_agent_url) to communicate
451453```
452454
455+ ### Diagram
456+
457+ ``` python
458+ from strands import Agent
459+ from strands_tools import diagram
460+
461+ agent = Agent(tools = [diagram])
462+
463+ # Create an AWS cloud architecture diagram
464+ result = agent.tool.diagram(
465+ diagram_type = " cloud" ,
466+ nodes = [
467+ {" id" : " users" , " type" : " Users" , " label" : " End Users" },
468+ {" id" : " cloudfront" , " type" : " CloudFront" , " label" : " CDN" },
469+ {" id" : " s3" , " type" : " S3" , " label" : " Static Assets" },
470+ {" id" : " api" , " type" : " APIGateway" , " label" : " API Gateway" },
471+ {" id" : " lambda" , " type" : " Lambda" , " label" : " Backend Service" }
472+ ],
473+ edges = [
474+ {" from" : " users" , " to" : " cloudfront" },
475+ {" from" : " cloudfront" , " to" : " s3" },
476+ {" from" : " users" , " to" : " api" },
477+ {" from" : " api" , " to" : " lambda" }
478+ ],
479+ title = " Web Application Architecture"
480+ )
481+
482+ # Create a UML class diagram
483+ result = agent.tool.diagram(
484+ diagram_type = " class" ,
485+ elements = [
486+ {
487+ " name" : " User" ,
488+ " attributes" : [" +id: int" , " -name: string" , " #email: string" ],
489+ " methods" : [" +login(): bool" , " +logout(): void" ]
490+ },
491+ {
492+ " name" : " Order" ,
493+ " attributes" : [" +id: int" , " -items: List" , " -total: float" ],
494+ " methods" : [" +addItem(item): void" , " +calculateTotal(): float" ]
495+ }
496+ ],
497+ relationships = [
498+ {" from" : " User" , " to" : " Order" , " type" : " association" , " multiplicity" : " 1..*" }
499+ ],
500+ title = " E-commerce Domain Model"
501+ )
502+ ```
503+
453504## 🌍 Environment Variables Configuration
454505
455506Agents Tools provides extensive customization through environment variables. This allows you to configure tool behavior without modifying code, making it ideal for different environments (development, testing, production).
0 commit comments