Description
Is your feature request related to a problem? Please describe.
When developing workflows it's often nice to visualize how the steps connect to one another in order to understand what happens when the workflow is executed. The google-adk
workflow docs include diagrams which help in understanding how each workflow works. LangGraph provides a handy mermaid export capability for graphs built in that system. A similar visualization method could be applied within google-adk
by using the workflows and their sub-agents to help depict how the agents are connected to one another. One nice side effect of this is that one can visualize and version control the depiction of the workflow so both the developer and reviewers would have an easier time understanding what changes have been made to workflows.
Stated as a user story:
As an agentic engineer I need a way to visually understand how workflows and sub-agents are connected to one another in order to effectively and efficiently design, troubleshoot, version, and review google-adk
software implementations.
Describe the solution you'd like
I'd like to see a function or method which can take as an input an agent (for example root_agent
) and provide me with Mermaid diagram code and a PNG or SVG of the rendered output.
Describe alternatives you've considered
adk web
provides some of what I describe but in a less portable or version-able format. Specifically I'm interested in being able to view the workflow visualization within source code, development environments, and Jupyter notebooks (which can capture the state of the workflow design).
Additional context
I've built a proof-of-concept on this within this Google Colab notebook (gist backup).