-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Magentic-One in AG2 #75
Conversation
Question for @marklysze @yiranwu0 : Is the orchestration relevant to swarm? |
This reverts commit eb5ac4c.
…ry, and the message history never gets reset. Make this the default behavior, but give the option to only pass the task to the agent and give the option to reset the agent's history after it accomplishes the task.
…inal implementation.
As far as I understood the original Magentic one, all agents always get the entire chat history. I did not understand why. But I made it the default behavior. But I added two parameters: agent_whole_history (which determines if the agent that gets the task has access to the whole chat history vs just the instructions for the current task. By default this is True) I found it not very intuitive how the history is managed, and what gets included when you initiate an agent, in Autogen v0.4. But as far as I understand, all the broadcasted messages are always sent to all agents, and the called agents are not reset after they complete a task. I could be wrong on both... |
Few more things that come to mind: I tried using AG2's built-in _format_json_str() function. But it did not really work well. (I used Gemini Flash to test the functionality.) So I built my own. |
Add default social image to all blog posts
Implementing Magentic-One in AG2:
This is the first time I am working with AG2 / Autogen. It is my first attempt at recreating the Magentic-One agent in AG2. So far, only the Orchestrator has been implemented. I simplified the broadcasting and message history somewhat to make it more readable. The functionality should be equivalent or at least very similar to the original.
Since this is my first time working with AG2 / Autogen, I may not have utilized all the capabilities correctly.
I would LOVE some feedback on how I can improve the Orchestrator and integrate it better with AG2. I would gladly make adjustments you see necessary to improve this.
I have not implemented a lot of the checks and tests; I wanted to get some early feedback to ensure this is going in the right direction.
Once the Orchestrator is working, I will implement the other agents as well.
Thanks for the Project, it was fun getting to know it a little while working on this.
Merlin
A few technical things to note:
There is a while loop in the code. If you are testing the orchestrator with a different prompt than the one I used in the notebook, or with other agents, please watch the logs closely and terminate the process if it seems to run indefinitely. I believe I implemented all the breaks and checks correctly, but there may be a mistake.
As I mentioned earlier, I simplified the message broadcasting from the original implementation. It should be much easier to understand and is intended to be equivalent to the original.
I have not tested the agent extensively, but it works with simple tasks.