[Paper Review] AgentSquare: Automatic LLM Agent Search in Modular Design Space
This paper proposes AgentSquare, a novel framework for automatic LLM agent search in a modular design space composed of Planning, Reasoning, Tool Use, and Memory modules. By leveraging module evolution, recombination, and an in-context performance predictor, AgentSquare discovers agents that outperform hand-crafted designs by 17.2% on average across six diverse benchmarks, while providing interpretable design insights.
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.
Motivation & Objective
- To address the lack of a unified, reusable design space for LLM agents that hinders transferability and scalability of agentic system research.
- To introduce Modularized LLM Agent Search (MoLAS) as a new research problem, enabling automated optimization of agent architectures using prior knowledge.
- To design a standardized, extensible modular design space with uniform IO interfaces for Planning, Reasoning, Tool Use, and Memory modules.
- To accelerate agent search by reducing costly LLM evaluations through an in-context surrogate performance predictor.
- To generate novel, high-performing, and interpretable agent architectures that surpass existing hand-crafted designs.
Proposed method
- Defining a modular design space with four standardized LLM agent components: Planning, Reasoning, Tool Use, and Memory, each with a uniform input-output interface.
- Implementing module evolution via an evolutionary meta-prompt that jointly optimizes task descriptions, existing modules, and performance feedback.
- Applying module recombination using LLM reasoning to explore high-performing combinations of pre-existing modules from diverse codebases.
- Designing a performance predictor that uses in-context learning to simulate agent performance, enabling early rejection of unpromising candidates.
- Integrating the search framework with a pipeline that iteratively evolves and recombines modules while using the predictor to prune low-potential designs.
- Validating the framework across six benchmarks spanning web, embodied, tool use, and game environments to ensure generalization.

Experimental results
Research questions
- RQ1Can a standardized modular design space enable systematic and reusable optimization of LLM agent architectures?
- RQ2How effectively can automated search via module evolution and recombination discover superior agent designs compared to human-crafted ones?
- RQ3To what extent can an in-context performance predictor reduce evaluation costs without sacrificing search quality?
- RQ4Can the search framework generate interpretable design insights that deepen understanding of agent performance?
- RQ5How generalizable is the AgentSquare framework across diverse application domains such as web navigation, game playing, and tool use?
Key findings
- AgentSquare achieves an average performance gain of 17.2% over the best-known human-designed agents across six diverse benchmarks.
- The framework consistently discovers novel agent architectures that outperform all hand-crafted baselines in every benchmark environment.
- AgentSquare demonstrates a steeper optimization trajectory than other search algorithms, indicating faster convergence to high-performing agents.
- The performance predictor effectively skips unpromising agent candidates, significantly accelerating the search process without compromising solution quality.
- The framework generates interpretable design insights, revealing meaningful architectural patterns and module interactions that correlate with task performance.
- The modular design space enables seamless integration and recombination of modules from disparate codebases, promoting reuse and community-wide knowledge consolidation.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.