AFlow: Automating Agentic Workflow Generation
Jiayi Zhang, Jinyu Xiang, Zhaoyang Yu, Fengwei Teng, Xionghui Chen, Jiaqi Chen, Mingchen Zhuge, Xin Cheng, Sirui Hong, Jinlin Wang, Bingnan Zheng, Bang Liu
Abstract
Large language models (LLMs) have demonstrated remarkable potential in solving complex tasks across diverse domains, typically by employing agentic workflows that follow detailed instructions and operational sequences. However, constructing these workflows requires significant human effort, limiting scalability and generalizability. Recent research has sought to automate the generation and optimization of these workflows, but existing methods still rely on initial manual setup and fall short of achieving fully automated and effective workflow generation. To address this challenge, we reformulate workflow optimization as a search problem over code-represented workflows, where LLM-invoking nodes are connected by edges. We introduce AFLOW, an automated framework that efficiently explores this space using Monte Carlo Tree Search, iteratively refining workflows through code modification, tree-structured experience, and execution feedback. Empirical evaluations across six benchmark datasets demonstrate AFLOW's efficacy, yielding a 5.7% average improvement over state-of-the-art baselines. Furthermore, AFLOW enables smaller models to outperform GPT-4o on specific tasks at 4.55% of its inference cost in dollars. The code is available at https://github.com/FoundationAgents/AFlow .
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 03638a3a-5e42-41e1-a535-c7efe652aa13Cited by top-tier papers62
- Multi-Agent Collaboration via Evolving OrchestrationYufan Dang, Chen Qian, Xueheng Luo, Jingru Fan et al.NeurIPS 2025 · 118 citations
- MemEvolve: Meta-Evolution of Agent Memory SystemsGuibin Zhang, Haotian Ren, Chong Zhan, Junhao Wang et al.ICML 2026 · 69 citations
- Your Agent May Misevolve: Emergent Risks in Self-evolving LLM AgentsShuai Shao, Qihan Ren, Dongrui Liu, Chen Qian et al.ICLR 2026 · 60 citations
- MMedAgent-RL: Optimizing Multi-Agent Collaboration for Multimodal Medical ReasoningPeng Xia, Jinglu Wang, Yibo Peng, Kaide Zeng et al.ICLR 2026 · 47 citations
- DeepEye-SQL: A Software-Engineering-Inspired Text-to-SQL FrameworkBoyan Li, Chong Chen, Zhujun Xue, Yinan Mei et al.SIGMOD 2026 · 40 citations
Builds on21
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
- Reflexion: language agents with verbal reinforcement learningNoah Shinn, Federico Cassano, Ashwin Gopinath, Karthik Narasimhan et al.NeurIPS 2023 · 5,828 citations
- Self-Refine: Iterative Refinement with Self-FeedbackAman Madaan, Niket Tandon, Prakhar Gupta, Skyler Hallinan et al.NeurIPS 2023 · 4,972 citations
- Large Language Models as OptimizersChengrun Yang, Xuezhi Wang, Yifeng Lu, Hanxiao Liu et al.ICLR 2024 · 817 citations
- LLM-Planner: Few-Shot Grounded Planning for Embodied Agents with Large Language ModelsChan Hee Song, Brian M. Sadler, Jiaman Wu, Wei-Lun Chao et al.ICCV 2023 · 685 citations
Related papers
- A²Flow: Automating Agentic Workflow Generation via Self-Adaptive Abstraction OperatorsMingming Zhao, Xiaokang Wei, Yuanqi Shao, Kaiwen Zhou et al.AAAI 2026
- DyFlow: Dynamic Workflow Framework for Agentic ReasoningYanbo Wang, Zixiang Xu, Yue Huang, Xiangqi Wang et al.NeurIPS 2025 · 24 citations
- Flow: Modularized Agentic Workflow AutomationBoye Niu, Yiliao Song, Kai Lian, Yifan Shen et al.ICLR 2025
- FlowBot: Inducing LLM Workflows with Bilevel Optimization and Textual GradientsHongyeon Yu, Young-Bum Kim, Yoon KimICML 2026
- FusionFlow: Enabling Deep Structural Exploration for Automated Agentic Workflow GenerationXiang Wang, Zongtao Yang, Zhuojian Hong, Shuhao Zhang et al.ACL 2026
