Skip to content

Conversation

@jimbrub
Copy link
Contributor

@jimbrub jimbrub commented Jul 9, 2025

Description

This PR introduces a diagram creation tool that supports multiple diagram types and output formats, making it easier for agents to generate visual representations of systems, architectures, and processes.

  • This tool can be used to generate some basic diagrams:
    • Cloud architecture diagrams (AWS services)
    • Network diagrams
    • Graph diagrams
  • This tool can also be used to generate the 14 different UML (Unified Modeling Language) diagrams:
    • Structural
      • Class
      • Composite Structure
      • Object
      • Component
      • Deployment
      • Package
      • Profile
    • Behavioral
      • State Machine
      • Activity
      • Use Case
      • Sequence
      • Communication
      • Timing
      • Interaction Overview
  • Multiple output formats supported:
    • Image formats (PNG, SVG, PDF)
  • Class-based architecture with DiagramBuilder and UMLDiagramBuilder
  • This tool can be paired with the editor tool so an agent can look at code and generate diagrams illustrating how the code works
  • If the user wants a Mermaid or ASCII diagram the tool reverts to the LLM's reasoning because these formats are well documented

Related Issues

Closes #104

Documentation PR

[Link to related associated PR in the agent-docs repo]

Type of Change

  • Bug fix
  • New Tool
  • Breaking change
  • Other (please describe):

Testing

[How have you tested the change?]

  • 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.

@jimbrub jimbrub force-pushed the diagram_tool branch 2 times, most recently from b59976e to e3cf9fe Compare July 16, 2025 15:24
@jimbrub jimbrub marked this pull request as ready for review July 17, 2025 14:37
@jimbrub jimbrub requested a review from a team as a code owner July 17, 2025 14:37
@cagataycali
Copy link
Member

I've tested the diagram tool in my local, and amazing job...

Code looks very busy with templates around UML diagram generation and I believe we can iterate on the code later on.

image image

Noticed that AWS service names are not 1:1 mapped with diagram tool we're using under the hood, that leads to failure and agent tries to simplify the design,

Tool #1: diagram
Let me fix the diagram by using the correct AWS service names:
Tool #2: diagram
Let me try with the exact service name for OpenSearch:
Tool #3: diagram
Let me simplify and create a comprehensive diagram without the problematic components, but still with many AWS services:
Tool #4: diagram

We can expand the static list of names in the code so tool can map the names correctly ^^

@jimbrub jimbrub changed the title Diagram tool feat(tools): add diagram tool to Strands tools repository Jul 21, 2025
@jimbrub jimbrub force-pushed the diagram_tool branch 2 times, most recently from 68e5a06 to ec8df7c Compare July 21, 2025 18:12
Copy link
Member

@cagataycali cagataycali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@cagataycali cagataycali merged commit 7f1ddff into strands-agents:main Jul 22, 2025
14 checks passed
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