AutoGen GroupChat #5726
Unanswered
Lirazgabbay
asked this question in
Q&A
Replies: 1 comment 2 replies
-
You can take a look at multi agent debate: https://microsoft.github.io/autogen/stable/user-guide/core-user-guide/design-patterns/multi-agent-debate.html Please note you are still using the old v0.2 API. Consider upgrade to the latest version |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey,
I'm trying to create a group chat with multiple agents, each assigned different roles.
Each agent must execute at least one function involving API calls (I use a function map and define functions in the llm_config section).
I also have a manager agent, a reverse proxy manager, and a GroupChatManager responsible for handling the group chat.
Currently, the code runs, but each agent does not fully perform its role, and the process gets stuck midway. Additionally, the conversation lacks dynamic interaction—I want it to feel more engaging.
Right now, all agents only respond to the manager, who then concludes the conversation. Instead, I want them to interact with each other—exchanging insights, asking questions, and debating different perspectives—until they reach a consensus.
I've searched for references on Google but couldn't find a solution.
How can I modify my setup to achieve this?
I’d appreciate any recommendations.
Here’s some code:
_` groupchat = autogen.GroupChat(
agents=[
agents_init.liquidity_agent,
agents_init.historical_margin_multiplier_analyst,
agents_init.competative_margin_multiplier_analyst,
agents_init.qualitative_analyst,
agents_init.manager_agent # Represents the Manager agent that speaks during the discussion and provides the final decision
],
messages=[],
max_round=15,
speaker_selection_method="round_robin",
allow_repeat_speaker=True
)
`_
Here is an example of a running execution:
investment house 1 Discussion:
user_proxy (to chat_manager):
Let's analyze ['AAPL'] for a potential investment of $100,000.00.
Liquidity Analyst, please start by presenting your analysis of ['AAPL'] liquidity.
Historical Margin Analyst, follow with an analysis of historical margin trends.
Competitive Margin Analyst, provide your insights on competitive positioning.
Qualitative Analyst, provide your insights on qualitative factors.
Manager, please guide the discussion and ensure all perspectives are considered. Facilitate a consensus on whether to invest and how much.
All agents please respond to each other for challenging any perspectives you disagree with.
Next speaker: Liquidity_Analyst
Liquidity_Analyst (to chat_manager):
***** Suggested function call: quick_ratio *****
Arguments:
{"symbol":"AAPL","year":2021}
Next speaker: Liquidity_Analyst
***** Response from calling function (quick_ratio) *****
1.0221149018576519
Next speaker: Historical_Margin_Multiplier_Analyst
Historical_Margin_Multiplier_Analyst (to chat_manager):
The quick ratio for AAPL in 2021 is 1.02, indicating that the company has sufficient liquid assets to cover its short-term liabilities. This suggests good liquidity for AAPL.
Shall we proceed with the historical margin analysis now?
Next speaker: Competative_Margin_Multiplier_Analyst
Competative_Margin_Multiplier_Analyst (to chat_manager):
***** Suggested function call: calculate_profit_margins *****
Arguments:
{"symbol":"AAPL","year":2021}
Next speaker: Historical_Margin_Multiplier_Analyst
***** Response from calling function (calculate_profit_margins) *****
{"Gross Profit Margin (%)": 41.77935962516778, "Operating Profit Margin (%)": 29.782377527561593, "Net Profit Margin (%)": 25.88179335569424}
Next speaker: Competative_Margin_Multiplier_Analyst
Competative_Margin_Multiplier_Analyst (to chat_manager):
The profit margins for AAPL in 2021 are as follows:
These margins indicate that AAPL is performing well in terms of generating profits from its operations. Would you like to proceed with the competitive margin analysis to compare AAPL with its competitors?
Next speaker: Qualitative_Analyst
Qualitative_Analyst (to chat_manager):
***** Suggested function call: get_company_data *****
Arguments:
{"symbol":"AAPL"}
Next speaker: Qualitative_Analyst
***** Response from calling function (get_company_data) *****
{"1": {"Title": "LiveWorld Expands Board of Directors, Adding Healthcare & Tech Executive Carl Gustin", "Description": "LiveWorld, a social-first digital agency, has appointed Carl Gustin, an experienced healthcare and technology executive, to its Board of Directors. Gustin's expertise in AI-driven business transformation is expected to help LiveWorld expand its client portfolio and innovative AI solutions in the healthcare and pharmaceutical sectors.", "Published Date": "2025-02-26T14:00:00Z", "Source": "GlobeNewswire Inc.", "URL": "https://www.globenewswire.com/news-release/2025/02/26/3032949/0/en/LiveWorld-Expands-Board-of-Directors-Adding-Healthcare-Tech-Executive-Carl-Gustin.html"}, "2": {"Title": "Prediction: This Artificial Intelligence (AI) Company Will Split Its Stock in 2025", "Description": "Microsoft is likely to split its stock this year due to pressure from its inclusion in the price-weighted Dow Jones Industrial Average. The company's high stock price compared to other Dow components may prompt a split, similar to Apple's move in 2020.", "Published Date": "2025-02-26T13:45:00Z", "Source": "The Motley Fool", "URL": "https://www.fool.com/investing/2025/02/26/prediction-this-ai-company-split-stock-2025/?source=iedfolrf0000001"}}
Next speaker: Manager
Manager (to chat_manager):
The qualitative analysis for AAPL includes recent news such as the expansion of LiveWorld's Board of Directors and a prediction about Microsoft potentially splitting its stock in 2025. These pieces of information provide insights into the broader tech industry landscape and potential market trends.
Now, let's discuss the implications of these qualitative factors on AAPL's investment potential. How do these news items influence your perspective on investing in AAPL?
Next speaker: Liquidity_Analyst
Liquidity_Analyst (to chat_manager):
Based on the qualitative factors provided, the expansion of LiveWorld's Board of Directors, particularly with the addition of an experienced healthcare and technology executive, suggests a strategic move towards enhancing AI-driven business transformation in the healthcare and pharmaceutical sectors. This could indicate a growing focus on innovation and expansion in related industries, which may indirectly benefit companies like AAPL operating in the tech sector.
The prediction about Microsoft potentially splitting its stock in 2025 highlights a significant event in the tech industry that could impact investor sentiment and market dynamics. Stock splits are often perceived positively by investors as they can make shares more accessible and potentially attract more retail investors. If Microsoft does proceed with the split, it could lead to increased attention on tech stocks in general, including AAPL.
Overall, these qualitative factors suggest a positive outlook for AAPL in terms of potential industry trends and market dynamics. The focus on innovation and strategic moves in related sectors could contribute to AAPL's growth and market positioning.
Do you have any specific questions or considerations regarding these qualitative insights and their impact on the investment decision for AAPL?
Next speaker: Historical_Margin_Multiplier_Analyst
Historical_Margin_Multiplier_Analyst (to chat_manager):
***** Suggested function call: ratios *****
Arguments:
{"symbol":"AAPL","year":2021}
Next speaker: Competative_Margin_Multiplier_Analyst
***** Response from calling function (ratios) *****
{"price_to_earning": 37.287278415656736, "price_to_book": 61.37243774486391, "price_earnings_to_growth": -45.93792700808932, "price_to_sales_ratio": 8.93822887866815}
Next speaker: Qualitative_Analyst
Qualitative_Analyst (to chat_manager):
Based on the historical margin analysis, the profit margins for AAPL in 2021 are as follows:
These margins indicate that AAPL has been able to generate profits efficiently from its operations, showcasing strong financial performance.
Considering the qualitative insights provided, such as the strategic expansion of LiveWorld's Board of Directors and the potential stock split by Microsoft, these factors could contribute to a positive market sentiment towards tech companies like AAPL. The focus on innovation and potential industry trends may further enhance AAPL's growth prospects.
In terms of valuation metrics, AAPL has a price-to-earnings ratio of 37.29, price-to-book ratio of 61.37, price-earnings-to-growth ratio of -45.94, and price-to-sales ratio of 8.94. These metrics suggest that AAPL's stock may be relatively valued higher compared to its earnings, book value, and sales.
Considering both the qualitative factors and valuation metrics, it is essential to weigh the potential growth opportunities presented by industry trends against the current valuation of AAPL's stock. This holistic approach can help in making an informed investment decision.
Do you have any further questions or insights to discuss regarding the investment potential of AAPL based on the qualitative analysis and historical margins?
Next speaker: Manager
Manager (to chat_manager):
Manager
Summery:
The agents have analyzed Apple Inc. (AAPL) from various perspectives, including liquidity, historical margin trends, competitive positioning, qualitative factors, and valuation metrics. The consensus reached is that AAPL shows strong liquidity with a quick ratio of 1.02 and healthy profit margins in 2021. The qualitative analysis suggests positive market sentiment towards tech companies like AAPL due to strategic moves in related sectors and potential industry trends. However, the valuation metrics indicate that AAPL's stock may be relatively high compared to its earnings, book value, and sales. Therefore, the final decision is to proceed with caution and further evaluate the potential growth opportunities against the current valuation before making an investment decision on AAPL.
Beta Was this translation helpful? Give feedback.
All reactions