@@ -692,7 +692,10 @@ class MyOutput:
692692 'id' : 0 ,
693693 'name' : 'agent run' ,
694694 'message' : 'my_agent run' ,
695- 'children' : [{'id' : 1 , 'name' : 'chat test' , 'message' : 'chat test' }],
695+ 'children' : [
696+ {'id' : 1 , 'name' : 'chat test' , 'message' : 'chat test' },
697+ {'id' : 2 , 'name' : 'running tool' , 'message' : 'running tool: output tool' },
698+ ],
696699 }
697700 ]
698701 )
@@ -703,7 +706,10 @@ class MyOutput:
703706 'id' : 0 ,
704707 'name' : 'invoke_agent my_agent' ,
705708 'message' : 'my_agent run' ,
706- 'children' : [{'id' : 1 , 'name' : 'chat test' , 'message' : 'chat test' }],
709+ 'children' : [
710+ {'id' : 1 , 'name' : 'chat test' , 'message' : 'chat test' },
711+ {'id' : 2 , 'name' : 'execute_tool output tool' , 'message' : 'running tool: output tool' },
712+ ],
707713 }
708714 ]
709715 )
@@ -900,7 +906,10 @@ class MyOutput:
900906 'id' : 0 ,
901907 'name' : 'agent run' ,
902908 'message' : 'my_agent run' ,
903- 'children' : [{'id' : 1 , 'name' : 'chat test' , 'message' : 'chat test' }],
909+ 'children' : [
910+ {'id' : 1 , 'name' : 'chat test' , 'message' : 'chat test' },
911+ {'id' : 2 , 'name' : 'running tool' , 'message' : 'running tool: output tool' },
912+ ],
904913 }
905914 ]
906915 )
@@ -911,7 +920,10 @@ class MyOutput:
911920 'id' : 0 ,
912921 'name' : 'invoke_agent my_agent' ,
913922 'message' : 'my_agent run' ,
914- 'children' : [{'id' : 1 , 'name' : 'chat test' , 'message' : 'chat test' }],
923+ 'children' : [
924+ {'id' : 1 , 'name' : 'chat test' , 'message' : 'chat test' },
925+ {'id' : 2 , 'name' : 'execute_tool output tool' , 'message' : 'running tool: output tool' },
926+ ],
915927 }
916928 ]
917929 )
@@ -1381,8 +1393,15 @@ def call_tool(_: list[ModelMessage], info: AgentInfo) -> ModelResponse:
13811393 {'id' : 1 , 'name' : 'chat function:call_tool:' , 'message' : 'chat function:call_tool:' },
13821394 {
13831395 'id' : 2 ,
1384- 'name' : 'running output function' ,
1385- 'message' : 'running output function: final_result' ,
1396+ 'name' : 'running tool' ,
1397+ 'message' : 'running tool: output tool' ,
1398+ 'children' : [
1399+ {
1400+ 'id' : 3 ,
1401+ 'name' : 'running output function' ,
1402+ 'message' : 'running output function: final_result' ,
1403+ }
1404+ ],
13861405 },
13871406 ],
13881407 }
@@ -1428,8 +1447,15 @@ def call_tool(_: list[ModelMessage], info: AgentInfo) -> ModelResponse:
14281447 {'id' : 1 , 'name' : 'chat function:call_tool:' , 'message' : 'chat function:call_tool:' },
14291448 {
14301449 'id' : 2 ,
1431- 'name' : 'execute_tool final_result' ,
1432- 'message' : 'running output function: final_result' ,
1450+ 'name' : 'execute_tool output tool' ,
1451+ 'message' : 'running tool: output tool' ,
1452+ 'children' : [
1453+ {
1454+ 'id' : 3 ,
1455+ 'name' : 'execute_tool final_result' ,
1456+ 'message' : 'running output function: final_result' ,
1457+ }
1458+ ],
14331459 },
14341460 ],
14351461 }
@@ -2336,7 +2362,10 @@ def instructions():
23362362 'id' : 0 ,
23372363 'name' : 'agent run' ,
23382364 'message' : 'my_agent run' ,
2339- 'children' : [{'id' : 1 , 'name' : 'chat test' , 'message' : 'chat test' }],
2365+ 'children' : [
2366+ {'id' : 1 , 'name' : 'chat test' , 'message' : 'chat test' },
2367+ {'id' : 2 , 'name' : 'running tool' , 'message' : 'running tool: output tool' },
2368+ ],
23402369 }
23412370 ]
23422371 )
@@ -2347,7 +2376,10 @@ def instructions():
23472376 'id' : 0 ,
23482377 'name' : 'invoke_agent my_agent' ,
23492378 'message' : 'my_agent run' ,
2350- 'children' : [{'id' : 1 , 'name' : 'chat test' , 'message' : 'chat test' }],
2379+ 'children' : [
2380+ {'id' : 1 , 'name' : 'chat test' , 'message' : 'chat test' },
2381+ {'id' : 2 , 'name' : 'execute_tool output tool' , 'message' : 'running tool: output tool' },
2382+ ],
23512383 }
23522384 ]
23532385 )
@@ -2589,6 +2621,7 @@ def my_tool() -> str:
25892621 'children' : [{'id' : 3 , 'name' : 'running tool' , 'message' : 'running tool: my_tool' }],
25902622 },
25912623 {'id' : 4 , 'name' : 'chat test' , 'message' : 'chat test' },
2624+ {'id' : 5 , 'name' : 'running tool' , 'message' : 'running tool: output tool' },
25922625 ],
25932626 }
25942627 ]
@@ -2611,6 +2644,7 @@ def my_tool() -> str:
26112644 ],
26122645 },
26132646 {'id' : 4 , 'name' : 'chat test' , 'message' : 'chat test' },
2647+ {'id' : 5 , 'name' : 'execute_tool output tool' , 'message' : 'running tool: output tool' },
26142648 ],
26152649 }
26162650 ]
@@ -2877,7 +2911,10 @@ def instructions(ctx: RunContext[None]):
28772911 'id' : 0 ,
28782912 'name' : 'agent run' ,
28792913 'message' : 'my_agent run' ,
2880- 'children' : [{'id' : 1 , 'name' : 'chat test' , 'message' : 'chat test' }],
2914+ 'children' : [
2915+ {'id' : 1 , 'name' : 'chat test' , 'message' : 'chat test' },
2916+ {'id' : 2 , 'name' : 'running tool' , 'message' : 'running tool: output tool' },
2917+ ],
28812918 }
28822919 ]
28832920 )
@@ -2888,7 +2925,10 @@ def instructions(ctx: RunContext[None]):
28882925 'id' : 0 ,
28892926 'name' : 'invoke_agent my_agent' ,
28902927 'message' : 'my_agent run' ,
2891- 'children' : [{'id' : 1 , 'name' : 'chat test' , 'message' : 'chat test' }],
2928+ 'children' : [
2929+ {'id' : 1 , 'name' : 'chat test' , 'message' : 'chat test' },
2930+ {'id' : 2 , 'name' : 'execute_tool output tool' , 'message' : 'running tool: output tool' },
2931+ ],
28922932 }
28932933 ]
28942934 )
0 commit comments