Skip to content

Repository files navigation

DatasetsModelsGITHUBDocmutation

WeChat (微信)

English | 中文

The First Unified Agent Data Synthesis Framework for Custom Task with all-in-one envrionment.

🚀 Overview

AgentFlow is the first unified agent data synthesis framework that generates high-quality training and evaluation data across heterogeneous agent environments — including

  • 📚 RAG

  • 🖼️ MM-Doc

  • 🔍 Deep Research

  • 🖱️ GUI

  • 🟰 Text2SQL

  • 📊 Data Analysis

  • 🤖 Embodied Agents

  • and more.

It provides a unified, extensible, all-in-one environment for synthesizing agent trajectories, reasoning traces, tool interactions, and environment feedback.

AgentFlow also explores the underlying mechanisms of agent data synthesis and model training, enabling the development of industrial-grade agentic foundation models that operate seamlessly across domains.

Beyond synthetic training data, AgentFlow also offers high-quality human-annotated and synthetic benchmarks for evaluating emerging agent capabilities and exploring their boundaries.

One framework. All agent worlds.

✨ Key Features

Unified Agent Data Synthesis Paradigm

  • Synthesize complex agent training data with just a few lines of code.
  • Provide a unified abstraction layer for seamless data synthesis across heterogeneous agent environments.

All-in-One Sandbox

  • Built-in support for 📚 RAG, 🖼️ MM-Doc, 🔍 Deep Research, 💻 Code, 🟰 SQL database, 🖱️ GUI, 🤖 Embodied and more.
  • Easily extensible to new environments via a modular backend design.

Exploring Mechanisms of Agent Data Synthesis and Training

  • Agentic Model Consolidation: Jointly and Stably train a unified model on mixed trajectories from all domains.

Innovative High-Value Agent Benchmarks

  • Offer a suite of novel, high-quality benchmarks purpose-built for evaluating agentic capabilities.
  • Designed to expose real-world challenges that existing benchmarks overlook, driving meaningful progress in agent research.

⚙️ Data Synthesis Method

AgentFlow synthesizes high-quality agent training data through a three-stage pipeline: Trajectory Sampling → Trajectory Selection → QA Synthesis.

  1. Trajectory Sampling. An LLM-driven agent iteratively explores a sandbox environment starting from seed inputs. At each step it proposes a tool call, executes it, and records the observation, building a branching trajectory tree with concurrent expansion and action de-duplication.

  2. Trajectory Selection. All root-to-leaf paths are scored by depth, information richness, and tool diversity, then selected with strategies, ensuring high-quality content.

  3. QA Synthesis. For each selected path, the LLM generates a multi-hop, factoid QA pair grounded in the collected observations, with built-in quality checks.

📦 Installation

git clone https://github.com/OpenDCAI/AgentFlow
cd AgentFlow
bash install.sh # Install core dependencies

Optional dependencies:

bash install.sh --ml # + ML/DL (torch, transformers, etc.)
bash install.sh --cloud # + Alibaba Cloud SDK
bash install.sh --all # Install everything

All dependencies are listed in requirements.txt. See bash install.sh --help for details.

🛠️ QuickStart

We take WebAgent data synthesis as an example.

Step 1: Launch the sandbox with WebAgent sandbox config.

./sandbox-server.sh --config configs/sandbox-server/web_config.json \
--port 18890 \
--host 0.0.0.0

Step 2: Synthesize QA with WebAgent synthesis config.

fromsynthesisimportsynthesizesynthesize(config_path="configs/synthesis/web_config.json")

Step 3: Synthesize trajectory with WebAgent trajectory config.

fromrolloutimportpipelinepipeline(config_path="configs/trajectory/web_trajectory.json")

Step 4: After training the model, serve it with vLLM.

vllm serve \
--model YOUR_TRAINED_MODEL \
--served-model-name webagent \
--tensor-parallel-size 8 \
--enable-auto-tool-choice \
--tool-call-parser hermes \
--port 8222

Step 5: Infer on trained Agentic model with infer config.

fromrolloutimportpipelinepipeline(config_path="configs/infer/web_infer.json")

⚙️ Configuration

PurposeConfig Path
🖥️ Launching Sandboxconfigs/sandbox-server/
🧪 Synthesizing QAconfigs/synthesis/
🔄 Trajectory Rolloutconfigs/trajectory/
🚀 Model Inferenceconfigs/infer/

🌟 AgentFlow Agent Family

Papers

AgentFlow also has an extensive agent family. You can find more information in the following paper:

[1] DocDancer: Towards Agentic Document-Grounded Information Seeking

[2] RAGShaper: Eliciting Sophisticated Agentic RAG Skills via Automated Data Synthesis

[3] Exploring Information Seeking Agent Consolidation

[4] BrowseComp-V3: A Visual, Vertical, and Verifiable Benchmark for Multimodal Browsing Agents

Models

