Introductionο
ToolServer is the server provide XAgent with powerful and safe tools to solve tasks. It is a docker container that provides a safe environment for XAgent to run.
ToolServer is composed of three parts:
ToolServerManager is responsible for creating and managing ToolServerNode instances.
ToolServerMonitor is responsible for monitoring the status of ToolServerNode instances. Automatic detect instances status and removing the instances that are not working properly.
ToolServerNode is responsible for providing tools to solve tasks. It is a docker container that provides a safe environment for XAgent to run.
Currently, ToolServer provides the following tools:
π File Editor provide a text editing tool that can write, read, and modify files.
π Python Notebook provide a interactive python notebook that can run python code to validate ideas, draw figures, etc.
π Web Browser provide a web browser that can search and visit webpages.
π₯οΈ Shell provide a bash shell tool that can execute any shell commands, even install programs and host services.
π§© Rapid API provide a tool to retrieve apis from Rapid API and calling them, which provides a wide range of apis for XAgent to use. See ToolBench to get more information about the Rapid API collections. You can also easily add new tools to ToolServer to enhance agentβs abilities.
Configurationsο
Configurations for ToolServer are stored in assets/config/. You can change them and rebuild images to apply the changes.
Notes:
Change
node.privilegedtofalseinmanager.ymlif you donβt want to used docker in ToolServerNode. This will disable the ability to run docker commands in ToolServerNode.Change
idling_close_minutesinmonitor.ymlto change the time that ToolServerMonitor will wait before closing idle ToolServerNode instances.Add your api keys in
node.ymlto enable bing search (or use backup search duckduckgo) and rapid api.Change api timeout for Toolserver in
docker-compose.ymlby altering values after-tinservices.ToolServerManager.commandif you encounter timeout error of ToolServer.
Build and Setup ToolServerο
Make sure that you have installed docker and docker-compose.
All docker image build files are stored in dockerfiles/.
You can build them manually with following command:
docker-compose up --build
This will build and start all the docker images for ToolServerManager, ToolServerMonitor and ToolServerNode. Note that the configuration files will be copied to the docker images during the building process due to stability issues. If you change the configuration files, you should rebuild the docker images to apply the changes.