proud-lawyer-39815
09/11/2025, 3:52 PMrefined-appointment-81829
09/11/2025, 4:35 PMproud-lawyer-39815
09/11/2025, 5:06 PMon_enter), I check if the state (userdata) has been updated:
1. If so, I call generate_reply with instructions + the state (ie. Caller Name), then I need to transition straight to the next agent.
2. If not, I call generate_reply with instructions (without the state), and let it proceed to the function_tool naturally (based on the agent's system prompt (instructions).
_Note: When the function_tool is invoked (2), it collects some data from the user, updates the state/userdata, and transitions to the next agent._proud-lawyer-39815
09/11/2025, 5:08 PMtransition_to_next_agent) and try to influence the agent to invoke it when needed (with system prompt or generate_reply - although I'm not really sure if this is possible from generate_reply, is it?); but this would reduce my chances of success (ie. the agent might not call the function_tool), breaking my state machine.refined-appointment-81829
09/11/2025, 5:16 PMproud-lawyer-39815
09/11/2025, 5:18 PMproud-lawyer-39815
09/11/2025, 5:18 PMrefined-appointment-81829
09/11/2025, 5:19 PMproud-lawyer-39815
09/11/2025, 5:19 PMon_enterrefined-appointment-81829
09/11/2025, 5:19 PMproud-lawyer-39815
09/11/2025, 5:20 PMproud-lawyer-39815
09/12/2025, 12:37 PMproud-lawyer-39815
09/12/2025, 1:02 PMsession.update_agent(MyOtherAgent())
let me give it a go...refined-appointment-81829
09/12/2025, 1:03 PMechoing-oil-67421
10/03/2025, 9:08 PMsession.update_agent function, but I'm having issues when calling it. I'm trying to call it from conversation_item_added handlerproud-lawyer-39815
10/04/2025, 12:02 AMechoing-oil-67421
10/04/2025, 3:23 PMproud-lawyer-39815
10/04/2025, 4:48 PM