Skip to content

Python: Align termination condition handling for GroupChat and Handoff workflows #2350

@tsuting

Description

@tsuting

Description

Currently, the Groupchat workflow uses with_max_rounds to define when the workflow ends, while the Handoff workflow uses with_termination_condition. This creates inconsistency in naming and functionality across workflows.

Since with_termination_condition provides more flexibility for developers to define custom termination logic, could we have the same function for GroupChat? For example, a developer might use set_prompt_based_manager as a coordinator and want the workflow to end after one specific agent has been called twice. This type of condition cannot be easily implemented with with_max_rounds. Does this make sense?

Expected Behavior

  • Groupchat supports with_termination_condition similar to Handoff.
  • Developers should be able to define custom termination logic for Groupchat just like Handoff

Current Behavior

  • Groupchat only supports with_max_rounds.
  • Developers cannot easily implement custom termination conditions.

Version

  • agent-framework: 1.0.0b251114

Metadata

Metadata

Assignees

Labels

agent orchestrationIssues related to agent orchestrationpythonworkflowsRelated to Workflows in agent-framework

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions