[Issue]: order agents within a groupchat for round_robin to work
Describe the issue
At the moment, agents added to a groupchat container are retrieved ordered by created date (descending). This clearly causes an issue with round_robin. The fix will be to keep track of the ordering (as agents are added to a groupchat container) and use that detail in ordering the agents before they are created.
Steps to reproduce
- Create user_proxy agent
- Create assistant agent
- Create groupchat, and add assistant agent first, user_proxy second
- The user_proxy agent will always be consider first in the groupchat because of current ordering logic: agent desc created date
- Test the groupchat with selection_method: round_robin. user_proxy will run first, and chat terminates immediately
Screenshots and logs
Additional Information
No response
@filippopirri we'd greatly appreciate it if you could create a pull request. thanks
cc @victordibia
Consider upgrading to the new version of AutoGen Studio. This should address the ordering issue above.
In the new version of AutoGen, all behaviours are standardized on the AutoGen AgentChat api, see documentation below.
- AutoGen Studio documentation - https://microsoft.github.io/autogen/dev/user-guide/autogenstudio-user-guide/index.html
- To learn about how code executors work ... https://microsoft.github.io/autogen/dev/user-guide/core-user-guide/design-patterns/code-execution-groupchat.html
- How to convert any agentchat python code and use it in autogen studio - https://microsoft.github.io/autogen/dev/user-guide/autogenstudio-user-guide/usage.html#declarative-specification-of-componenents