MagicAgent: Towards Generalized Agent Planning

Xuhui Ren, Shaokang Dong, Chen Yang, Qing Gao, Yunbin Zhao, Yongsheng Liu, Xinwei Geng, Xiang Li, Demei Yan, Yanqing Li, Chenhao Huang, Dingwei Zhu, Junjie Ye, Boxuan Yue, Yingnan Fu, Mengzhe Lv, Zezeng Feng, Boshen Zhou, Ke Xue, Xuanjing Huang, Yu-Gang Jiang, Tao Gui, Qi Fan Zhang, Yunke Zhang

Abstract

The evolution of Large Language Models (LLMs) from passive text processors to autonomous agents has established planning as a core component of modern intelligence. However, achieving generalized planning remains elusive, not only by the scarcity of high-quality interaction data but also by inherent conflicts across heterogeneous planning tasks. These challenges result in models that excel at isolated tasks yet struggle to generalize, while existing multi-task training attempts suffer from gradient interference. In this paper, we present MagicAgent, a series of foundation models specifically designed for generalized agent planning. We introduce a lightweight and scalable synthetic data framework that generates high-quality trajectories across diverse planning tasks, including hierarchical task decomposition, tool-augmented planning, multi-constraint scheduling, procedural logic orchestration, and long-horizon tool execution. To mitigate training conflicts, we propose a two-stage training paradigm comprising supervised fine-tuning followed by multi-objective reinforcement learning over both static datasets and dynamic environments. Empirical results show that MagicAgent-32B and MagicAgent-30B-A3B achieve superior performance across diverse open-source benchmarks (e.g., $75.1\%$ on Worfbench and $86.9\%$ on BFCL-v3), as well as strong results on our in-house MagicEval benchmarks, substantially outperforming existing sub-100B models and surpassing leading ultra-scale models, including GPT-5.2, Kimi-K2 and GLM-4.7.

Introduction

As Large Language Models (LLMs) transition into autonomous agents, the primary bottleneck has shifted from linguistic fluency to planning capability—the "brain" of the agent. Despite significant progress, current agentic models face two critical hurdles. First, Data Scarcity: high-quality trajectories of agents interacting with complex environments are difficult to obtain, as human annotation is expensive and sandbox simulations are often slow or limited in scope. Second, the "Seesaw Effect": training on diverse planning tasks (e.g., tool use vs. calendar scheduling) often leads to gradient interference, where improvements in one domain cause degradation in another.

MagicAgent addresses these challenges by establishing a unified planning foundation that generalizes across diverse tasks without succumbing to training conflicts, outperforming much larger "ultra-scale" models like GPT-5.2 and DeepSeek-V3 on complex planning and tool-use benchmarks.

Methodology

The development of MagicAgent relies on a three-pronged strategy designed for scalability and robustness.

Scalable Synthetic Data Framework

Rather than relying solely on live environments, we developed a "blueprint" approach to data generation. We curated over 5,000 functional APIs and constructed a Tool Dependency Graph. Using a set of logical operators—including Concatenate, Mask, and Transform—we automatically synthesize complex, multi-turn trajectories from simple "atomic" plans. This framework allows for the creation of diverse training data that mirrors real-world complexity without the overhead of physical sandboxes.

The MagicAgent synthetic data generation pipeline, moving from tool curation to complex trajectory composition.

Two-Stage Training Paradigm

  1. Supervised Fine-Tuning (SFT): We establish a strong baseline by training on a balanced, diverse dataset of synthesized trajectories.
  2. Reinforcement Learning (RL): We employ a unified multi-task reward function. For offline data, we utilize GRPO (Group Relative Policy Optimization). For online environments, we introduce $\chi$PO (Exploration-Exploitation Policy Optimization). $\chi$PO utilizes token-level entropy and an "Information Bottleneck" to ensure the model explores diverse reasoning paths while remaining decisive during final actions.

Load-Balanced Mixture-of-Experts (MoE)

For our MoE variant (MagicAgent-30B-A3B), we implemented a global load-balancing strategy. Unlike standard methods that balance tokens within small batches, our approach balances across the entire task distribution. This allows experts to specialize in specific planning domains (e.g., "Trip Planning" vs. "Calendar Management") without representation collapse.

Experimental Results

MagicAgent-32B (dense) and MagicAgent-30B-A3B (MoE) were evaluated against a comprehensive suite of benchmarks, including NaturalPlan (scheduling), Worfbench (logic), $\tau^2$-Bench (long-horizon execution), BFCL-v3 (function calling), and ACEBench (advanced tool use).

Performance comparison of MagicAgent models against leading foundation models across five major planning benchmarks.

As shown in the results, MagicAgent-32B achieved state-of-the-art performance for sub-100B models:

  • Worfbench: Reached 75.1% accuracy, significantly outperforming GPT-5.2 (49.6%) and Kimi-K2 (58.1%).
  • BFCL-v3: Achieved 86.9% average accuracy, surpassing leading closed-source models.
  • Efficiency: The MoE variant (30B-A3B) delivered a 28.9% to 59.6% reduction in latency (TTFT) compared to the dense 32B model while maintaining nearly identical performance levels.

Key Insights and Discussion

Our research yields several critical insights for the future of agentic LLMs. First, we demonstrate that a rigorous logical framework for composing "atomic" tasks into workflows—the "blueprint" approach—is sufficient to produce high-quality data that generalizes to real-world applications. Second, our Entropy Disentanglement strategy in $\chi$PO reveals that "thinking" and "acting" require different uncertainty profiles; allowing higher exploration during reasoning while enforcing decisiveness during action significantly stabilizes performance in sparse-reward environments.

While MagicAgent excels at planning, future work will focus on extending these capabilities to ultra-long horizons (multi-day reasoning) and integrating code-augmented planning, where the agent can generate and execute scripts to solve complex constraints dynamically.

Summary updated

BibTeX
@misc{ren2026magicagent,
  author = {Xuhui Ren and Shaokang Dong and Chen Yang and Qing Gao and Yunbin Zhao and Yongsheng Liu and Xinwei Geng and Xiang Li and Demei Yan and Yanqing Li and Chenhao Huang and Dingwei Zhu and Junjie Ye and Boxuan Yue and Yingnan Fu and Mengzhe Lv and Zezeng Feng and Boshen Zhou and Ke Xue and Xuanjing Huang and Yu-Gang Jiang and Tao Gui and Qi Fan Zhang and Yunke Zhang},
  title = {{MagicAgent: Towards Generalized Agent Planning}},
  year = {2026},
  eprint = {2602.19000},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.19000},
}
Figure