diff --git a/autogen/agentchat/contrib/orchestrator_agent.py b/autogen/agentchat/contrib/orchestrator_agent.py index 4d04905db..cddf755c7 100644 --- a/autogen/agentchat/contrib/orchestrator_agent.py +++ b/autogen/agentchat/contrib/orchestrator_agent.py @@ -398,6 +398,10 @@ def _select_next_agent(self, task: str) -> Optional[ConversableAgent]: synthesized_prompt = self._get_synthesize_prompt( self._task, self._team_description, self._facts, self._plan ) + + # Share new plan with all agents + for agent in self._agents: + self.send(synthesized_prompt, agent) logger.info( f"(thought) New plan:\n{synthesized_prompt}" @@ -421,6 +425,8 @@ def _select_next_agent(self, task: str) -> Optional[ConversableAgent]: # Update chat history self._append_oai_message({"role": "assistant", "content": instruction}, "assistant", self, True) + # Send instruction directly to the agent + self.send(instruction, agent) return agent return None