Returns the base agent graph in DOT format without any highlights. This endpoint allows the frontend to fetch the graph structure once and compute highlights client-side for better performance. Args: app_name: The name of the agent/app dark_mode: Whether to use da
(
app_name: str, dark_mode: bool = False
)
| 1112 | tags=[TAG_DEBUG], |
| 1113 | ) |
| 1114 | async def get_app_graph_dot( |
| 1115 | app_name: str, dark_mode: bool = False |
| 1116 | ) -> GetEventGraphResult | dict: |
| 1117 | """Returns the base agent graph in DOT format without any highlights. |
| 1118 | |
| 1119 | This endpoint allows the frontend to fetch the graph structure once |
| 1120 | and compute highlights client-side for better performance. |
| 1121 | |
| 1122 | Args: |
| 1123 | app_name: The name of the agent/app |
| 1124 | dark_mode: Whether to use dark theme background color |
| 1125 | """ |
| 1126 | agent_or_app = self.agent_loader.load_agent(app_name) |
| 1127 | root_agent = self._get_root_agent(agent_or_app) |
| 1128 | |
| 1129 | # Get graph with NO highlights (empty list) and specified theme |
| 1130 | dot_graph = await agent_graph.get_agent_graph( |
| 1131 | root_agent, [], dark_mode=dark_mode |
| 1132 | ) |
| 1133 | |
| 1134 | if dot_graph and isinstance(dot_graph, graphviz.Digraph): |
| 1135 | return GetEventGraphResult(dot_src=dot_graph.source) |
| 1136 | else: |
| 1137 | return {} |
| 1138 | |
| 1139 | # TODO: This endpoint can be removed once we update adk web to stop consuming it |
| 1140 | @app.get( |
nothing calls this directly
no test coverage detected