@@ -91,8 +91,8 @@ public function call(MessageBag $messages, array $options = []): ResultInterface
9191 }
9292
9393 $ this ->logger ->debug ('MultiAgent: Agent selection completed ' , [
94- 'selected_agent ' => $ decision ->agentName ,
95- 'reasoning ' => $ decision ->reasoning ,
94+ 'selected_agent ' => $ decision ->getAgentName () ,
95+ 'reasoning ' => $ decision ->getReasoning () ,
9696 ]);
9797
9898 if (!$ decision ->hasAgent ()) {
@@ -104,22 +104,22 @@ public function call(MessageBag $messages, array $options = []): ResultInterface
104104 // Find the target agent by name
105105 $ targetAgent = null ;
106106 foreach ($ this ->handoffs as $ handoff ) {
107- if ($ handoff ->getTo ()->getName () === $ decision ->agentName ) {
107+ if ($ handoff ->getTo ()->getName () === $ decision ->getAgentName () ) {
108108 $ targetAgent = $ handoff ->getTo ();
109109 break ;
110110 }
111111 }
112112
113113 if (!$ targetAgent ) {
114114 $ this ->logger ->debug ('MultiAgent: Target agent not found, using fallback agent ' , [
115- 'requested_agent ' => $ decision ->agentName ,
115+ 'requested_agent ' => $ decision ->getAgentName () ,
116116 'reason ' => 'agent_not_found ' ,
117117 ]);
118118
119119 return $ this ->fallback ->call ($ messages , $ options );
120120 }
121121
122- $ this ->logger ->debug ('MultiAgent: Delegating to agent ' , ['agent_name ' => $ decision ->agentName ]);
122+ $ this ->logger ->debug ('MultiAgent: Delegating to agent ' , ['agent_name ' => $ decision ->getAgentName () ]);
123123
124124 // Call the selected agent with the original user question
125125 return $ targetAgent ->call (new MessageBag ($ userMessage ), $ options );
0 commit comments