Repository navigation
Python: Fix group chat docstring examples - #9752
Draft
Naveen Chatlapalli (1aifanatic) wants to merge 2 commits into
Draft
Naveen Chatlapalli (1aifanatic) wants to merge 2 commits into
Naveen Chatlapalli (1aifanatic) wants to merge 2 commits into
Conversation
GroupChatOrchestrator takes a ParticipantRegistry of executors, not a list of names, and GroupChatState.participants is a name-to-description mapping that cannot be indexed by position. The checkpointing example imported MemoryCheckpointStorage, which is InMemoryCheckpointStorage. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Naveen Chatlapalli (1aifanatic)
temporarily deployed
to
github-app-auth
October 27, 2026 12:40 — with
GitHub Actions
Inactive
Naveen Chatlapalli (1aifanatic)
temporarily deployed
to
github-app-auth
October 27, 2026 12:40 — with
GitHub Actions
Inactive
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new consumer-facing example uses a private import, violating the repository’s explicit public-import requirement.
1 open issue
What changed in this PR
This documentation-only PR updates two group-chat examples to match the current Agent Framework APIs, without changing runtime behavior.
Changes:
- Construct the orchestrator with agent executors and a participant registry, then build a workflow.
- Select speakers by participant name and import
GroupChatState. - Replace
MemoryCheckpointStoragewithInMemoryCheckpointStorage.
| File | Description |
|---|---|
python/packages/orchestrations/agent_framework_orchestrations/_group_chat.py |
Corrects orchestrator construction, speaker selection, and checkpoint-storage docstring examples. |
Review effort: Balanced
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Naveen Chatlapalli (1aifanatic)
temporarily deployed
to
github-app-auth
October 27, 2026 15:14 — with
GitHub Actions
Inactive
Naveen Chatlapalli (1aifanatic)
temporarily deployed
to
github-app-auth
October 27, 2026 15:14 — with
GitHub Actions
Inactive
This branch was previously deployed
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 & Context
Two examples in
agent_framework_orchestrations/_group_chat.pyfail when copied.GroupChatOrchestrator.__init__participants=["researcher", "writer"]. The constructor takesparticipant_registry: ParticipantRegistry, which is built from executors, so the call raisesTypeError: GroupChatOrchestrator.__init__() got an unexpected keyword argument 'participants'.state.participants[state.current_round % len(state.participants)].GroupChatState.participantsis anOrderedDictof name to description, so indexing it by position raisesKeyError: 0.GroupChatStatewithout importing it.GroupChatBuilder.with_checkpointingMemoryCheckpointStoragefromagent_framework. That name doesn't exist; the class isInMemoryCheckpointStorage.Description & Review Guide
samples/03-workflows/orchestrations/group_chat_simple_selector.py: select speakers by name withlist(state.participants)and build the orchestrator throughGroupChatBuilder(participants=..., selection_func=..., orchestrator_name=..., max_rounds=...), which constructs aGroupChatOrchestrator. This avoids importing the non-exportedParticipantRegistry.InMemoryCheckpointStoragein the checkpointing example.GroupChatOrchestratordirectly needsParticipantRegistry, which the package doesn't export; I can export it in a separate PR if you'd prefer the direct form.I ran both corrected examples with a stub chat client. The orchestrator workflow contains a
GroupChatOrchestratornamed "Coordinator" and stops atmax_rounds. The checkpointed builder workflow wrote checkpoints toInMemoryCheckpointStorage. I found these by type-checking the code examples in the package docstrings.Related Issue
N/A - trivial change: docstring examples are corrected to the current constructor and class names, with no behavior change.
AI Assistance
AI assistance details: Claude Code helped find these by type-checking the docstring examples, run the corrected examples against a stub client, make the edits, and draft this description.
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.🤖 Generated with Claude Code