LeiWangetal. ASurveyonLargeLanguageModelbasedAutonomousAgents 15
to call external tools for executing action. In the real-world applications. TaskMatrix.AI [71] con-
following, we present several representative tools nects LLMs with millions of APIs to support task
whichhavebeenexploitedintheliterature. execution. At its core lies a multimodal conversa-
tionalfoundationalmodelthatinteractswithusers,
(1) APIs. Leveraging external APIs to comple-
understands their goals and context, and then pro-
mentandexpandactionspaceisapopularparadigm
ducesexecutablecodeforparticulartasks. Allthese
in recent years. For example, HuggingGPT [13]
agentsutilizeexternalAPIs astheirtools,andpro-
leverages the models on HuggingFace to accom-
videinteractiveinterfacesforuserstoeasilymodify
plishcomplex usertasks. [66,67]proposeto auto-
andexecutethegeneratedortransformedtools.
matically generate queries to extract relevant con-
(2) Databases & Knowledge Bases. Integrating
tent from external web pages when responding to
externaldatabaseorknowledgebaseenablesagents
userrequest. TPTU[67]interfaceswithbothPython
toobtainspecificdomaininformationforgenerating
interpretersandLaTeXcompilerstoexecutesophis-
more realistic actions. For example, ChatDB [40]
ticatedcomputationssuchassquareroots,factorials
employsSQL statementstoquery databases,facil-
andmatrixoperations. AnothertypeofAPIsisthe
itating actions by the agents in a logical manner.
ones that can be directly invoked by LLMs based
MRKL [72] and OpenAGI [73] incorporate vari-
on natural language or code inputs. For instance,
ous expert systems such as knowledge bases and
Gorilla [68] is a fine-tuned LLM designed to gen-
plannerstoaccessdomain-specificinformation.
erate accurate input arguments for API calls and
mitigate the issue of hallucination during external (3) External Models. Previous studies often uti-
APIinvocations. ToolFormer[15]isanLLM-based lizeexternalmodelstoexpandtherangeofpossible
tool transformation system that can automatically actions. In comparison to APIs, external models
convert a given tool into another one with differ- typically handle more complex tasks. Each exter-
ent functionalities or formats based on natural lan- nal model may correspond to multiple APIs. For
guageinstructions. API-Bank[69]isanLLM-based example, to enhance the text retrieval capability,
APIrecommendationagentthatcanautomatically MemoryBank [39] incorporates two language mod-
search and generate appropriate API calls for var- els: oneisdesignedtoencodetheinputtext,while
ious programming languages and domains. API- theotherisresponsibleformatchingthequerystate-
Bankalsoprovidesaninteractiveinterfaceforusers ments. ViperGPT[74]firstlyusesCodex,whichis
to easily modify and execute the generated API implementedbasedonlanguagemodel,togenerate
calls. ToolBench [14] is an LLM-based tool gen- Python code from text descriptions, and then exe-
eration system that can automatically design and cutesthecodetocompletethegiventasks. TPTU[67]
implement various practical tools based on natu- incorporates various LLMs to accomplish a wide
rallanguage requirements. Thetoolsgenerated by range of language generation tasks such as gen-
ToolBenchincludecalculators,unitconverters,cal- erating code, producing lyrics, and more. Chem-
endars, maps, charts, etc. RestGPT [70] connects Crow [75] is an LLM-based chemical agent de-
LLMs with RESTful APIs, which follow widely signed to perform tasks in organic synthesis, drug
accepted standards for web services development, discovery, and material design. It utilizes seven-
makingtheresultingprogrammorecompatiblewith teenexpert-designed modelstoassist itsoperations.