microsoft/autogen · error · ValueError

The group topic type must not be in the participant topic ty

Error message

The group topic type must not be in the participant topic types.

What it means

Thrown by the BaseGroupChatManager constructor when the group topic type (the broadcast channel used by the orchestrator) collides with one of the participant topic types. The group topic must be reserved for manager<->container traffic; if a participant uses the same identifier, messages intended for the group would be routed to that participant, so construction is rejected.

Source

Thrown at python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_base_group_chat_manager.py:68

    ):
        super().__init__(
            description="Group chat manager",
            sequential_message_types=[
                GroupChatStart,
                GroupChatAgentResponse,
                GroupChatTeamResponse,
                GroupChatMessage,
                GroupChatReset,
            ],
        )
        if max_turns is not None and max_turns <= 0:
            raise ValueError("The maximum number of turns must be greater than 0.")
        if len(participant_topic_types) != len(participant_descriptions):
            raise ValueError("The number of participant topic types, agent types, and descriptions must be the same.")
        if len(set(participant_topic_types)) != len(participant_topic_types):
            raise ValueError("The participant topic types must be unique.")
        if group_topic_type in participant_topic_types:
            raise ValueError("The group topic type must not be in the participant topic types.")
        self._name = name
        self._group_topic_type = group_topic_type
        self._output_topic_type = output_topic_type
        self._participant_names = participant_names
        self._participant_name_to_topic_type = {
            name: topic_type for name, topic_type in zip(participant_names, participant_topic_types, strict=True)
        }
        self._participant_descriptions = participant_descriptions
        self._message_thread: List[BaseAgentEvent | BaseChatMessage] = []
        self._output_message_queue = output_message_queue
        self._termination_condition = termination_condition
        self._max_turns = max_turns
        self._current_turn = 0
        self._message_factory = message_factory
        self._emit_team_events = emit_team_events
        self._active_speakers: List[str] = []

    @rpc

View on GitHub (pinned to 027ecf0a37)

Solutions

  1. Rename the colliding participant (or the group_topic_type) so the group channel identifier is distinct from all participant names/topic types.
  2. Leave group_topic_type at its auto-generated default unless you specifically need a fixed value.
  3. When constructing the manager directly, verify group_topic_type not in participant_topic_types before the call.

Example fix

// before
manager = MyGroupChatManager(
    group_topic_type="team",
    participant_topic_types=["team", "agent2"],  # 'team' collides
    ...)

// after
manager = MyGroupChatManager(
    group_topic_type="group_chat_topic",
    participant_topic_types=["team", "agent2"],
    ...)
Defensive patterns

Strategy: validation

Validate before calling

if group_topic_type and group_topic_type in {a.name for a in participants}:
    raise ValueError("group_topic_type collides with a participant name")
team = SelectorGroupChat(participants, group_topic_type=group_topic_type)

Type guard

def topic_types_are_disjoint(group_topic_type: str, participant_topic_types: list[str]) -> bool:
    return group_topic_type not in set(participant_topic_types)

Prevention

When it happens

Trigger: Passing group_topic_type equal to one of the participant topic types / participant names when constructing the manager or a team that exposes group_topic_type; naming an agent so that its derived topic type equals the team's group topic string (typically the team name).

Common situations: Manually setting group_topic_type to a 'friendly' value that happens to match an agent name; building multiple teams over a shared runtime and reusing topic strings; custom orchestration code that constructs BaseGroupChatManager subclasses directly.

Related errors


AI-assisted analysis of microsoft/autogen@027ecf0a37 (2026-08-15). Data as JSON: /api/errors/1a2e28cf0c0374de. Report an issue: GitHub.