Skip to content

Commit c822511

Browse files
authored
Python: Add special notes to samples that are still using AgentGroupchat (#12377)
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> As we move away from `AgentGroupChat` to the new orchestrations, we want to make sure it's clear to developers getting started with SK are aware of the changes. ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> We are including a special note to all the samples that use `AgentGroupChat` to inform developers that this feature is no longer maintained and they should consider using `GroupChatOrchestration` instead. We are keeping the samples for now so that developers can still refer to them and we don't break any external links to these samples, but we want to make sure they are aware of the changes and can migrate to the new orchestrations. ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄
1 parent 0a9ea30 commit c822511

18 files changed

+174
-34
lines changed

python/samples/concepts/agents/autogen_conversable_agent/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ Semantic Kernel Python supports running AutoGen Conversable Agents provided in t
77
Currently, there are some limitations to note:
88

99
- AutoGen Conversable Agents in Semantic Kernel run asynchronously and do not support streaming of agent inputs or responses.
10-
- The `AutoGenConversableAgent` in Semantic Kernel Python cannot be configured as part of a Semantic Kernel `AgentGroupChat`. As we progress towards GA for our agent group chat patterns, we will explore ways to integrate AutoGen agents into a Semantic Kernel group chat scenario.
1110

1211
### Installation
1312

python/samples/concepts/agents/bedrock_agent/bedrock_mixed_chat_agents.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@
1616
- an AgentGroupChat
1717
You will learn how to create a new or connect to an existing Bedrock agent and put it in a group chat with
1818
another agent.
19+
20+
Note: This sample use the `AgentGroupChat` feature of Semantic Kernel, which is
21+
no longer maintained. For a replacement, consider using the `GroupChatOrchestration`.
22+
23+
Read more about the `GroupChatOrchestration` here:
24+
https://learn.microsoft.com/semantic-kernel/frameworks/agent/agent-orchestration/group-chat?pivots=programming-language-python
25+
26+
Here is a migration guide from `AgentGroupChat` to `GroupChatOrchestration`:
27+
https://learn.microsoft.com/semantic-kernel/support/migration/group-chat-orchestration-migration-guide?pivots=programming-language-python
1928
"""
2029

2130
# This will be a chat completion agent

python/samples/concepts/agents/bedrock_agent/bedrock_mixed_chat_agents_streaming.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@
1616
- an AgentGroupChat
1717
You will learn how to create a new or connect to an existing Bedrock agent and put it in a group chat with
1818
another agent.
19+
20+
Note: This sample use the `AgentGroupChat` feature of Semantic Kernel, which is
21+
no longer maintained. For a replacement, consider using the `GroupChatOrchestration`.
22+
23+
Read more about the `GroupChatOrchestration` here:
24+
https://learn.microsoft.com/semantic-kernel/frameworks/agent/agent-orchestration/group-chat?pivots=programming-language-python
25+
26+
Here is a migration guide from `AgentGroupChat` to `GroupChatOrchestration`:
27+
https://learn.microsoft.com/semantic-kernel/support/migration/group-chat-orchestration-migration-guide?pivots=programming-language-python
1928
"""
2029

2130
# This will be a chat completion agent

python/samples/concepts/agents/chat_completion_agent/chat_completion_agent_summary_history_reducer_agent_chat.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,25 @@
22

33
import asyncio
44

5-
from semantic_kernel.agents import (
6-
AgentGroupChat,
7-
ChatCompletionAgent,
8-
)
5+
from semantic_kernel.agents import AgentGroupChat, ChatCompletionAgent
96
from semantic_kernel.connectors.ai.open_ai import AzureChatCompletion
10-
from semantic_kernel.contents import (
11-
ChatHistorySummarizationReducer,
12-
)
7+
from semantic_kernel.contents import ChatHistorySummarizationReducer
138

149
"""
1510
The following sample demonstrates how to implement a chat history
1611
reducer as part of the Semantic Kernel Agent Framework. For this sample,
1712
the ChatCompletionAgent with an AgentGroupChat is used. The Chat History
1813
Reducer is a Summary Reducer. View the README for more information on
1914
how to use the reducer and what each parameter does.
15+
16+
Note: This sample use the `AgentGroupChat` feature of Semantic Kernel, which is
17+
no longer maintained. For a replacement, consider using the `GroupChatOrchestration`.
18+
19+
Read more about the `GroupChatOrchestration` here:
20+
https://learn.microsoft.com/semantic-kernel/frameworks/agent/agent-orchestration/group-chat?pivots=programming-language-python
21+
22+
Here is a migration guide from `AgentGroupChat` to `GroupChatOrchestration`:
23+
https://learn.microsoft.com/semantic-kernel/support/migration/group-chat-orchestration-migration-guide?pivots=programming-language-python
2024
"""
2125

2226

python/samples/concepts/agents/chat_completion_agent/chat_completion_agent_truncate_history_reducer_agent_chat.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,25 @@
33
import asyncio
44
import logging
55

6-
from semantic_kernel.agents import (
7-
AgentGroupChat,
8-
ChatCompletionAgent,
9-
)
6+
from semantic_kernel.agents import AgentGroupChat, ChatCompletionAgent
107
from semantic_kernel.connectors.ai.open_ai import AzureChatCompletion
11-
from semantic_kernel.contents import (
12-
ChatHistoryTruncationReducer,
13-
)
8+
from semantic_kernel.contents import ChatHistoryTruncationReducer
149

1510
"""
1611
The following sample demonstrates how to implement a chat history
1712
reducer as part of the Semantic Kernel Agent Framework. For this sample,
1813
the ChatCompletionAgent with an AgentGroupChat is used. The Chat History
1914
Reducer is a Truncation Reducer. View the README for more information on
2015
how to use the reducer and what each parameter does.
16+
17+
Note: This sample use the `AgentGroupChat` feature of Semantic Kernel, which is
18+
no longer maintained. For a replacement, consider using the `GroupChatOrchestration`.
19+
20+
Read more about the `GroupChatOrchestration` here:
21+
https://learn.microsoft.com/semantic-kernel/frameworks/agent/agent-orchestration/group-chat?pivots=programming-language-python
22+
23+
Here is a migration guide from `AgentGroupChat` to `GroupChatOrchestration`:
24+
https://learn.microsoft.com/semantic-kernel/support/migration/group-chat-orchestration-migration-guide?pivots=programming-language-python
2125
"""
2226

2327

python/samples/concepts/agents/mixed_chat/mixed_chat_agents.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@
1313
The following sample demonstrates how to create a Azure AI Foundry Agent,
1414
a chat completion agent and have them participate in a group chat to work towards
1515
the user's requirement.
16+
17+
Note: This sample use the `AgentGroupChat` feature of Semantic Kernel, which is
18+
no longer maintained. For a replacement, consider using the `GroupChatOrchestration`.
19+
20+
Read more about the `GroupChatOrchestration` here:
21+
https://learn.microsoft.com/semantic-kernel/frameworks/agent/agent-orchestration/group-chat?pivots=programming-language-python
22+
23+
Here is a migration guide from `AgentGroupChat` to `GroupChatOrchestration`:
24+
https://learn.microsoft.com/semantic-kernel/support/migration/group-chat-orchestration-migration-guide?pivots=programming-language-python
1625
"""
1726

1827

python/samples/concepts/agents/mixed_chat/mixed_chat_agents_plugins.py

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,22 @@
1111
from semantic_kernel.functions import KernelArguments, kernel_function
1212
from semantic_kernel.kernel import Kernel
1313

14-
#####################################################################
15-
# The following sample demonstrates how to create an OpenAI #
16-
# assistant using either Azure OpenAI or OpenAI, a chat completion #
17-
# agent and have them participate in a group chat to work towards #
18-
# the user's requirement. The ChatCompletionAgent uses a plugin #
19-
# that is part of the agent group chat. #
20-
#####################################################################
14+
"""
15+
The following sample demonstrates how to create an OpenAI
16+
assistant using either Azure OpenAI or OpenAI, a chat completion
17+
agent and have them participate in a group chat to work towards
18+
the user's requirement. The ChatCompletionAgent uses a plugin
19+
that is part of the agent group chat.
20+
21+
Note: This sample use the `AgentGroupChat` feature of Semantic Kernel, which is
22+
no longer maintained. For a replacement, consider using the `GroupChatOrchestration`.
23+
24+
Read more about the `GroupChatOrchestration` here:
25+
https://learn.microsoft.com/semantic-kernel/frameworks/agent/agent-orchestration/group-chat?pivots=programming-language-python
26+
27+
Here is a migration guide from `AgentGroupChat` to `GroupChatOrchestration`:
28+
https://learn.microsoft.com/semantic-kernel/support/migration/group-chat-orchestration-migration-guide?pivots=programming-language-python
29+
"""
2130

2231

2332
class ApprovalTerminationStrategy(TerminationStrategy):

python/samples/concepts/agents/mixed_chat/mixed_chat_files.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@
1313
assistant using either Azure OpenAI or OpenAI, a chat completion
1414
agent and have them participate in a group chat working on
1515
an uploaded file.
16+
17+
Note: This sample use the `AgentGroupChat` feature of Semantic Kernel, which is
18+
no longer maintained. For a replacement, consider using the `GroupChatOrchestration`.
19+
20+
Read more about the `GroupChatOrchestration` here:
21+
https://learn.microsoft.com/semantic-kernel/frameworks/agent/agent-orchestration/group-chat?pivots=programming-language-python
22+
23+
Here is a migration guide from `AgentGroupChat` to `GroupChatOrchestration`:
24+
https://learn.microsoft.com/semantic-kernel/support/migration/group-chat-orchestration-migration-guide?pivots=programming-language-python
1625
"""
1726

1827

python/samples/concepts/agents/mixed_chat/mixed_chat_images.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@
1313
assistant using either Azure OpenAI or OpenAI, a chat completion
1414
agent and have them participate in a group chat working with
1515
image content.
16+
17+
Note: This sample use the `AgentGroupChat` feature of Semantic Kernel, which is
18+
no longer maintained. For a replacement, consider using the `GroupChatOrchestration`.
19+
20+
Read more about the `GroupChatOrchestration` here:
21+
https://learn.microsoft.com/semantic-kernel/frameworks/agent/agent-orchestration/group-chat?pivots=programming-language-python
22+
23+
Here is a migration guide from `AgentGroupChat` to `GroupChatOrchestration`:
24+
https://learn.microsoft.com/semantic-kernel/support/migration/group-chat-orchestration-migration-guide?pivots=programming-language-python
1625
"""
1726

1827

python/samples/concepts/agents/mixed_chat/mixed_chat_reset.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@
1717
agent and have them participate in a group chat to work towards
1818
the user's requirement. It also demonstrates how the underlying
1919
agent reset method is used to clear the current state of the chat
20+
21+
Note: This sample use the `AgentGroupChat` feature of Semantic Kernel, which is
22+
no longer maintained. For a replacement, consider using the `GroupChatOrchestration`.
23+
24+
Read more about the `GroupChatOrchestration` here:
25+
https://learn.microsoft.com/semantic-kernel/frameworks/agent/agent-orchestration/group-chat?pivots=programming-language-python
26+
27+
Here is a migration guide from `AgentGroupChat` to `GroupChatOrchestration`:
28+
https://learn.microsoft.com/semantic-kernel/support/migration/group-chat-orchestration-migration-guide?pivots=programming-language-python
2029
"""
2130

2231

python/samples/concepts/agents/mixed_chat/mixed_chat_streaming.py

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,21 @@
88
from semantic_kernel.contents import AuthorRole
99
from semantic_kernel.kernel import Kernel
1010

11-
#####################################################################
12-
# The following sample demonstrates how to create an OpenAI #
13-
# assistant using either Azure OpenAI or OpenAI, a chat completion #
14-
# agent and have them participate in a group chat to work towards #
15-
# the user's requirement. #
16-
#####################################################################
11+
"""
12+
The following sample demonstrates how to create an OpenAI
13+
assistant using either Azure OpenAI or OpenAI, a chat completion
14+
agent and have them participate in a group chat to work towards
15+
the user's requirement.
16+
17+
Note: This sample use the `AgentGroupChat` feature of Semantic Kernel, which is
18+
no longer maintained. For a replacement, consider using the `GroupChatOrchestration`.
19+
20+
Read more about the `GroupChatOrchestration` here:
21+
https://learn.microsoft.com/semantic-kernel/frameworks/agent/agent-orchestration/group-chat?pivots=programming-language-python
22+
23+
Here is a migration guide from `AgentGroupChat` to `GroupChatOrchestration`:
24+
https://learn.microsoft.com/semantic-kernel/support/migration/group-chat-orchestration-migration-guide?pivots=programming-language-python
25+
"""
1726

1827

1928
class ApprovalTerminationStrategy(TerminationStrategy):

python/samples/demos/assistants_group_chat/group_chat.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,19 @@
88
from semantic_kernel.contents.chat_message_content import ChatMessageContent
99
from semantic_kernel.contents.utils.author_role import AuthorRole
1010

11-
#####################################################################
12-
# The following sample demonstrates how to create a Semantic Kernel #
13-
# OpenAIAssistantAgent, and leverage the assistant's #
14-
# code interpreter or file search capabilities. The user interacts #
15-
# with the AI assistant by uploading files and chatting. #
16-
#####################################################################
11+
"""
12+
The following sample demonstrates how to create a Semantic Kernel
13+
OpenAIAssistantAgent, and leverage the assistant's
14+
code interpreter or file search capabilities. The user interacts
15+
with the AI assistant by uploading files and chatting.
16+
17+
Note: This sample use the `AgentGroupChat` feature of Semantic Kernel, which is
18+
no longer maintained. For a replacement, consider using the `GroupChatOrchestration`.
19+
Read more about the `GroupChatOrchestration` here:
20+
https://learn.microsoft.com/semantic-kernel/frameworks/agent/agent-orchestration/group-chat?pivots=programming-language-python
21+
Here is a migration guide from `AgentGroupChat` to `GroupChatOrchestration`:
22+
https://learn.microsoft.com/semantic-kernel/support/migration/group-chat-orchestration-migration-guide?pivots=programming-language-python
23+
"""
1724

1825

1926
# region Helper Functions

python/samples/demos/document_generator/main.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@
1717
from semantic_kernel.agents import AgentGroupChat
1818
from semantic_kernel.contents import AuthorRole, ChatMessageContent
1919

20+
"""
21+
Note: This sample use the `AgentGroupChat` feature of Semantic Kernel, which is
22+
no longer maintained. For a replacement, consider using the `GroupChatOrchestration`.
23+
Read more about the `GroupChatOrchestration` here:
24+
https://learn.microsoft.com/semantic-kernel/frameworks/agent/agent-orchestration/group-chat?pivots=programming-language-python
25+
Here is a migration guide from `AgentGroupChat` to `GroupChatOrchestration`:
26+
https://learn.microsoft.com/semantic-kernel/support/migration/group-chat-orchestration-migration-guide?pivots=programming-language-python
27+
"""
28+
2029
TASK = """
2130
Create a blog post to share technical details about the Semantic Kernel AI connectors.
2231
The content of the blog post should include the following:

python/samples/getting_started_with_agents/azure_ai_agent/step3_azure_ai_agent_group_chat.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@
1212
The following sample demonstrates how to create an OpenAI assistant using either
1313
Azure OpenAI or OpenAI, a chat completion agent and have them participate in a
1414
group chat to work towards the user's requirement.
15+
16+
Note: This sample use the `AgentGroupChat` feature of Semantic Kernel, which is
17+
no longer maintained. For a replacement, consider using the `GroupChatOrchestration`.
18+
19+
Read more about the `GroupChatOrchestration` here:
20+
https://learn.microsoft.com/semantic-kernel/frameworks/agent/agent-orchestration/group-chat?pivots=programming-language-python
21+
22+
Here is a migration guide from `AgentGroupChat` to `GroupChatOrchestration`:
23+
https://learn.microsoft.com/semantic-kernel/support/migration/group-chat-orchestration-migration-guide?pivots=programming-language-python
1524
"""
1625

1726

python/samples/getting_started_with_agents/chat_completion/step06_chat_completion_agent_group_chat.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@
1111
The following sample demonstrates how to create a simple, agent group chat that
1212
utilizes An Art Director Chat Completion Agent along with a Copy Writer Chat
1313
Completion Agent to complete a task.
14+
15+
Note: This sample use the `AgentGroupChat` feature of Semantic Kernel, which is
16+
no longer maintained. For a replacement, consider using the `GroupChatOrchestration`.
17+
18+
Read more about the `GroupChatOrchestration` here:
19+
https://learn.microsoft.com/semantic-kernel/frameworks/agent/agent-orchestration/group-chat?pivots=programming-language-python
20+
21+
Here is a migration guide from `AgentGroupChat` to `GroupChatOrchestration`:
22+
https://learn.microsoft.com/semantic-kernel/support/migration/group-chat-orchestration-migration-guide?pivots=programming-language-python
1423
"""
1524

1625

python/samples/getting_started_with_agents/chat_completion/step07_kernel_function_strategies.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@
1414
complete a task. The sample also shows how to specify a Kernel Function termination and
1515
selection strategy to determine when to end the chat or how to select the next agent to
1616
take a turn in the conversation.
17+
18+
Note: This sample use the `AgentGroupChat` feature of Semantic Kernel, which is
19+
no longer maintained. For a replacement, consider using the `GroupChatOrchestration`.
20+
21+
Read more about the `GroupChatOrchestration` here:
22+
https://learn.microsoft.com/semantic-kernel/frameworks/agent/agent-orchestration/group-chat?pivots=programming-language-python
23+
24+
Here is a migration guide from `AgentGroupChat` to `GroupChatOrchestration`:
25+
https://learn.microsoft.com/semantic-kernel/support/migration/group-chat-orchestration-migration-guide?pivots=programming-language-python
1726
"""
1827

1928

python/samples/getting_started_with_agents/chat_completion/step08_chat_completion_agent_json_result.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515
agent with only a single turn.A custom termination strategy is provided where the model
1616
is to rate the user input on creativity and expressiveness and end the chat when a score
1717
of 70 or higher is provided.
18+
19+
Note: This sample use the `AgentGroupChat` feature of Semantic Kernel, which is
20+
no longer maintained. For a replacement, consider using the `GroupChatOrchestration`.
21+
22+
Read more about the `GroupChatOrchestration` here:
23+
https://learn.microsoft.com/semantic-kernel/frameworks/agent/agent-orchestration/group-chat?pivots=programming-language-python
24+
25+
Here is a migration guide from `AgentGroupChat` to `GroupChatOrchestration`:
26+
https://learn.microsoft.com/semantic-kernel/support/migration/group-chat-orchestration-migration-guide?pivots=programming-language-python
1827
"""
1928

2029

python/samples/getting_started_with_agents/chat_completion/step09_chat_completion_agent_logging.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@
1313
utilizes An Art Director Chat Completion Agent along with a Copy Writer Chat
1414
Completion Agent to complete a task. The main point of this sample is to note
1515
how to enable logging to view all interactions between the agents and the model.
16+
17+
Note: This sample use the `AgentGroupChat` feature of Semantic Kernel, which is
18+
no longer maintained. For a replacement, consider using the `GroupChatOrchestration`.
19+
20+
Read more about the `GroupChatOrchestration` here:
21+
https://learn.microsoft.com/semantic-kernel/frameworks/agent/agent-orchestration/group-chat?pivots=programming-language-python
22+
23+
Here is a migration guide from `AgentGroupChat` to `GroupChatOrchestration`:
24+
https://learn.microsoft.com/semantic-kernel/support/migration/group-chat-orchestration-migration-guide?pivots=programming-language-python
1625
"""
1726

1827
# 0. Enable logging

0 commit comments

Comments
 (0)