[BREAKING] Python: Move single-config fluent methods to constructor parameters#3693
Merged
moonbox3 merged 4 commits intomicrosoft:mainfrom Feb 7, 2026
Merged
[BREAKING] Python: Move single-config fluent methods to constructor parameters#3693moonbox3 merged 4 commits intomicrosoft:mainfrom
moonbox3 merged 4 commits intomicrosoft:mainfrom
Conversation
Member
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements a breaking change that converts 14 fluent builder methods across 6 orchestration builders into constructor parameters. The change eliminates duplicate configuration paths by removing methods like set_start_executor(), with_checkpointing(), with_max_rounds(), with_termination_condition(), with_intermediate_outputs(), and with_plan_review() in favor of constructor parameters.
Changes:
- Moves single-configuration fluent methods to constructor parameters for WorkflowBuilder, SequentialBuilder, ConcurrentBuilder, GroupChatBuilder, HandoffBuilder, and MagenticBuilder
- Updates all samples (60+ files) and tests (20+ files) to use the new constructor syntax
- Converts
set_start_executor()to private_set_start_executor()method and addsstart_executorconstructor parameter - Updates error messages and documentation to reflect the new API
Reviewed changes
Copilot reviewed 103 out of 103 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
_workflow_builder.py |
Adds constructor parameters (start_executor, checkpoint_storage, output_executors), removes fluent methods, makes set_start_executor private |
_sequential.py |
Adds checkpoint_storage and intermediate_outputs constructor parameters, removes corresponding fluent methods |
_concurrent.py |
Adds checkpoint_storage and intermediate_outputs constructor parameters, removes corresponding fluent methods |
_group_chat.py |
Adds termination_condition, max_rounds, checkpoint_storage, and intermediate_outputs constructor parameters |
_handoff.py |
Adds checkpoint_storage and termination_condition constructor parameters |
_magentic.py |
Adds enable_plan_review, checkpoint_storage, and intermediate_outputs constructor parameters |
| Sample files (60+) | Updates all workflow construction to use new constructor parameter syntax |
| Test files (20+) | Updates all test code to use new constructor parameter syntax |
_declarative_builder.py |
Updates to use WorkflowBuilder constructor parameters but calls private _set_start_executor() |
_workflow.py, _orchestration_request_info.py |
Updates documentation and usage examples |
python/samples/getting_started/workflows/control-flow/multi_selection_edge_group.py
Outdated
Show resolved
Hide resolved
python/packages/core/agent_framework/_workflows/_workflow_builder.py
Outdated
Show resolved
Hide resolved
python/packages/declarative/agent_framework_declarative/_workflows/_declarative_builder.py
Show resolved
Hide resolved
python/samples/getting_started/workflows/parallelism/map_reduce_and_visualization.py
Outdated
Show resolved
Hide resolved
TaoChenOSU
approved these changes
Feb 7, 2026
moonbox3
commented
Feb 7, 2026
python/packages/orchestrations/agent_framework_orchestrations/_magentic.py
Show resolved
Hide resolved
alliscode
approved these changes
Feb 7, 2026
eavanvalkenburg
approved these changes
Feb 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Breaking Changes
An (simple, omitting some config) example of a change:
Methods removed (in favor of constructor arguments):
Validation changes:
Note: HandoffBuilder already accepted participants/participant_factories as constructor parameters and was not changed in this regard.
Description
Contribution Checklist