← Latest papers
💬 NLP

In-the-Flow Agentic System Optimization for Effective Planning and Tool Use

The paper introduces AgentFlow, a trainable in-the-flow agentic framework that employs a novel Flow-GRPO algorithm to optimize a specialized planner within a multi-turn loop, achieving significant performance gains over existing baselines and larger proprietary models across diverse reasoning and tool-use benchmarks.

Original authors: Zhuofeng Li, Haoxiang Zhang, Seungju Han, Sheng Liu, Jianwen Xie, Yu Zhang, Yejin Choi, James Zou, Pan Lu

Published 2026-07-23
📖 3 min read☕ Coffee break read

Original authors: Zhuofeng Li, Haoxiang Zhang, Seungju Han, Sheng Liu, Jianwen Xie, Yu Zhang, Yejin Choi, James Zou, Pan Lu

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are trying to teach a super-smart robot how to solve a mystery. You don't just want it to guess; you want it to use a map, a magnifying glass, and a calculator to find the truth. This is the world of Large Language Models (LLMs), which are like giant, well-read brains that can talk and reason. Recently, scientists discovered a way to make these brains even sharper by letting them practice: they try to solve a problem, get a "good job" or "try again" signal at the very end, and learn from that result. This is called Reinforcement Learning.

However, there's a catch. When the problems get really long and complicated—like a detective story with twenty clues and five different tools (a search engine, a code writer, a fact-checker)—teaching the robot all at once gets messy. It's like trying to learn how to drive a car, fly a plane, and sail a boat simultaneously while blindfolded. The robot gets confused, makes mistakes early on, and can't figure out which specific step caused the crash. Most current systems either try to do everything in one giant brain (which struggles with long tasks) or use a team of robots that don't learn from each other (which are stuck with their original, unchangeable habits).

This paper introduces a new way to train these AI teams, called AGENTFLOW. Think of it as a dynamic, living workshop where a team of specialized robots works together in real-time. Instead of one giant brain trying to do everything, AGENTFLOW splits the work: a Planner decides the next move, an Executor does the action (like searching the web), a Verifier checks if the result makes sense, and a Generator writes the final answer. They all share a "memory board" that updates after every single step. The magic happens because the Planner learns while the team is working, not just after the fact.

The researchers developed a special training method called Flow-GRPO. Imagine a game of "Hot Potato" where the team passes a single "Success" or "Failure" token back to every player at every turn. If the team solves the mystery at the end, every single step they took gets a "Good Job!" signal. If they fail, every step gets a "Try Again." This helps the Planner understand that even the small decisions made early on matter for the final result. By training this way, the system learns to adapt instantly, fix its own mistakes, and pick the right tool for the job.

The results are impressive. The team tested this system on ten different types of hard puzzles, ranging from searching for obscure facts to solving complex math problems and scientific questions. Even though they used a relatively small "brain" (a 7-billion parameter model), AGENTFLOW beat much larger, famous models like GPT-4o (which has about 200 billion parameters) and other specialized AI systems. For example, on search-heavy tasks, it improved accuracy by nearly 15%, and on math problems, it jumped by over 14%. The study shows that by letting the AI team learn together in the flow of the conversation, rather than in isolation, they become much better at planning, using tools, and solving problems that require many steps. It's not just about having a bigger brain; it's about teaching the team how to work together effectively.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →