- Basic AI knowledge.
- Software: VS Studio, Anaconda or similar, Python 3.11.
Start by importing required modules:
import autogen
from autogen.agentchat.contrib.agent_builder import AgentBuilder
Set your LLM configurations:
config_path = 'OAI_CONFIG_LIST.json'
config_list = autogen.config_list_from_json(config_path)
default_llm_config = {'temperature': 0}
Set up the Agent Builder:
builder = AgentBuilder(config_path=config_path, builder_model='gpt-4-1106-preview', agent_model='gpt-4-1106-preview')
Ensure the task is generic with an example:
building_task = "Find a paper on arxiv by programming, and analyze its application in some domain. For example, find a latest paper about gpt-4 on arxiv and find its potential applications in software."
Define agent configurations and specify coding ability:
agent_list, agent_configs = builder.build(building_task, default_llm_config, coding=True)
Facilitate communication among agents:
group_chat = autogen.GroupChat(agents=agent_list, messages=[], max_round=12)
Set up a manager for the group chat:
manager = autogen.GroupChatManager(groupchat=group_chat, llm_config={"config_list": config_list, **default_llm_config})
Start the task execution:
agent_list[0].initiate_chat(manager, message="find top 4 latest Paper about GPT4 and its implication on Cybersecurity")