Basic Concepts
ConversableAgent
ConversableAgent is at the heart of all AG2 agents while also being a fully functioning agent.
Let’s converse with ConversableAgent in just 5 simple steps.
Let’s break it down:
-
Import
ConversableAgent
, you’ll find the most popular classes available directly fromautogen
. -
Create our LLM configuration to define the LLM that our agent will use.
-
Create our ConversableAgent give them a unique name, and use
system_message
to define their purpose. -
Create an agent to represent you, so you can engage with the LLM-based agent.
-
Have the agent representing you ask the LLM-based agent a question using the
initiate_chat
method, passing in our starting message.