@@ -45,10 +45,10 @@ def get_all_nodes(agent: Agent, parent: Optional[Agent] = None) -> str:
4545
4646 # Start and end the graph
4747 parts .append (
48- f '"__start__" [label="__start__", shape=ellipse, style=filled, '
49- f "fillcolor=lightblue, width=0.5, height=0.3];"
50- f '"__end__" [label="__end__", shape=ellipse, style=filled, '
51- f "fillcolor=lightblue, width=0.5, height=0.3];"
48+ '"__start__" [label="__start__", shape=ellipse, style=filled, '
49+ "fillcolor=lightblue, width=0.5, height=0.3];"
50+ '"__end__" [label="__end__", shape=ellipse, style=filled, '
51+ "fillcolor=lightblue, width=0.5, height=0.3];"
5252 )
5353 # Ensure parent agent node is colored
5454 if not parent :
@@ -95,9 +95,7 @@ def get_all_edges(agent: Agent, parent: Optional[Agent] = None) -> str:
9595 parts = []
9696
9797 if not parent :
98- parts .append (
99- f'"__start__" -> "{ agent .name } ";'
100- )
98+ parts .append (f'"__start__" -> "{ agent .name } ";' )
10199
102100 for tool in agent .tools :
103101 parts .append (f"""
@@ -114,9 +112,7 @@ def get_all_edges(agent: Agent, parent: Optional[Agent] = None) -> str:
114112 parts .append (get_all_edges (handoff , agent ))
115113
116114 if not agent .handoffs and not isinstance (agent , Tool ):
117- parts .append (
118- f'"{ agent .name } " -> "__end__";'
119- )
115+ parts .append (f'"{ agent .name } " -> "__end__";' )
120116
121117 return "" .join (parts )
122118
0 commit comments