[论文解读] AgentSquare: Automatic LLM Agent Search in Modular Design Space
该论文提出 AgentSquare,一种新颖的框架,用于在由规划、推理、工具使用和记忆模块组成的模块化设计空间中自动搜索 LLM 代理。通过利用模块演化、重组以及上下文性能预测器,AgentSquare 在六个不同的基准测试中平均比人工设计的代理高出 17.2% 的性能,同时提供可解释的设计洞察。
Recent advancements in Large Language Models (LLMs) have led to a rapid growth of agentic systems capable of handling a wide range of complex tasks. However, current research largely relies on manual, task-specific design, limiting their adaptability to novel tasks. In this paper, we introduce a new research problem: Modularized LLM Agent Search (MoLAS). We propose a modular design space that abstracts existing LLM agent designs into four fundamental modules with uniform IO interface: Planning, Reasoning, Tool Use, and Memory. Building on this design space, we present a novel LLM agent search framework called AgentSquare, which introduces two core mechanisms, i.e., module evolution and recombination, to efficiently search for optimized LLM agents. To further accelerate the process, we design a performance predictor that uses in-context surrogate models to skip unpromising agent designs. Extensive experiments across six benchmarks, covering the diverse scenarios of web, embodied, tool use and game applications, show that AgentSquare substantially outperforms hand-crafted agents, achieving an average performance gain of 17.2% against best-known human designs. Moreover, AgentSquare can generate interpretable design insights, enabling a deeper understanding of agentic architecture and its impact on task performance. We believe that the modular design space and AgentSquare search framework offer a platform for fully exploiting the potential of prior successful designs and consolidating the collective efforts of research community. Code repo is available at https://github.com/tsinghua-fib-lab/AgentSquare.
研究动机与目标
- 解决 LLM 代理缺乏统一且可重用的设计空间的问题,该问题阻碍了代理系统研究的可迁移性和可扩展性。
- 提出模块化 LLM 代理搜索(MoLAS)作为新的研究问题,通过利用先验知识实现代理架构的自动化优化。
- 设计一个标准化且可扩展的模块化设计空间,包含统一输入输出接口的规划、推理、工具使用和记忆模块。
- 通过使用上下文学习的代理性能预测器,减少昂贵的 LLM 评估次数,从而加速代理搜索。
- 生成新颖、高性能且可解释的代理架构,超越现有的手工设计。
提出的方法
- 定义一个由四个标准化 LLM 代理组件构成的模块化设计空间:规划、推理、工具使用和记忆,每个组件均具有统一的输入输出接口。
- 通过一种联合优化任务描述、现有模块和性能反馈的演化元提示(evolutionary meta-prompt),实现模块演化。
- 利用 LLM 推理对来自不同代码库的预存在模块进行重组,以探索高性能的模块组合。
- 设计一个性能预测器,利用上下文学习模拟代理性能,从而实现对低潜力候选者的早期剔除。
- 将搜索框架与一个迭代演化和重组模块的流水线集成,同时利用预测器剔除低潜力设计。
- 在涵盖网页、具身智能、工具使用和游戏环境的六个基准测试上验证该框架,以确保其泛化能力。

实验结果
研究问题
- RQ1标准化的模块化设计空间是否能够实现 LLM 代理架构的系统性与可重用性优化?
- RQ2通过模块演化与重组实现的自动化搜索,在发现优于人工设计的代理架构方面,其有效性如何?
- RQ3上下文性能预测器在不牺牲搜索质量的前提下,能在多大程度上降低评估成本?
- RQ4该搜索框架是否能够生成可解释的设计洞察,从而加深对代理性能的理解?
- RQ5AgentSquare 框架在包括网页导航、游戏玩法和工具使用在内的多样化应用领域中,其泛化能力如何?
主要发现
- AgentSquare 在六个不同基准测试中,平均性能比最佳已知人工设计的代理高出 17.2%。
- 该框架在每个基准测试环境中均持续发现新颖的代理架构,其性能优于所有手工设计的基线。
- AgentSquare 展现出比其他搜索算法更陡峭的优化轨迹,表明其能更快收敛到高性能代理。
- 性能预测器有效跳过了低潜力的代理候选,显著加速了搜索过程,且未影响解决方案质量。
- 该框架生成了可解释的设计洞察,揭示了与任务性能相关联的有意义的架构模式和模块交互关系。
- 模块化设计空间实现了来自不同代码库的模块的无缝集成与重组,促进了模块复用和社区范围内的知识整合。

阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。