From 4358dfd5c38126ebe38de32d842c0f9731c82e45 Mon Sep 17 00:00:00 2001 From: Eric Zhu Date: Wed, 4 Jun 2025 21:35:27 -0700 Subject: [PATCH 1/4] Fix bug in GraphFlow cycle check (#6629) Resolve #6628 --- .../_group_chat/_graph/_digraph_group_chat.py | 2 +- .../tests/test_group_chat_graph.py | 12 ++ .../agentchat-user-guide/graph-flow.ipynb | 142 ++++++------------ 3 files changed, 59 insertions(+), 97 deletions(-) diff --git a/python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_graph/_digraph_group_chat.py b/python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_graph/_digraph_group_chat.py index 6378182dc..ff4a01f48 100644 --- a/python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_graph/_digraph_group_chat.py +++ b/python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_graph/_digraph_group_chat.py @@ -159,7 +159,7 @@ class DiGraph(BaseModel): cycle_edges: List[DiGraphEdge] = [] for n in cycle_nodes: cycle_edges.extend(self.nodes[n].edges) - if not any(edge.condition is not None for edge in cycle_edges): + if all(edge.condition is None and edge.condition_function is None for edge in cycle_edges): raise ValueError( f"Cycle detected without exit condition: {' -> '.join(cycle_nodes + cycle_nodes[:1])}" ) diff --git a/python/packages/autogen-agentchat/tests/test_group_chat_graph.py b/python/packages/autogen-agentchat/tests/test_group_chat_graph.py index 5329c61f1..a18c0ae61 100644 --- a/python/packages/autogen-agentchat/tests/test_group_chat_graph.py +++ b/python/packages/autogen-agentchat/tests/test_group_chat_graph.py @@ -219,6 +219,18 @@ def test_cycle_detection_with_exit_condition() -> None: ) assert graph.has_cycles_with_exit() + # Use a lambda condition + graph_with_lambda = DiGraph( + nodes={ + "A": DiGraphNode(name="A", edges=[DiGraphEdge(target="B")]), + "B": DiGraphNode(name="B", edges=[DiGraphEdge(target="C")]), + "C": DiGraphNode( + name="C", edges=[DiGraphEdge(target="A", condition=lambda msg: "test" in msg.to_model_text())] + ), # Cycle with lambda + } + ) + assert graph_with_lambda.has_cycles_with_exit() + def test_cycle_detection_without_exit_condition() -> None: """Test that cycle without exit condition raises an error.""" diff --git a/python/packages/autogen-core/docs/src/user-guide/agentchat-user-guide/graph-flow.ipynb b/python/packages/autogen-core/docs/src/user-guide/agentchat-user-guide/graph-flow.ipynb index ca1a3d7c4..a96b2df2b 100644 --- a/python/packages/autogen-core/docs/src/user-guide/agentchat-user-guide/graph-flow.ipynb +++ b/python/packages/autogen-core/docs/src/user-guide/agentchat-user-guide/graph-flow.ipynb @@ -414,7 +414,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "id": "af297db2", "metadata": {}, "outputs": [ @@ -425,141 +425,91 @@ "---------- TextMessage (user) ----------\n", "Brainstorm ways to reduce plastic waste.\n", "---------- TextMessage (generator) ----------\n", - "1. **Reusable Packaging Innovations**: Develop a subscription service that provides reusable containers for household products (like detergents, shampoos, etc.) which can be returned for refills.\n", + "1. **Refill Stations**: Set up refill stations for common household products such as laundry detergent, shampoo, and cleaning supplies in grocery stores and public spaces.\n", "\n", - "2. **Biodegradable Alternatives**: Invest in research for materials that mimic plastic but break down more easily, such as mushroom mycelium, seaweed, or plant-based polymers.\n", + "2. **Bulk Buying Incentives**: Create incentives for consumers to buy in bulk, reducing the amount of packaging waste.\n", "\n", - "3. **Community Swap Events**: Organize local events where people can swap items they no longer need, reducing the need to buy new plastic-containing products.\n", + "3. **Eco-friendly Packaging**: Encourage companies to develop biodegradable or compostable packaging for their products.\n", "\n", - "4. **Educational Workshops**: Host workshops in schools and communities that educate participants about the impacts of plastic waste and how to reduce it in their daily lives.\n", + "4. **Upcycling Workshops**: Organize community workshops that teach people how to repurpose plastic items into practical or decorative objects.\n", "\n", - "5. **Plastic Waste Upcycling**: Encourage creativity with workshops that teach people how to make art or useful items from plastic waste, such as furniture, decor, or gardening tools.\n", + "5. **Community Clean-Up Events**: Host regular community clean-up events focused on collecting plastic waste from parks, beaches, and roadsides.\n", "\n", - "6. **Plastic-Free Challenges**: Create month-long challenges that encourage individuals and families to reduce plastic use, sharing their progress on social media to inspire others.\n", + "6. **Education Campaigns**: Launch educational campaigns in schools and communities about the impact of plastic waste and sustainable alternatives.\n", "\n", - "7. **Refill Stations**: Install public refill stations for water, cleaning supplies, and personal care products in high-footfall areas like gyms, parks, and shopping centers.\n", + "7. **Plastic-Free Challenges**: Initiate a monthly plastic-free challenge encouraging individuals and families to reduce their plastic consumption.\n", "\n", - "8. **Corporate Partnerships**: Collaborate with businesses to create incentives for customers to bring their own containers, such as discounts at coffee shops or grocery stores.\n", + "8. **Support Local Artisan Products**: Promote local artisans who create products from recycled materials, fostering a circular economy.\n", "\n", - "9. **Digital Packaging**: Explore digital solutions like smart packaging that provides all necessary product information via QR codes, reducing the need for physical packaging.\n", + "9. **Rewards Programs**: Develop a rewards program for individuals and businesses who actively reduce their plastic usage, such as discounts or points for using reusable bags and containers.\n", "\n", - "10. **Government Legislation Advocates**: Advocate for local governments to impose bans on single-use plastics and support policies that promote sustainable materials.\n", + "10. **Zero-Waste Grocery Stores**: Support the establishment of zero-waste grocery stores where customers can bring their own containers and buy loose, unpackaged products.\n", "\n", - "11. **Plastic Waste Art Competitions**: Organize contests that challenge artists to create impactful pieces from plastic waste to raise awareness and promote recycling.\n", + "11. **Legislation and Policy Changes**: Advocate for policies that ban single-use plastics and promote alternatives in both public and private sectors.\n", "\n", - "12. **Sustainable School Programs**: Integrate sustainability topics within school curricula and promote student-led initiatives to reduce plastic within their institutions.\n", + "12. **Environmentally Friendly Innovations**: Invest in and promote innovations in materials science that create alternatives to plastic from natural materials.\n", "\n", - "13. **Eco-Friendly Vending Machines**: Create vending machines that dispense snacks and drinks in reusable containers, encouraging customers to return them after use.\n", + "13. **Plastic Bank Initiatives**: Start or support initiatives that allow people to exchange plastic waste for products or services, incentivizing recycling.\n", "\n", - "14. **Gardening Kits with Recyclable Components**: Supply gardening starter kits that include materials like biodegradable pots and natural fertilizers, promoting a zero-waste gardening approach.\n", + "14. **DIY Tutorials**: Create and share DIY tutorials for making your own household products to reduce reliance on plastic-packaged goods.\n", "\n", - "15. **DIY Personal Care Products**: Develop and disseminate DIY recipes for personal care products, such as soaps and lotions that encourage the use of bulk ingredients instead of plastic-packaged goods.\n", + "15. **Corporate Sustainability Partnerships**: Encourage collaboration between businesses to share best practices in reducing plastic use and waste.\n", "\n", - "16. **Plastic Neutrality Programs**: Encourage businesses to adopt plastic neutrality programs where they balance out their plastic usage by supporting clean-up or recycling initiatives.\n", + "16. **Public Art Installations**: Organize public art projects using collected plastic waste to raise awareness and promote discussions on plastic pollution.\n", "\n", - "17. **Plastic-Free Grocery Stores**: Promote or support grocery stores that operate exclusively without plastic, offering bulk options, glass containers, or other eco-friendly packaging.\n", + "17. **Sustainable Fashion Initiatives**: Promote clothing and accessories made from recycled plastics, highlighting those companies that commit to eco-friendly practices.\n", "\n", - "18. **Innovative Composting Solutions**: Design composting systems that make it easy for households to compost food and biodegradable materials, reducing plastic packaging associated with food waste.\n", + "18. **Digital Outreach**: Use social media and digital platforms to raise awareness about the impact of plastic waste and promote sustainable lifestyle choices.\n", "\n", - "19. **Mobile Apps for Plastic Waste Tracking**: Create an app that helps users track their plastic consumption and offers tips for reducing it, while also rewarding users for achievements.\n", + "19. **Composting Services**: Establish services that help compost food waste and other biodegradable materials, reducing reliance on plastic bags for disposal.\n", "\n", - "20. **Public Awareness Campaigns**: Launch a campaign that creatively highlights the environmental impact of plastic waste through social media challenges and community engagement.\n", + "20. **Sustainable Event Planning**: Collaborate with event planners to create guidelines for low-plastic events, encouraging the use of sustainable materials and practices.\n", "---------- TextMessage (reviewer) ----------\n", - "REVISE\n", + "These ideas provide a comprehensive approach to reducing plastic waste, addressing various aspects such as consumer behavior, community involvement, and corporate responsibility. Here are some feedbacks and suggestions for improvement:\n", "\n", - "This is a comprehensive and creative list of ideas to reduce plastic waste. Here are a few feedback points to enhance the suggestions further:\n", + "1. **Refill Stations**: Provide clear labeling and education about the environmental benefits of using refill stations to encourage more participation.\n", "\n", - "1. **Reusable Packaging Innovations**: Consider adding partnerships with local retailers to encourage participation and facilitate the logistics of returning and refilling containers.\n", + "2. **Bulk Buying Incentives**: Consider incorporating a loyalty program that rewards frequent bulk buyers with additional discounts or promotions.\n", "\n", - "2. **Biodegradable Alternatives**: It may be useful to specify how these materials would be incorporated into existing supply chains or product lines to make the transition smoother for businesses.\n", + "3. **Eco-friendly Packaging**: Collaborate with universities and research institutions to foster innovation in eco-friendly packaging designs.\n", "\n", - "3. **Community Swap Events**: Suggest including a digital platform for participants who cannot attend events to swap items online, thereby broadening the reach.\n", + "4. **Upcycling Workshops**: Expand on this idea by partnering with local artists who can lead sessions, making it more appealing and engaging for the community.\n", "\n", - "4. **Educational Workshops**: Incorporate activities or hands-on experiences to engage participants better and make the learning process more memorable.\n", + "5. **Community Clean-Up Events**: Provide incentive programs for participants, such as raffle entries or recognition awards, to boost engagement.\n", "\n", - "5. **Plastic Waste Upcycling**: Perhaps develop a certification process for workshops to promote quality and attract a wider audience.\n", + "6. **Education Campaigns**: Tailor campaigns for different age groups, using age-appropriate messaging and methods to enhance understanding and retention.\n", "\n", - "6. **Plastic-Free Challenges**: To enhance engagement, consider partnering with influencers or local businesses that could sponsor awards or prizes for participants.\n", + "7. **Plastic-Free Challenges**: Involve local businesses by offering discounts or promotions to participants, creating a community effort with tangible rewards.\n", "\n", - "7. **Refill Stations**: Investigate the feasibility and potential locations for such stations to ensure they are accessible to the public.\n", + "8. **Support Local Artisan Products**: Connect artisans with online marketplaces to broaden their reach and sales, promoting a circular economy.\n", "\n", - "8. **Corporate Partnerships**: It would be beneficial to specify the types of businesses you think would be most effective partners (e.g., cafes, grocery stores).\n", + "9. **Rewards Programs**: Build a mobile app dedicated to tracking individuals' sustainable habits, providing insights and rewards for achievements.\n", "\n", - "9. **Digital Packaging**: Elaborate on the potential barriers to this approach, such as consumer access to smartphones, to provide a well-rounded view.\n", + "10. **Zero-Waste Grocery Stores**: Consider including workshops in these stores to educate customers on zero-waste practices and encourage community engagement.\n", "\n", - "10. **Government Legislation Advocates**: Suggest specific legislative measures that could be advocated for, making this point more actionable.\n", + "11. **Legislation and Policy Changes**: Engage with policymakers and present real data on plastic waste reduction impacts to advocate for meaningful changes.\n", "\n", - "11. **Plastic Waste Art Competitions**: Promote collaboration with local art communities or schools to engage a wider audience and increase participation.\n", + "12. **Environmentally Friendly Innovations**: Host hackathons or competitions to stimulate creativity and collaboration in developing sustainable alternatives.\n", "\n", - "12. **Sustainable School Programs**: Propose ways to incentivize schools to participate, perhaps through competitive grants or recognition programs.\n", + "13. **Plastic Bank Initiatives**: Collaborate with local businesses to create a network where people can exchange more types of waste for various community services.\n", "\n", - "13. **Eco-Friendly Vending Machines**: Explore potential partnerships with local food vendors to ensure a diverse and appealing selection of products.\n", + "14. **DIY Tutorials**: Offer a platform where community members can share their own tutorials and experiences, fostering a supportive network for sustainable living.\n", "\n", - "14. **Gardening Kits with Recyclable Components**: Consider the potential market and audience for these kits, such as urban dwellers or schools, to tailor marketing strategies.\n", + "15. **Corporate Sustainability Partnerships**: Encourage companies to share their sustainability stories, motivating others while boosting their brand image.\n", "\n", - "15. **DIY Personal Care Products**: Include suggestions for workshops where participants can create these products collectively, fostering community and sharing knowledge.\n", + "16. **Public Art Installations**: Use social media campaigns to further engage the public in these projects, encouraging them to participate and share their own creations.\n", "\n", - "16. **Plastic Neutrality Programs**: Define what criteria businesses would need to meet to qualify for such a program to encourage transparent efforts.\n", + "17. **Sustainable Fashion Initiatives**: Create pop-up shops or fashion shows featuring sustainable lines, helping to raise awareness in a fun and engaging way.\n", "\n", - "17. **Plastic-Free Grocery Stores**: Highlight examples of existing stores operating without plastic to serve as inspiration for future initiatives.\n", + "18. **Digital Outreach**: Utilize influencers or local celebrities to amplify your message and reach wider audiences, particularly younger populations.\n", "\n", - "18. **Innovative Composting Solutions**: Provide examples of successful composting programs from other regions or communities to illustrate potential implementation.\n", + "19. **Composting Services**: Develop an educational program on composting benefits to accompany the service, helping customers understand its environmental importance.\n", "\n", - "19. **Mobile Apps for Plastic Waste Tracking**: Suggest features that would make the app engaging, such as gamification, social sharing, or integration with sustainability rewards programs.\n", + "20. **Sustainable Event Planning**: Include a checklist for event planners detailing low-plastic options and provide resources to make the transition easier.\n", "\n", - "20. **Public Awareness Campaigns**: Recommend specific themes or creative approaches that could resonate with the target audience for these campaigns.\n", - "\n", - "These revisions will enhance clarity, practicality, and engagement, making the ideas more actionable and impactful.\n", - "---------- TextMessage (generator) ----------\n", - "Thank you for the feedback! Here's a revised version of the list of ideas to reduce plastic waste, incorporating your suggestions for enhancement:\n", - "\n", - "1. **Reusable Packaging Innovations**: Partner with local retailers to establish a robust logistics system for returning and refilling containers, ensuring widespread participation and convenience for consumers.\n", - "\n", - "2. **Biodegradable Alternatives**: Identify specific strategies for incorporating biodegradable materials into existing supply chains or product lines, facilitating a smoother transition for businesses to adopt eco-friendly options.\n", - "\n", - "3. **Community Swap Events**: Create a digital platform allowing individuals to swap items online, engaging those who cannot attend physical events and expanding the initiative's reach.\n", - "\n", - "4. **Educational Workshops**: Integrate hands-on experiences and interactive activities to keep participants engaged and enhance retention of knowledge about reducing plastic use.\n", - "\n", - "5. **Plastic Waste Upcycling**: Develop a certification process for upcycling workshops, which would promote quality standards and attract a broader audience interested in sustainable crafts.\n", - "\n", - "6. **Plastic-Free Challenges**: Collaborate with local influencers or businesses to sponsor awards or prizes for challenge participants, boosting engagement and motivation.\n", - "\n", - "7. **Refill Stations**: Conduct feasibility studies to identify optimal locations for refill stations (e.g., busy urban areas, shopping centers) to ensure they are accessible to the public.\n", - "\n", - "8. **Corporate Partnerships**: Target specific types of businesses as partners, such as cafes, grocery stores, and retailers, that naturally align with the initiative to promote reusable and sustainable practices.\n", - "\n", - "9. **Digital Packaging**: Address potential barriers to adopting digital packaging solutions, like smartphone accessibility, to present a comprehensive view of the concept's practicality.\n", - "\n", - "10. **Government Legislation Advocates**: Suggest specific legislative measures to advocate for, such as bans on single-use plastics or tax incentives for companies that commit to sustainable practices, making advocacy more actionable.\n", - "\n", - "11. **Plastic Waste Art Competitions**: Collaborate with local art communities or educational institutions to organize competitions that engage a wider audience and encourage creativity while raising awareness.\n", - "\n", - "12. **Sustainable School Programs**: Propose competitive grants or recognition programs to incentivize schools to adopt sustainable practices and participate in environmental initiatives.\n", - "\n", - "13. **Eco-Friendly Vending Machines**: Explore partnerships with local food vendors to offer a diverse selection of products in vending machines that prioritize sustainability and convenience.\n", - "\n", - "14. **Gardening Kits with Recyclable Components**: Research market segments (like urban dwellers or schools) to tailor gardening kits effectively, ensuring relevance and demand in marketing strategies.\n", - "\n", - "15. **DIY Personal Care Products**: Host community workshops where participants can collaboratively create DIY products, fostering a sense of community while promoting zero waste practices.\n", - "\n", - "16. **Plastic Neutrality Programs**: Define criteria that businesses must meet to qualify for plastic neutrality, ensuring transparency and encouraging meaningful participation in sustainability efforts.\n", - "\n", - "17. **Plastic-Free Grocery Stores**: Highlight successful case studies of existing plastic-free grocery stores or markets to serve as models for new initiatives.\n", - "\n", - "18. **Innovative Composting Solutions**: Provide examples of successful composting initiatives from other communities to illustrate best practices and potential implementations.\n", - "\n", - "19. **Mobile Apps for Plastic Waste Tracking**: Include engaging features like gamification, social sharing capabilities, and integration with local sustainability rewards programs to enhance user experience.\n", - "\n", - "20. **Public Awareness Campaigns**: Recommend specific themes (e.g., ocean conservation, wildlife protection) or creative approaches (like storytelling or humor) to resonate strongly with target audiences in awareness campaigns.\n", - "\n", - "These revisions aim to enhance clarity, practicality, and engagement, making the ideas more actionable and impactful for addressing plastic waste reduction.\n", - "---------- TextMessage (reviewer) ----------\n", - "APPROVE\n", - "\n", - "This revised list is well-thought-out and addresses the feedback effectively. Each suggestion is clearer, more practical, and focused on engagement and implementation. You've introduced specific strategies, collaborative elements, and examples that can help elevate the initiatives. The points are actionable and demonstrate a comprehensive approach to tackling plastic waste. Well done!\n", + "Overall, these ideas are solid and can significantly contribute to reducing plastic waste, but implementing them effectively will require collaboration, education, and community involvement. Great job! APPROVE.\n", "---------- TextMessage (summary) ----------\n", - "The user requested ideas for reducing plastic waste. The final feedback expressed approval of a revised list of suggestions, highlighting that it effectively addressed the initially requested feedback. The reviewer praised the clarity, practicality, and comprehensiveness of the strategies, noting that they included actionable points and collaborative elements to enhance implementation.\n", + "The user requested brainstorming ideas to reduce plastic waste. The final feedback provided by the reviewer highlighted that the ideas were comprehensive, covering various facets such as consumer behavior, community involvement, and corporate responsibility. Specific suggestions for improvement included enhancing refill stations with clear labeling, incentivizing bulk buying through loyalty programs, collaborating on eco-friendly packaging, expanding upcycling workshops with local artists, and engaging in educational campaigns tailored to different age groups. The reviewer approved the ideas overall, noting the importance of collaboration, education, and community involvement in effective implementation.\n", "---------- StopMessage (DiGraphStopAgent) ----------\n", "Digraph execution is complete\n" ] @@ -567,10 +517,10 @@ { "data": { "text/plain": [ - "TaskResult(messages=[TextMessage(source='user', models_usage=None, metadata={}, content='Brainstorm ways to reduce plastic waste.', type='TextMessage'), TextMessage(source='generator', models_usage=RequestUsage(prompt_tokens=27, completion_tokens=661), metadata={}, content='1. **Reusable Packaging Innovations**: Develop a subscription service that provides reusable containers for household products (like detergents, shampoos, etc.) which can be returned for refills.\\n\\n2. **Biodegradable Alternatives**: Invest in research for materials that mimic plastic but break down more easily, such as mushroom mycelium, seaweed, or plant-based polymers.\\n\\n3. **Community Swap Events**: Organize local events where people can swap items they no longer need, reducing the need to buy new plastic-containing products.\\n\\n4. **Educational Workshops**: Host workshops in schools and communities that educate participants about the impacts of plastic waste and how to reduce it in their daily lives.\\n\\n5. **Plastic Waste Upcycling**: Encourage creativity with workshops that teach people how to make art or useful items from plastic waste, such as furniture, decor, or gardening tools.\\n\\n6. **Plastic-Free Challenges**: Create month-long challenges that encourage individuals and families to reduce plastic use, sharing their progress on social media to inspire others.\\n\\n7. **Refill Stations**: Install public refill stations for water, cleaning supplies, and personal care products in high-footfall areas like gyms, parks, and shopping centers.\\n\\n8. **Corporate Partnerships**: Collaborate with businesses to create incentives for customers to bring their own containers, such as discounts at coffee shops or grocery stores.\\n\\n9. **Digital Packaging**: Explore digital solutions like smart packaging that provides all necessary product information via QR codes, reducing the need for physical packaging.\\n\\n10. **Government Legislation Advocates**: Advocate for local governments to impose bans on single-use plastics and support policies that promote sustainable materials.\\n\\n11. **Plastic Waste Art Competitions**: Organize contests that challenge artists to create impactful pieces from plastic waste to raise awareness and promote recycling.\\n\\n12. **Sustainable School Programs**: Integrate sustainability topics within school curricula and promote student-led initiatives to reduce plastic within their institutions.\\n\\n13. **Eco-Friendly Vending Machines**: Create vending machines that dispense snacks and drinks in reusable containers, encouraging customers to return them after use.\\n\\n14. **Gardening Kits with Recyclable Components**: Supply gardening starter kits that include materials like biodegradable pots and natural fertilizers, promoting a zero-waste gardening approach.\\n\\n15. **DIY Personal Care Products**: Develop and disseminate DIY recipes for personal care products, such as soaps and lotions that encourage the use of bulk ingredients instead of plastic-packaged goods.\\n\\n16. **Plastic Neutrality Programs**: Encourage businesses to adopt plastic neutrality programs where they balance out their plastic usage by supporting clean-up or recycling initiatives.\\n\\n17. **Plastic-Free Grocery Stores**: Promote or support grocery stores that operate exclusively without plastic, offering bulk options, glass containers, or other eco-friendly packaging.\\n\\n18. **Innovative Composting Solutions**: Design composting systems that make it easy for households to compost food and biodegradable materials, reducing plastic packaging associated with food waste.\\n\\n19. **Mobile Apps for Plastic Waste Tracking**: Create an app that helps users track their plastic consumption and offers tips for reducing it, while also rewarding users for achievements.\\n\\n20. **Public Awareness Campaigns**: Launch a campaign that creatively highlights the environmental impact of plastic waste through social media challenges and community engagement.', type='TextMessage'), TextMessage(source='reviewer', models_usage=RequestUsage(prompt_tokens=710, completion_tokens=625), metadata={}, content='REVISE\\n\\nThis is a comprehensive and creative list of ideas to reduce plastic waste. Here are a few feedback points to enhance the suggestions further:\\n\\n1. **Reusable Packaging Innovations**: Consider adding partnerships with local retailers to encourage participation and facilitate the logistics of returning and refilling containers.\\n\\n2. **Biodegradable Alternatives**: It may be useful to specify how these materials would be incorporated into existing supply chains or product lines to make the transition smoother for businesses.\\n\\n3. **Community Swap Events**: Suggest including a digital platform for participants who cannot attend events to swap items online, thereby broadening the reach.\\n\\n4. **Educational Workshops**: Incorporate activities or hands-on experiences to engage participants better and make the learning process more memorable.\\n\\n5. **Plastic Waste Upcycling**: Perhaps develop a certification process for workshops to promote quality and attract a wider audience.\\n\\n6. **Plastic-Free Challenges**: To enhance engagement, consider partnering with influencers or local businesses that could sponsor awards or prizes for participants.\\n\\n7. **Refill Stations**: Investigate the feasibility and potential locations for such stations to ensure they are accessible to the public.\\n\\n8. **Corporate Partnerships**: It would be beneficial to specify the types of businesses you think would be most effective partners (e.g., cafes, grocery stores).\\n\\n9. **Digital Packaging**: Elaborate on the potential barriers to this approach, such as consumer access to smartphones, to provide a well-rounded view.\\n\\n10. **Government Legislation Advocates**: Suggest specific legislative measures that could be advocated for, making this point more actionable.\\n\\n11. **Plastic Waste Art Competitions**: Promote collaboration with local art communities or schools to engage a wider audience and increase participation.\\n\\n12. **Sustainable School Programs**: Propose ways to incentivize schools to participate, perhaps through competitive grants or recognition programs.\\n\\n13. **Eco-Friendly Vending Machines**: Explore potential partnerships with local food vendors to ensure a diverse and appealing selection of products.\\n\\n14. **Gardening Kits with Recyclable Components**: Consider the potential market and audience for these kits, such as urban dwellers or schools, to tailor marketing strategies.\\n\\n15. **DIY Personal Care Products**: Include suggestions for workshops where participants can create these products collectively, fostering community and sharing knowledge.\\n\\n16. **Plastic Neutrality Programs**: Define what criteria businesses would need to meet to qualify for such a program to encourage transparent efforts.\\n\\n17. **Plastic-Free Grocery Stores**: Highlight examples of existing stores operating without plastic to serve as inspiration for future initiatives.\\n\\n18. **Innovative Composting Solutions**: Provide examples of successful composting programs from other regions or communities to illustrate potential implementation.\\n\\n19. **Mobile Apps for Plastic Waste Tracking**: Suggest features that would make the app engaging, such as gamification, social sharing, or integration with sustainability rewards programs.\\n\\n20. **Public Awareness Campaigns**: Recommend specific themes or creative approaches that could resonate with the target audience for these campaigns.\\n\\nThese revisions will enhance clarity, practicality, and engagement, making the ideas more actionable and impactful.', type='TextMessage'), TextMessage(source='generator', models_usage=RequestUsage(prompt_tokens=1322, completion_tokens=721), metadata={}, content=\"Thank you for the feedback! Here's a revised version of the list of ideas to reduce plastic waste, incorporating your suggestions for enhancement:\\n\\n1. **Reusable Packaging Innovations**: Partner with local retailers to establish a robust logistics system for returning and refilling containers, ensuring widespread participation and convenience for consumers.\\n\\n2. **Biodegradable Alternatives**: Identify specific strategies for incorporating biodegradable materials into existing supply chains or product lines, facilitating a smoother transition for businesses to adopt eco-friendly options.\\n\\n3. **Community Swap Events**: Create a digital platform allowing individuals to swap items online, engaging those who cannot attend physical events and expanding the initiative's reach.\\n\\n4. **Educational Workshops**: Integrate hands-on experiences and interactive activities to keep participants engaged and enhance retention of knowledge about reducing plastic use.\\n\\n5. **Plastic Waste Upcycling**: Develop a certification process for upcycling workshops, which would promote quality standards and attract a broader audience interested in sustainable crafts.\\n\\n6. **Plastic-Free Challenges**: Collaborate with local influencers or businesses to sponsor awards or prizes for challenge participants, boosting engagement and motivation.\\n\\n7. **Refill Stations**: Conduct feasibility studies to identify optimal locations for refill stations (e.g., busy urban areas, shopping centers) to ensure they are accessible to the public.\\n\\n8. **Corporate Partnerships**: Target specific types of businesses as partners, such as cafes, grocery stores, and retailers, that naturally align with the initiative to promote reusable and sustainable practices.\\n\\n9. **Digital Packaging**: Address potential barriers to adopting digital packaging solutions, like smartphone accessibility, to present a comprehensive view of the concept's practicality.\\n\\n10. **Government Legislation Advocates**: Suggest specific legislative measures to advocate for, such as bans on single-use plastics or tax incentives for companies that commit to sustainable practices, making advocacy more actionable.\\n\\n11. **Plastic Waste Art Competitions**: Collaborate with local art communities or educational institutions to organize competitions that engage a wider audience and encourage creativity while raising awareness.\\n\\n12. **Sustainable School Programs**: Propose competitive grants or recognition programs to incentivize schools to adopt sustainable practices and participate in environmental initiatives.\\n\\n13. **Eco-Friendly Vending Machines**: Explore partnerships with local food vendors to offer a diverse selection of products in vending machines that prioritize sustainability and convenience.\\n\\n14. **Gardening Kits with Recyclable Components**: Research market segments (like urban dwellers or schools) to tailor gardening kits effectively, ensuring relevance and demand in marketing strategies.\\n\\n15. **DIY Personal Care Products**: Host community workshops where participants can collaboratively create DIY products, fostering a sense of community while promoting zero waste practices.\\n\\n16. **Plastic Neutrality Programs**: Define criteria that businesses must meet to qualify for plastic neutrality, ensuring transparency and encouraging meaningful participation in sustainability efforts.\\n\\n17. **Plastic-Free Grocery Stores**: Highlight successful case studies of existing plastic-free grocery stores or markets to serve as models for new initiatives.\\n\\n18. **Innovative Composting Solutions**: Provide examples of successful composting initiatives from other communities to illustrate best practices and potential implementations.\\n\\n19. **Mobile Apps for Plastic Waste Tracking**: Include engaging features like gamification, social sharing capabilities, and integration with local sustainability rewards programs to enhance user experience.\\n\\n20. **Public Awareness Campaigns**: Recommend specific themes (e.g., ocean conservation, wildlife protection) or creative approaches (like storytelling or humor) to resonate strongly with target audiences in awareness campaigns.\\n\\nThese revisions aim to enhance clarity, practicality, and engagement, making the ideas more actionable and impactful for addressing plastic waste reduction.\", type='TextMessage'), TextMessage(source='reviewer', models_usage=RequestUsage(prompt_tokens=2064, completion_tokens=68), metadata={}, content=\"APPROVE\\n\\nThis revised list is well-thought-out and addresses the feedback effectively. Each suggestion is clearer, more practical, and focused on engagement and implementation. You've introduced specific strategies, collaborative elements, and examples that can help elevate the initiatives. The points are actionable and demonstrate a comprehensive approach to tackling plastic waste. Well done!\", type='TextMessage'), TextMessage(source='summary', models_usage=RequestUsage(prompt_tokens=105, completion_tokens=61), metadata={}, content='The user requested ideas for reducing plastic waste. The final feedback expressed approval of a revised list of suggestions, highlighting that it effectively addressed the initially requested feedback. The reviewer praised the clarity, practicality, and comprehensiveness of the strategies, noting that they included actionable points and collaborative elements to enhance implementation.', type='TextMessage'), StopMessage(source='DiGraphStopAgent', models_usage=None, metadata={}, content='Digraph execution is complete', type='StopMessage')], stop_reason='Stop message received')" + "TaskResult(messages=[TextMessage(source='user', models_usage=None, metadata={}, created_at=datetime.datetime(2025, 6, 5, 4, 16, 39, 836409, tzinfo=datetime.timezone.utc), content='Brainstorm ways to reduce plastic waste.', type='TextMessage'), TextMessage(source='generator', models_usage=RequestUsage(prompt_tokens=27, completion_tokens=555), metadata={}, created_at=datetime.datetime(2025, 6, 5, 4, 16, 48, 788854, tzinfo=datetime.timezone.utc), content='1. **Refill Stations**: Set up refill stations for common household products such as laundry detergent, shampoo, and cleaning supplies in grocery stores and public spaces.\\n\\n2. **Bulk Buying Incentives**: Create incentives for consumers to buy in bulk, reducing the amount of packaging waste.\\n\\n3. **Eco-friendly Packaging**: Encourage companies to develop biodegradable or compostable packaging for their products.\\n\\n4. **Upcycling Workshops**: Organize community workshops that teach people how to repurpose plastic items into practical or decorative objects.\\n\\n5. **Community Clean-Up Events**: Host regular community clean-up events focused on collecting plastic waste from parks, beaches, and roadsides.\\n\\n6. **Education Campaigns**: Launch educational campaigns in schools and communities about the impact of plastic waste and sustainable alternatives.\\n\\n7. **Plastic-Free Challenges**: Initiate a monthly plastic-free challenge encouraging individuals and families to reduce their plastic consumption.\\n\\n8. **Support Local Artisan Products**: Promote local artisans who create products from recycled materials, fostering a circular economy.\\n\\n9. **Rewards Programs**: Develop a rewards program for individuals and businesses who actively reduce their plastic usage, such as discounts or points for using reusable bags and containers.\\n\\n10. **Zero-Waste Grocery Stores**: Support the establishment of zero-waste grocery stores where customers can bring their own containers and buy loose, unpackaged products.\\n\\n11. **Legislation and Policy Changes**: Advocate for policies that ban single-use plastics and promote alternatives in both public and private sectors.\\n\\n12. **Environmentally Friendly Innovations**: Invest in and promote innovations in materials science that create alternatives to plastic from natural materials.\\n\\n13. **Plastic Bank Initiatives**: Start or support initiatives that allow people to exchange plastic waste for products or services, incentivizing recycling.\\n\\n14. **DIY Tutorials**: Create and share DIY tutorials for making your own household products to reduce reliance on plastic-packaged goods.\\n\\n15. **Corporate Sustainability Partnerships**: Encourage collaboration between businesses to share best practices in reducing plastic use and waste.\\n\\n16. **Public Art Installations**: Organize public art projects using collected plastic waste to raise awareness and promote discussions on plastic pollution.\\n\\n17. **Sustainable Fashion Initiatives**: Promote clothing and accessories made from recycled plastics, highlighting those companies that commit to eco-friendly practices.\\n\\n18. **Digital Outreach**: Use social media and digital platforms to raise awareness about the impact of plastic waste and promote sustainable lifestyle choices.\\n\\n19. **Composting Services**: Establish services that help compost food waste and other biodegradable materials, reducing reliance on plastic bags for disposal.\\n\\n20. **Sustainable Event Planning**: Collaborate with event planners to create guidelines for low-plastic events, encouraging the use of sustainable materials and practices.', type='TextMessage'), TextMessage(source='reviewer', models_usage=RequestUsage(prompt_tokens=599, completion_tokens=625), metadata={}, created_at=datetime.datetime(2025, 6, 5, 4, 16, 58, 552656, tzinfo=datetime.timezone.utc), content=\"These ideas provide a comprehensive approach to reducing plastic waste, addressing various aspects such as consumer behavior, community involvement, and corporate responsibility. Here are some feedbacks and suggestions for improvement:\\n\\n1. **Refill Stations**: Provide clear labeling and education about the environmental benefits of using refill stations to encourage more participation.\\n\\n2. **Bulk Buying Incentives**: Consider incorporating a loyalty program that rewards frequent bulk buyers with additional discounts or promotions.\\n\\n3. **Eco-friendly Packaging**: Collaborate with universities and research institutions to foster innovation in eco-friendly packaging designs.\\n\\n4. **Upcycling Workshops**: Expand on this idea by partnering with local artists who can lead sessions, making it more appealing and engaging for the community.\\n\\n5. **Community Clean-Up Events**: Provide incentive programs for participants, such as raffle entries or recognition awards, to boost engagement.\\n\\n6. **Education Campaigns**: Tailor campaigns for different age groups, using age-appropriate messaging and methods to enhance understanding and retention.\\n\\n7. **Plastic-Free Challenges**: Involve local businesses by offering discounts or promotions to participants, creating a community effort with tangible rewards.\\n\\n8. **Support Local Artisan Products**: Connect artisans with online marketplaces to broaden their reach and sales, promoting a circular economy.\\n\\n9. **Rewards Programs**: Build a mobile app dedicated to tracking individuals' sustainable habits, providing insights and rewards for achievements.\\n\\n10. **Zero-Waste Grocery Stores**: Consider including workshops in these stores to educate customers on zero-waste practices and encourage community engagement.\\n\\n11. **Legislation and Policy Changes**: Engage with policymakers and present real data on plastic waste reduction impacts to advocate for meaningful changes.\\n\\n12. **Environmentally Friendly Innovations**: Host hackathons or competitions to stimulate creativity and collaboration in developing sustainable alternatives.\\n\\n13. **Plastic Bank Initiatives**: Collaborate with local businesses to create a network where people can exchange more types of waste for various community services.\\n\\n14. **DIY Tutorials**: Offer a platform where community members can share their own tutorials and experiences, fostering a supportive network for sustainable living.\\n\\n15. **Corporate Sustainability Partnerships**: Encourage companies to share their sustainability stories, motivating others while boosting their brand image.\\n\\n16. **Public Art Installations**: Use social media campaigns to further engage the public in these projects, encouraging them to participate and share their own creations.\\n\\n17. **Sustainable Fashion Initiatives**: Create pop-up shops or fashion shows featuring sustainable lines, helping to raise awareness in a fun and engaging way.\\n\\n18. **Digital Outreach**: Utilize influencers or local celebrities to amplify your message and reach wider audiences, particularly younger populations.\\n\\n19. **Composting Services**: Develop an educational program on composting benefits to accompany the service, helping customers understand its environmental importance.\\n\\n20. **Sustainable Event Planning**: Include a checklist for event planners detailing low-plastic options and provide resources to make the transition easier.\\n\\nOverall, these ideas are solid and can significantly contribute to reducing plastic waste, but implementing them effectively will require collaboration, education, and community involvement. Great job! APPROVE.\", type='TextMessage'), TextMessage(source='summary', models_usage=RequestUsage(prompt_tokens=663, completion_tokens=106), metadata={}, created_at=datetime.datetime(2025, 6, 5, 4, 17, 0, 865057, tzinfo=datetime.timezone.utc), content='The user requested brainstorming ideas to reduce plastic waste. The final feedback provided by the reviewer highlighted that the ideas were comprehensive, covering various facets such as consumer behavior, community involvement, and corporate responsibility. Specific suggestions for improvement included enhancing refill stations with clear labeling, incentivizing bulk buying through loyalty programs, collaborating on eco-friendly packaging, expanding upcycling workshops with local artists, and engaging in educational campaigns tailored to different age groups. The reviewer approved the ideas overall, noting the importance of collaboration, education, and community involvement in effective implementation.', type='TextMessage'), StopMessage(source='DiGraphStopAgent', models_usage=None, metadata={}, created_at=datetime.datetime(2025, 6, 5, 4, 17, 0, 866337, tzinfo=datetime.timezone.utc), content='Digraph execution is complete', type='StopMessage')], stop_reason='Stop message received')" ] }, - "execution_count": 14, + "execution_count": 1, "metadata": {}, "output_type": "execute_result" } From 1b32eb660d32801c0794a5fba9ca7095743c391c Mon Sep 17 00:00:00 2001 From: Eric Zhu Date: Wed, 4 Jun 2025 21:44:03 -0700 Subject: [PATCH 2/4] Add list of function calls and results in `ToolCallSummaryMessage` (#6626) To address the comment here: https://github.com/microsoft/autogen/issues/6542#issuecomment-2922465639 --- .../src/autogen_agentchat/agents/_assistant_agent.py | 2 ++ .../autogen-agentchat/src/autogen_agentchat/messages.py | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/python/packages/autogen-agentchat/src/autogen_agentchat/agents/_assistant_agent.py b/python/packages/autogen-agentchat/src/autogen_agentchat/agents/_assistant_agent.py index 12995b8ca..66cee0b7c 100644 --- a/python/packages/autogen-agentchat/src/autogen_agentchat/agents/_assistant_agent.py +++ b/python/packages/autogen-agentchat/src/autogen_agentchat/agents/_assistant_agent.py @@ -1289,6 +1289,8 @@ class AssistantAgent(BaseChatAgent, Component[AssistantAgentConfig]): chat_message=ToolCallSummaryMessage( content=tool_call_summary, source=agent_name, + tool_calls=[call for call, _ in normal_tool_calls], + results=[result for _, result in normal_tool_calls], ), inner_messages=inner_messages, ) diff --git a/python/packages/autogen-agentchat/src/autogen_agentchat/messages.py b/python/packages/autogen-agentchat/src/autogen_agentchat/messages.py index fd78be50d..715e59ad4 100644 --- a/python/packages/autogen-agentchat/src/autogen_agentchat/messages.py +++ b/python/packages/autogen-agentchat/src/autogen_agentchat/messages.py @@ -426,6 +426,12 @@ class ToolCallSummaryMessage(BaseTextChatMessage): type: Literal["ToolCallSummaryMessage"] = "ToolCallSummaryMessage" + tool_calls: List[FunctionCall] + """The tool calls that were made.""" + + results: List[FunctionExecutionResult] + """The results of the tool calls.""" + class ToolCallRequestEvent(BaseAgentEvent): """An event signaling a request to use tools.""" From c99aa7416d44e16b9cd5bafcd709f6e2484ffe31 Mon Sep 17 00:00:00 2001 From: Eric Zhu Date: Wed, 4 Jun 2025 22:05:16 -0700 Subject: [PATCH 3/4] Fix graph validation logic and add tests (#6630) Follow up to #6629 --- .../_group_chat/_graph/_digraph_group_chat.py | 6 +- .../tests/test_group_chat_graph.py | 78 +++++++++++++++++++ 2 files changed, 82 insertions(+), 2 deletions(-) diff --git a/python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_graph/_digraph_group_chat.py b/python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_graph/_digraph_group_chat.py index ff4a01f48..7a8ee1c1b 100644 --- a/python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_graph/_digraph_group_chat.py +++ b/python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_graph/_digraph_group_chat.py @@ -198,8 +198,10 @@ class DiGraph(BaseModel): # Outgoing edge condition validation (per node) for node in self.nodes.values(): # Check that if a node has an outgoing conditional edge, then all outgoing edges are conditional - has_condition = any(edge.condition is not None for edge in node.edges) - has_unconditioned = any(edge.condition is None for edge in node.edges) + has_condition = any( + edge.condition is not None or edge.condition_function is not None for edge in node.edges + ) + has_unconditioned = any(edge.condition is None and edge.condition_function is None for edge in node.edges) if has_condition and has_unconditioned: raise ValueError(f"Node '{node.name}' has a mix of conditional and unconditional edges.") diff --git a/python/packages/autogen-agentchat/tests/test_group_chat_graph.py b/python/packages/autogen-agentchat/tests/test_group_chat_graph.py index a18c0ae61..2fe2b4dc5 100644 --- a/python/packages/autogen-agentchat/tests/test_group_chat_graph.py +++ b/python/packages/autogen-agentchat/tests/test_group_chat_graph.py @@ -259,6 +259,19 @@ def test_validate_graph_success() -> None: graph.graph_validate() assert not graph.get_has_cycles() + # Use a lambda condition + graph_with_lambda = DiGraph( + nodes={ + "A": DiGraphNode( + name="A", edges=[DiGraphEdge(target="B", condition=lambda msg: "test" in msg.to_model_text())] + ), + "B": DiGraphNode(name="B", edges=[]), + } + ) + # No error should be raised + graph_with_lambda.graph_validate() + assert not graph_with_lambda.get_has_cycles() + def test_validate_graph_missing_start_node() -> None: """Test validation failure when no start node exists.""" @@ -298,6 +311,23 @@ def test_validate_graph_mixed_conditions() -> None: with pytest.raises(ValueError, match="Node 'A' has a mix of conditional and unconditional edges"): graph.graph_validate() + # Use lambda for condition + graph_with_lambda = DiGraph( + nodes={ + "A": DiGraphNode( + name="A", + edges=[ + DiGraphEdge(target="B", condition=lambda msg: "test" in msg.to_model_text()), + DiGraphEdge(target="C"), + ], + ), + "B": DiGraphNode(name="B", edges=[]), + "C": DiGraphNode(name="C", edges=[]), + } + ) + with pytest.raises(ValueError, match="Node 'A' has a mix of conditional and unconditional edges"): + graph_with_lambda.graph_validate() + @pytest.mark.asyncio async def test_invalid_digraph_manager_cycle_without_termination() -> None: @@ -603,6 +633,29 @@ async def test_digraph_group_chat_conditional_branch(runtime: AgentRuntime | Non result = await team.run(task="Trigger yes") assert result.messages[2].source == "B" + # Use lambda conditions + graph_with_lambda = DiGraph( + nodes={ + "A": DiGraphNode( + name="A", + edges=[ + DiGraphEdge(target="B", condition=lambda msg: "yes" in msg.to_model_text()), + DiGraphEdge(target="C", condition=lambda msg: "no" in msg.to_model_text()), + ], + ), + "B": DiGraphNode(name="B", edges=[], activation="any"), + "C": DiGraphNode(name="C", edges=[], activation="any"), + } + ) + team_with_lambda = GraphFlow( + participants=[agent_a, agent_b, agent_c], + graph=graph_with_lambda, + runtime=runtime, + termination_condition=MaxMessageTermination(5), + ) + result_with_lambda = await team_with_lambda.run(task="Trigger no") + assert result_with_lambda.messages[2].source == "C" + @pytest.mark.asyncio async def test_digraph_group_chat_loop_with_exit_condition(runtime: AgentRuntime | None) -> None: @@ -785,6 +838,31 @@ async def test_digraph_group_chat_multiple_conditional(runtime: AgentRuntime | N result = await team.run(task="banana") assert result.messages[2].source == "C" + # Use lambda conditions + graph_with_lambda = DiGraph( + nodes={ + "A": DiGraphNode( + name="A", + edges=[ + DiGraphEdge(target="B", condition=lambda msg: "apple" in msg.to_model_text()), + DiGraphEdge(target="C", condition=lambda msg: "banana" in msg.to_model_text()), + DiGraphEdge(target="D", condition=lambda msg: "cherry" in msg.to_model_text()), + ], + ), + "B": DiGraphNode(name="B", edges=[]), + "C": DiGraphNode(name="C", edges=[]), + "D": DiGraphNode(name="D", edges=[]), + } + ) + team_with_lambda = GraphFlow( + participants=[agent_a, agent_b, agent_c, agent_d], + graph=graph_with_lambda, + runtime=runtime, + termination_condition=MaxMessageTermination(5), + ) + result_with_lambda = await team_with_lambda.run(task="cherry") + assert result_with_lambda.messages[2].source == "D" + class _TestMessageFilterAgentConfig(BaseModel): name: str From 348bcb17a83d024724bf48ccef53acd8bca9297e Mon Sep 17 00:00:00 2001 From: Eric Zhu Date: Wed, 4 Jun 2025 22:47:36 -0700 Subject: [PATCH 4/4] Update version to 0.6.1 (#6631) --- .github/ISSUE_TEMPLATE/1-bug_report.yml | 1 + .github/workflows/docs.yml | 4 ++-- docs/switcher.json | 2 +- python/packages/autogen-agentchat/pyproject.toml | 4 ++-- python/packages/autogen-core/pyproject.toml | 4 ++-- python/packages/autogen-ext/pyproject.toml | 12 ++++++------ python/uv.lock | 6 +++--- 7 files changed, 17 insertions(+), 16 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/1-bug_report.yml b/.github/ISSUE_TEMPLATE/1-bug_report.yml index fc3fcb313..11db7cab7 100644 --- a/.github/ISSUE_TEMPLATE/1-bug_report.yml +++ b/.github/ISSUE_TEMPLATE/1-bug_report.yml @@ -90,6 +90,7 @@ body: multiple: false options: - "Python dev (main branch)" + - "Python 0.6.1" - "Python 0.6.0" - "Python 0.5.7" - "Python 0.5.6" diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 816101b07..7080b753f 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -33,7 +33,7 @@ jobs: [ # For main use the workflow target { ref: "${{github.ref}}", dest-dir: dev, uv-version: "0.5.13", sphinx-release-override: "dev" }, - { ref: "python-v0.6.0", dest-dir: stable, uv-version: "0.5.13", sphinx-release-override: "stable" }, + { ref: "python-v0.6.1", dest-dir: stable, uv-version: "0.5.13", sphinx-release-override: "stable" }, { ref: "v0.4.0.post1", dest-dir: "0.4.0", uv-version: "0.5.13", sphinx-release-override: "" }, { ref: "v0.4.1", dest-dir: "0.4.1", uv-version: "0.5.13", sphinx-release-override: "" }, { ref: "v0.4.2", dest-dir: "0.4.2", uv-version: "0.5.13", sphinx-release-override: "" }, @@ -51,7 +51,7 @@ jobs: { ref: "python-v0.5.5", dest-dir: "0.5.5", uv-version: "0.5.13", sphinx-release-override: "" }, { ref: "python-v0.5.6", dest-dir: "0.5.6", uv-version: "0.5.13", sphinx-release-override: "" }, { ref: "python-v0.5.7", dest-dir: "0.5.7", uv-version: "0.5.13", sphinx-release-override: "" }, - { ref: "python-v0.6.0", dest-dir: "0.6.0", uv-version: "0.5.13", sphinx-release-override: "" }, + { ref: "python-v0.6.1", dest-dir: "0.6.1", uv-version: "0.5.13", sphinx-release-override: "" }, ] steps: - name: Checkout diff --git a/docs/switcher.json b/docs/switcher.json index dabdf65a2..9fdf27d3c 100644 --- a/docs/switcher.json +++ b/docs/switcher.json @@ -5,7 +5,7 @@ "url": "/autogen/dev/" }, { - "name": "0.6.0 (stable)", + "name": "0.6.1 (stable)", "version": "stable", "url": "/autogen/stable/", "preferred": true diff --git a/python/packages/autogen-agentchat/pyproject.toml b/python/packages/autogen-agentchat/pyproject.toml index c70c2261a..336550d28 100644 --- a/python/packages/autogen-agentchat/pyproject.toml +++ b/python/packages/autogen-agentchat/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "autogen-agentchat" -version = "0.6.0" +version = "0.6.1" license = {file = "LICENSE-CODE"} description = "AutoGen agents and teams library" readme = "README.md" @@ -15,7 +15,7 @@ classifiers = [ "Operating System :: OS Independent", ] dependencies = [ - "autogen-core==0.6.0", + "autogen-core==0.6.1", ] [tool.ruff] diff --git a/python/packages/autogen-core/pyproject.toml b/python/packages/autogen-core/pyproject.toml index ccd894cbd..fb7643213 100644 --- a/python/packages/autogen-core/pyproject.toml +++ b/python/packages/autogen-core/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "autogen-core" -version = "0.6.0" +version = "0.6.1" license = {file = "LICENSE-CODE"} description = "Foundational interfaces and agent runtime implementation for AutoGen" readme = "README.md" @@ -69,7 +69,7 @@ dev = [ "pygments", "sphinxext-rediraffe", - "autogen_ext==0.6.0", + "autogen_ext==0.6.1", # Documentation tooling "diskcache", diff --git a/python/packages/autogen-ext/pyproject.toml b/python/packages/autogen-ext/pyproject.toml index 3bba5760b..4b9522b3e 100644 --- a/python/packages/autogen-ext/pyproject.toml +++ b/python/packages/autogen-ext/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "autogen-ext" -version = "0.6.0" +version = "0.6.1" license = {file = "LICENSE-CODE"} description = "AutoGen extensions library" readme = "README.md" @@ -15,7 +15,7 @@ classifiers = [ "Operating System :: OS Independent", ] dependencies = [ - "autogen-core==0.6.0", + "autogen-core==0.6.1", ] [project.optional-dependencies] @@ -32,7 +32,7 @@ docker = ["docker~=7.0", "asyncio_atexit>=1.0.1"] ollama = ["ollama>=0.4.7", "tiktoken>=0.8.0"] openai = ["openai>=1.66.5", "tiktoken>=0.8.0", "aiofiles"] file-surfer = [ - "autogen-agentchat==0.6.0", + "autogen-agentchat==0.6.1", "magika>=0.6.1rc2", "markitdown[all]~=0.1.0a3", ] @@ -44,21 +44,21 @@ llama-cpp = [ graphrag = ["graphrag>=1.0.1"] chromadb = ["chromadb>=1.0.0"] web-surfer = [ - "autogen-agentchat==0.6.0", + "autogen-agentchat==0.6.1", "playwright>=1.48.0", "pillow>=11.0.0", "magika>=0.6.1rc2", "markitdown[all]~=0.1.0a3", ] magentic-one = [ - "autogen-agentchat==0.6.0", + "autogen-agentchat==0.6.1", "magika>=0.6.1rc2", "markitdown[all]~=0.1.0a3", "playwright>=1.48.0", "pillow>=11.0.0", ] video-surfer = [ - "autogen-agentchat==0.6.0", + "autogen-agentchat==0.6.1", "opencv-python>=4.5", "ffmpeg-python", "openai-whisper", diff --git a/python/uv.lock b/python/uv.lock index 063002f8c..7f60426e2 100644 --- a/python/uv.lock +++ b/python/uv.lock @@ -455,7 +455,7 @@ wheels = [ [[package]] name = "autogen-agentchat" -version = "0.6.0" +version = "0.6.1" source = { editable = "packages/autogen-agentchat" } dependencies = [ { name = "autogen-core" }, @@ -466,7 +466,7 @@ requires-dist = [{ name = "autogen-core", editable = "packages/autogen-core" }] [[package]] name = "autogen-core" -version = "0.6.0" +version = "0.6.1" source = { editable = "packages/autogen-core" } dependencies = [ { name = "jsonref" }, @@ -585,7 +585,7 @@ dev = [ [[package]] name = "autogen-ext" -version = "0.6.0" +version = "0.6.1" source = { editable = "packages/autogen-ext" } dependencies = [ { name = "autogen-core" },