in generators/backend/templates/src/backend/patterns/debate.py [0:0]
def create_agent_group_chat(self):
"""
Creates and configures an agent group chat with Writer and Critic agents.
Returns:
AgentGroupChat: A configured group chat with specialized agents,
selection strategy and termination strategy.
"""
self.logger.debug("Creating chat")
writer = create_agent_from_yaml(service_id="executor",
kernel=self.kernel,
definition_file_path="agents/writer.yaml")
critic = create_agent_from_yaml(service_id="executor",
kernel=self.kernel,
definition_file_path="agents/critic.yaml")
agents=[writer, critic]
agent_group_chat = AgentGroupChat(
agents=agents,
selection_strategy=self.create_selection_strategy(agents, critic),
termination_strategy = self.create_termination_strategy(
agents=[critic],
maximum_iterations=6))
return agent_group_chat