Skip to main content

AutoPattern

AutoPattern implements a flexible pattern where agents are selected based on their expertise.
In this pattern, a group manager automatically selects the next agent to speak based on the context of the conversation and agent descriptions. The after_work is always set to “group_manager” as this is the defining characteristic of this pattern.
Initialize the AutoPattern.
The after_work is always set to group_manager selection, which is the defining characteristic of this pattern. You can customize the selection message used by the group manager when selecting the next agent.
Parameters:

Static Methods

create_default

Create a default pattern with minimal configuration.
This replaces the need for a separate BasePattern class by providing a factory method that creates a simple DefaultPattern instance.
Parameters:

Instance Methods

prepare_group_chat

Prepare the group chat for organic agent selection.
Ensures that:
1. The group manager has a valid LLM config 2. All agents have appropriate descriptions for the group manager to use
Parameters: Returns: