ag2ai / ag2

AG2 (formerly AutoGen): The Open-Source AgentOS. Join us at: https://discord.gg/pAbnFJrkgZ
https://ag2.ai
Apache License 2.0
658 stars 62 forks source link

[Roadmap Issue]: CaptainAgent #39

Closed sonichi closed 5 days ago

sonichi commented 6 days ago

Describe the issue

Build a strong agent that performs planning, task decomposition, dynamic agent team creation, tool/agent selection, self-improvement. Save the manual effort of developers in experimenting with multi-agent design.

Additional Information

This is a long-term goal with ongoing research. As the first step, offer a built-in CaptainAgent based on https://arxiv.org/pdf/2405.19425 Then keep doing more research and improve it.

Code example

from autogen import CaptainAgent, UserProxyAgent

llm_config = {"model": "gpt-4o"}
captain = CaptainAgent(name="captain", llm_config=llm_config, code_execution_config={"use_docker": False})
user_proxy = UserProxyAgent(name="user_proxy")
query = 'Find the stock price of Microsoft in the past 1 year and plot a line chart to show the trend. Save the line chart as "microsoft_stock_price.png".'
result = user_proxy.initiate_chat(captain, message=query)

Expectation: outperform the existing AssistantAgent:

from autogen import UserProxyAgent, AssistantAgent

llm_config = {"model": "gpt-4o"}
user_proxy = UserProxyAgent(
    name="user_proxy",
    code_execution_config={"use_docker": False},
)
assistant = AssistantAgent(name="assistant", llm_config=llm_config)
query = 'Find the stock price of Microsoft in the past 1 year and plot a line chart to show the trend. Save the line chart as "microsoft_stock_price.png".'
result = user_proxy.initiate_chat(assistant, message=query)
BlocUnited commented 6 days ago

I can’t wait to use this!

szwang-seedtech commented 6 days ago

Nice job! BTW, is there any place or where can I follow up with the progress of graph RAG? I think it is crucial to captain agent, or captain agent may be easily messed up with all the info.

qingyun-wu commented 6 days ago

Nice job! BTW, is there any place or where can I follow up with the progress of graph RAG? I think it is crucial to captain agent, or captain agent may be easily messed up with all the info.

@szwang-seedtech you can follow up with @randombet about graph RAG!