@@ -45,10 +45,10 @@ def get_all_nodes(agent: Agent, parent: Optional[Agent] = None) -> str:
45
45
46
46
# Start and end the graph
47
47
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];"
52
52
)
53
53
# Ensure parent agent node is colored
54
54
if not parent :
@@ -95,9 +95,7 @@ def get_all_edges(agent: Agent, parent: Optional[Agent] = None) -> str:
95
95
parts = []
96
96
97
97
if not parent :
98
- parts .append (
99
- f'"__start__" -> "{ agent .name } ";'
100
- )
98
+ parts .append (f'"__start__" -> "{ agent .name } ";' )
101
99
102
100
for tool in agent .tools :
103
101
parts .append (f"""
@@ -114,9 +112,7 @@ def get_all_edges(agent: Agent, parent: Optional[Agent] = None) -> str:
114
112
parts .append (get_all_edges (handoff , agent ))
115
113
116
114
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__";' )
120
116
121
117
return "" .join (parts )
122
118
0 commit comments