AgentFactory: Towards Automated Agentic System Design and Optimization
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
Large Language Models (LLMs) have demonstrated remarkable capabilities as powerful components in agentic systems, enabling sophisticated reasoning and complex task execution. However, current approaches to manually designing and optimizing agentic systems heavily rely on manual effort, limiting their adaptability and scalability. Recent work has explored the automated optimization of workflow designs. However, these approaches often overlook the crucial role of model capabilities and focus on single performance metrics, failing to address real-world deployment constraints. In this paper, we present AgentFactory, a framework that jointly optimizes both foundation models and workflow structures in agentic systems while considering multiple objectives including performance, cost, and efficiency. AgentFactory leverages advanced LLMs as optimizers to navigate the vast search space of possible configurations, employing a three-stage optimization pipeline to automatically discover effective combinations of fine-tuned models and optimized workflows. Through an iterative optimization process, our framework systematically explores and evaluates different agentic system designs, adapting to task-specific requirements while maintaining operational efficiency. We evaluate AgentFactory across eight benchmarks spanning five domains, including general reasoning, coding, mathematics, medicine, and finance. Our experiments demonstrate that AgentFactory consistently outperforms both manually designed methods and existing automated approaches, achieving an average improvement of 9.1% across all benchmarks, with particularly significant gains in domain-specific tasks (19.6% on MedQA and 18.7% on FinEval). These results establish AgentFactory as a promising approach for developing more capable and efficient agentic systems through automated optimization.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 31 of its 37 references that are in the map. First posted on arXiv 1 Sep 2026.
Builds on
31 of 37 references.
Closest ancestors · 2
Same direction, newest first
- 2024AFlow: Automating Agentic Workflow Generation14 Oct
- 2023ChatDev: Communicative Agents for Software Development16 Jul
Other references · 29
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2021Training Verifiers to Solve Math Word Problemscited by 9,743
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2020Measuring Massive Multitask Language Understandingcited by 7,768
- 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,601
- 2021Measuring Mathematical Problem Solving With the MATH Datasetcited by 5,203
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,064
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2023Generative Agents: Interactive Simulacra of Human Behaviorcited by 3,500
- 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,155
- 2023MetaGPT: Meta Programming for A Multi-Agent Collaborative Frameworkcited by 1,761
17 more
- 2023Improving Factuality and Reasoning in Language Models through Multiagent Debatecited by 1,739
- 2023CAMEL: Communicative Agents for "Mind" Exploration of Large Language Model Societycited by 1,348
- 2020What Disease does this Patient Have? A Large-scale Open Domain Question Answering Dataset from Medical Examscited by 1,324
- 2023HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in Hugging Facecited by 1,173
- 2019DROP: A Reading Comprehension Benchmark Requiring Discrete Reasoning Over Paragraphscited by 883
- 2023Graph of Thoughts: Solving Elaborate Problems with Large Language Modelscited by 873
- 2023Large Language Models as Optimizerscited by 830
- 2023Promptbreeder: Self-Referential Self-Improvement Via Prompt Evolutioncited by 521
- 2023MAmmoTH: Building Math Generalist Models through Hybrid Instruction Tuningcited by 483
- 2024Automated Design of Agentic Systemscited by 360
- 2023A Dynamic LLM-Powered Agent Network for Task-Oriented Agent Collaborationcited by 281
- 2024TextGrad: Automatic "Differentiation" via Textcited by 250
- 2024Buffer of Thoughts: Thought-Augmented Reasoning with Large Language Modelscited by 91
- 2024Archon: An Architecture Search Framework for Inference-Time Techniquescited by 59
- 2023FinEval: A Chinese Financial Domain Knowledge Evaluation Benchmark for Large Language Modelscited by 52
- 2024Are Large Language Models Good Statisticians?cited by 26
- 2023DeepMAD: Mathematical Architecture Design for Deep Convolutional Neural Networkcited by 14
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025AgentSwift: Efficient LLM Agent Design via Value-guided Hierarchical Search
- 2025EvoAgentX: An Automated Framework for Evolving Agentic Workflows
- 2024AutoFlow: Automated Workflow Generation for Large Language Model Agents
- 2025DebFlow: Automating Agent Creation via Agent Debate
- 2025EvoFlow: Evolving Diverse Agentic Workflows On The Fly
- 2025Polymath: A Self-Optimizing Agent with Dynamic Hierarchical Workflow
- 2026AgentCompass: A Unified Evaluation Infrastructure for Agent Capabilities
- 2026AOrchestra: Automating Sub-Agent Creation for Agentic Orchestration