Agent🤗 HuggingFace
MM-DocDocDancer
RAGRAGShaper
DeepResearchDeepResearch Agent
General-datamixAgent-datamix
General-RegMeanppAgent-RegMeanpp

Datasets

Agent🤗 HuggingFace
MM-DocDocDancer
RAGRAGShaper
DeepResearchDeepResearch Agent

Benchmarks

BrowseComp-V3

A challenging benchmark of 300 hand-crafted multimodal questions for evaluating web browsing agents. It features deep multi-hop, cross-modal reasoning across diverse domains, with publicly searchable evidence and expert-validated subgoal-driven process evaluation. Even SOTA models like GPT-5.2 achieve only 36% accuracy. Includes OmniSeeker, a general multimodal browsing agent framework, along with full rollout and LLM-judge evaluation pipelines.

📄 Project Page · 🤗 Dataset · 💻 GitHub

🧪 Overall Performance

Qwen3-30B-A3B-Think

LevelStrategyWeb: GAIA (Acc.)Web: BC (Acc.)Web: BC-zh (Acc.)Doc: MMBD (Acc.)Doc: DocB (Acc.)RAG: HotPotQA (EM/F1)RAG: AmbigQA (EM/F1)RAG: Bamboogle (EM/F1)
Data-levelData Mixing64.0828.0034.0063.5983.2938.00 / 42.5349.50 / 58.8453.10 / 60.20
Parameter-LevelRegMean++60.1922.5028.0064.6680.7645.50 / 58.2758.80 / 69.3652.80 / 66.48

🔗 RAG Agent Case and Performance

Agentic RAG is an approach where an autonomous agent actively decides how and when to retrieve information and reason over it to accomplish a task.

ModelsBamboogle EMBamboogle F1PopQA EMPopQA F1NQ EMNQ F1AmbigQA EMAmbigQA F1Avg EMAvg F1
Prompt-Based Methods
IR-COT16.027.932.439.919.335.524.540.623.136.0
RECOMP21.728.640.545.8
Search-o130.439.947.050.030.340.742.553.437.646.0
Learning-Based Methods
Search-R130.443.241.346.436.045.049.260.439.248.8
ReasonRAG22.429.141.144.428.138.939.751.932.841.1
HL-Data 4.5k50.467.535.248.331.547.452.169.042.358.0
Ours
RAGShaper 4.5k58.570.337.447.838.350.061.371.448.859.8
RAGShaper 6.5k60.072.638.949.641.354.861.171.150.362.0
🙋 QuestionAmajorliteraryworkcommissionedbytheHolyRomanEmperorwhosereignbeganin1508waspartofhisgrandartisticlegacy. Whilethispatroncommissionedfamousmanuscriptanthologiesduringthisperiod, thisspecificallegoricalepicwasdistinctivelydesignedfortheprintingpresstoensureawideraudience.**Whatistheexactpublicationyearofitsfirstedition?**
💡 Answer1517

🔬 Document Agent Case and Performance

Document agent answers complex questions over multi-page documents by navigating, extracting, and reasoning across heterogeneous content—including text, tables, charts, and images.

Benchmark Results Comparison

MethodModelMMLongBench-Doc accF1LasJDocBench LasJ
**VLM
OCR-based Baseline
TesseractGPT-4o30.130.5
TesseractGemini-2.0-Flash39.637.2
RAG-based Baseline
VisRAGGPT-4o29.027.8
RAGAnythingGPT-4o-mini42.863.4
Prompt-based Agent
Doc-ReactGPT-4o38.138.3
MDocAgentGPT-4o42.0
SimpleDocClaude-4-Sonnet58.6
DocLensClaude-4-Sonnet63.3
Ours
DocDancerQwen3-4B (ft)48.449.259.479.8
DocDancerQwen3-30B-A3B (ft)54.453.965.381.2
Human Baseline65.866.081.2
🙋 QuestionWhatisthedifferenceinpercentage-pointincreasebetweentheoverallmeanscoreimprovementshowninthebarchartofpre-testversuspost-testscoresandtheimprovementfortheTICPrincipleconceptreportedinthepercentagestable?
💡 Answer14.92%

🖱️ Data Analysis Agent Case

Example input table (CSV preview, e.g. race_results.csv):

RankDriverTeamLapsTime / RetireGridPoints
1sébastien bourdaisn / h / 1 racing9645:42.0233
2justin wilsonrsports96+ 3.9 secs327
3graham rahaln / h / 1 racing96+ 6.6 secs425
4simon pagenaudteam australia96+ 24.8 secs723
5paul tracyforsythe racing96+ 28.1 secs1422
.....................
🙋 QuestionWhichfeaturehasthehighestimportanceinpredicting'time / retired'accordingtotheRandomForestmodel?
💡 Answerlaps

🖱️ NL2SQL Agent Case

Table Structure

actor Table (200 rows)

