AFlow  by FoundationAgents

Automating agentic workflow generation

Created 6 months ago
264 stars

Top 96.8% on SourcePulse

GitHubView on GitHub
Project Summary

Automating the generation and optimization of agentic workflows, AFlow targets researchers and developers seeking to replace manual workflow design with an automated, performance-driven approach. By leveraging Monte Carlo Tree Search (MCTS) within a code-represented workflow space, AFlow aims to discover and refine effective agentic workflows, potentially outperforming handcrafted solutions across various tasks.

How It Works

AFlow employs a framework comprising Nodes (basic LLM invocation units), Operators (predefined Node sequences for efficiency), Workflows (connected sequences of Nodes), an Optimizer (using MCTS to explore workflow variations), and an Evaluator (to assess performance). The core innovation lies in using MCTS to navigate a search space where workflows are represented as code, allowing for iterative exploration, selection, expansion, and evaluation of workflow structures to optimize task performance.

Quick Start & Requirements

  • Installation: Set up a Python 3.9 virtual environment (e.g., using conda create -n aflow python=3.9), then install dependencies with pip install -r requirements.txt.
  • Configuration: LLM parameters are configured in config/config2.yaml. Optimization parameters are set via command-line arguments (e.g., --dataset, --sample, --max_rounds) or by modifying run.py. Operator configurations can be found in operator.json.
  • Data: Datasets (HumanEval, MBPP, GSM8K, MATH, HotpotQA, DROP) can be downloaded using metagpt/ext/aflow/data/download_data.py.
  • Execution: Run optimization via python run.py --dataset <dataset_name>.
  • Links: Documentation and experimental data are available via provided links in the README.

Highlighted Details

  • Presented as an ICLR 2025 Oral paper.
  • Utilizes Monte Carlo Tree Search (MCTS) within a code-represented workflow space for automated generation and optimization.
  • Evaluated on benchmark datasets including HumanEval, MBPP, GSM8K, MATH, HotpotQA, and DROP.
  • Provides raw experimental data, including generated workflows and trajectories, for result reproduction.

Maintenance & Community

Direct contact is available via email (didi4goooogle@gmail.com) and WeChat (18831933368) for support. Users are encouraged to open issues for questions or difficulties. The roadmap includes plans for supporting multiple search algorithms, multi-model search, leaderboards, and additional benchmarks.

Licensing & Compatibility

The provided README does not explicitly state the project's license. This absence requires further investigation for compatibility, especially concerning commercial use or integration into closed-source projects.

Limitations & Caveats

The project explicitly notes that "Some Operators may have bugs during the migration from MetaGPT to this repository," indicating potential stability issues with certain components. The lack of a specified license is a significant caveat for adoption.

Health Check
Last Commit

1 month ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
2
Star History
41 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.