Automated Design of Agentic Systems

Paper · arXiv 2408.08435 · Published August 15, 2024
LLM Agents

Researchers are investing substantial effort in developing powerful general-purpose agents, wherein Foundation Models are used as modules within agentic systems (e.g. Chain-of-Thought, Self-Reflection, Toolformer). However, the history of machine learning teaches us that hand-designed solutions are eventually replaced by learned solutions. We formulate a new research area, Automated Design of Agentic Systems (ADAS), which aims to automatically create powerful agentic system designs, including inventing novel building blocks and/or combining them in new ways. We further demonstrate that there is an unexplored yet promising approach within ADAS where agents can be defined in code and new agents can be automatically discovered by a meta agent programming ever better ones in code. Given that programming languages are Turing Complete, this approach theoretically enables the learning of any possible agentic system: including novel prompts, tool use, control flows, and combinations thereof. We present a simple yet effective algorithm named Meta Agent Search to demonstrate this idea, where a meta agent iteratively programs interesting new agents based on an ever-growing archive of previous discoveries.

Introduction. Foundation Models (FMs) such as GPT (OpenAI, 2022, 2024) and Claude (Anthropic, 2024b) are quickly being adopted as powerful general-purpose agents for agentic tasks that need flexible reasoning and planning (Wang et al., 2024). Despite recent advancements in FMs, solving problems reliably often requires an agent to be a compound agentic system with multiple components instead of a monolithic model query (Rocktäschel, 2024; Zaharia et al., 2024). Additionally, to enable agents to solve complex real-world tasks, they often need access to external tools such as search engines, code execution, and database queries. As a result, many effective building blocks of agentic systems have been proposed, such as chain-of-thought planning and reasoning (Hu & Clune, 2024; Wei et al., 2022; Yao et al., 2023), memory structures (Lewis et al., 2020; Zhang et al., 2024c), tool use (Qu et al., 2024; Schick et al., 2023), and self-reflection (Madaan et al., 2024; Shinn et al., 2023).

Discussion / Conclusion. Safety Considerations. We strongly advise researchers to be aware of the safety concerns when executing untrusted model-generated code in Meta Agent Search and other research involving code generation. While it is highly unlikely that model-generated code will perform overtly malicious actions in our current settings and with the Foundation Models (FMs) we use, such code may still act destructively due to limitations in model capability or alignment (Chen et al., 2021; Rokon et al., 2020). Ideally, sandbox environments can be used to safely run untrusted model-generated code (Chen et al., 2021; Yee et al., 2010). More broadly, research on more powerful AI systems raises the question of whether we should be conducting research to advance AI capabilities at all. That topic clearly includes the proposed Automated Design of Agentic Systems (ADAS) as a new area in AI-GA research, which could potentially contribute to an even faster way to create Artificial General Intelligence (AGI) than the current manual approach (Clune, 2019).