Install
ag2
with CaptainAgent:Note: If you have been usingFor more information, please refer to the installation guide.autogen
orag2
, all you need to do is upgrade it using:orasautogen
, andag2
are aliases for the same PyPI package.
Setup API endpoint
In order to setup API, you should create a OAI_CONFIG_LIST file. The config list should look like the following:Learn more about configuring LLMs for agents here.
Using CaptainAgent without libraries
We begin with demonstrating how to use CaptainAgent without retrieving from libraries. In this case, CaptainAgent will automatically generate a set of experts according to its identified subtask and initiate the group chat. By default, the backbone of the LLM is set togpt-4o
. For
instructions on configuring the backbone, refer to docs on
nested_mode
.
Building Agents from library & Retrieve tools from tool library
One significant feature of CaptainAgent is that the agents and tools can be retrieved from a dedicated library. When CaptainAgent starts building experts for group chat, it will retrieve and select from agent library, then assign tools retrieved from tool library to the experts. For agent library, refer tocaptainagent_expert_library.json
for samples. You can refer to
docs
on how to customize your own expert library.
For tool library, we provide a set of tools
here,
the tools are categorized into three types: data analysis,
information_retrieval, math. If you are using the tools, you should
install the
requirements
for them.