actor_idfirst_namelast_namelast_update
1PENELOPEGUINESS2026-02-05 16:18:42
2NICKWAHLBERG2026-02-05 16:18:42
3EDCHASE2026-02-05 16:18:42

film_actor Table (5,462 rows)

actor_idfilm_idlast_update
112026-02-05 16:18:45
1232026-02-05 16:18:45
1252026-02-05 16:18:45

film Table (1,000 rows)

film_idtitledescriptionrelease_yearrental_ratelengthrating
1ACADEMY DINOSAURA Epic Drama of a Feminist...20060.9986PG
2ACE GOLDFINGERA Astounding Epistle of a...20064.9948G
3ADAPTATION HOLESA Astounding Reflection of...20062.9950NC-17

film_category Table (1,000 rows)

film_idcategory_idlast_update
162026-02-05 16:18:48
2112026-02-05 16:18:48
362026-02-05 16:18:48

category Table (16 rows)

category_idnamelast_update
1Action2026-02-05 16:18:42
2Animation2026-02-05 16:18:42
3Children2026-02-05 16:18:42

inventory Table (4,581 rows)

inventory_idfilm_idstore_idlast_update
1112026-02-05 16:18:42
2112026-02-05 16:18:42
3112026-02-05 16:18:42

rental Table (16,044 rows)

rental_idrental_dateinventory_idcustomer_idreturn_datestaff_id
12005-05-24 22:53:303671302005-05-26 22:04:301
22005-05-24 22:54:3315254592005-05-28 19:40:331
32005-05-24 23:03:3917114082005-06-01 22:12:391

Synthesized Question

Which film categories have more than 10 actors who have appeared in popular films, and how many such actors are there in each category?

Answer SQL

WITH film_popularity AS (
SELECTf.film_id, COUNT(r.rental_id) AS rental_count FROM film f JOIN inventory i ONf.film_id=i.film_idJOIN rental r ONi.inventory_id=r.inventory_idGROUP BYf.film_id
), top_popular_films AS (
SELECT film_id FROM film_popularity WHERE rental_count > (SELECTAVG(rental_count) FROM film_popularity)
), actor_film_count AS (
SELECTa.actor_id, COUNT(f.film_id) AS film_count FROM actor a JOIN film_actor fa ONa.actor_id=fa.actor_idJOIN film f ONfa.film_id=f.film_idGROUP BYa.actor_id
), top_actors AS (
SELECT actor_id FROM actor_film_count WHERE film_count > (SELECTAVG(film_count) FROM actor_film_count)
), actor_category_data AS (
SELECTfa.actor_id, c.nameAS category_name FROM film_actor fa JOIN film_category fc ONfa.film_id=fc.film_idJOIN category c ONfc.category_id=c.category_id
) SELECTc.nameAS category_name, COUNT(a.actor_id) AS actor_count FROM top_actors ta JOIN actor_category_data acd ONta.actor_id=acd.actor_idJOIN category c ONacd.category_name=c.nameGROUP BYc.nameHAVINGCOUNT(a.actor_id) >10ORDER BY actor_count DESC;

🖱️ GUI Agent Case

GUI Agent Case

GUI_case.mp4
🙋 InstructionIwanttoauditallcommandaliasesonthisUbuntumachine, sopleaselaunchtheterminalfromtheGUI, identifyanyhomedirectoryconfigfilesrelatedtoshellstartup, andthengenerateaclean, sortedlistthatcombinesbothcurrentlyactivealiasesandthosehiddeninyourconfigurationfilessoIcanseethefulldefinitionsofcommandslikealertorll.

🖱️ Embodied Agent Case

Place the mouse on the yellow pad
Open the laptop
Place the cup on the blue box
Store the car in the basket

📜 License

Apache 2.0

✍️ Contributors

RoleMembers
🎯 Project LeaderZhengwei Tao (tttzw@pku.edu.cn), Jialong Wu (wujialongml@gmail.com)
🌟 Core ContributorBo Li, Guochen Yan, Qintong Zhang, Huanyao Zhang
💡 ContributorXinjie Lv, Haishan Lu, Yuan Xu, Haoyang Yao, Xingdi Ding
📣 AdvisorKuan Li (UniPat.ai)
🏫 SupervisorWentao Zhang, Bin Cui

🤝 Community & Support

💬 Join the AgentFlow open-source community to ask questions, share ideas, and collaborate with other developers!


AgentFlow WeChat Community
👆 Scan to join the community WeChat group 🎉

🌍 Citation

If you use AgentFlow in your research, please cite:

@misc{omniagentsynth2026,
title={AgentFlow: Unified Agent Data Synthesis Framework},
author={AgentFlow Team},
year={2026},
howpublished={\url{https://github.com/OpenDCAI/AgentFlow}}
}

About

The First Unified Agent Data Synthesis Framework for Custom Agentic Task with all-in-one envrionment

Resources

Stars

137 stars

Watchers

5 watching

Forks

Releases

Packages

Used by

Contributors

Languages