run_group_chat
autogen.agentchat.run_group_chat #
run_group_chat(pattern, messages, max_rounds=20, safeguard_policy=None, safeguard_llm_config=None, mask_llm_config=None)
Run a group chat with multiple agents using the specified pattern.
This method executes a multi-agent conversation in a background thread and returns immediately with a RunResponse object that can be used to iterate over events.
For step-by-step execution with control over each event, use run_group_chat_iter() instead.
| PARAMETER | DESCRIPTION |
|---|---|
pattern | The pattern that defines how agents interact (e.g., AutoPattern, RoundRobinPattern, RandomPattern). TYPE: |
messages | The initial message(s) to start the conversation. Can be a string or a list of message dictionaries. |
max_rounds | Maximum number of conversation rounds. Defaults to 20. TYPE: |
safeguard_policy | Optional safeguard policy for content filtering. |
safeguard_llm_config | Optional LLM config for safeguard evaluation. TYPE: |
mask_llm_config | Optional LLM config for content masking. TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
RunResponseProtocol | RunResponseProtocol |