Can Agents Generalize to the Open World? Unveiling the Fragility of Static Training in Tool Use
Abstract
While Large Language Model (LLM) agents demonstrate proficiency in static benchmarks, their deployment in real-world scenarios is hindered by the dynamic nature of user queries, tool sets, and interaction dynamics.To address this generalization gap, we formalize OpenAgent (Tool-Use Agent in Open-World), a problem setting characterized by distributional shifts across query, action, observation, and domain dimensions.To systematically diagnose its impact, we construct a controlled sandbox environment where we define fine-grained environmental shifts across a four-tier hierarchy, Perception, Interaction, Reasoning, and Internalization, and conduct a comprehensive series of experiments. Our analysis yields a series of key insights, demonstrating that agents trained via both Supervised Fine-Tuning (SFT) and Reinforcement Learning suffer from varying degrees of performance degradation when confronting open environmental shifts.Building on these insights, we propose Perturbation-Augmented Fine-Tuning, a disturbance-based intervention strategy for SFT that lays the foundation for enhancing agent robustness and utility in realistic environments. Our code will be released at: https://github.com/LAMDA-NeSy/OpenAgent.
Lay Summary
Large language model agents can now use external tools, such as search engines, calculators, APIs, and databases, to solve complex tasks. However, most existing evaluations test these agents in fixed settings, where the tools, user requests, and feedback formats stay the same. In real-world use, this is rarely true: tools may change, APIs may fail, user requests may be unclear, and the agent may need to decide when a task cannot be completed safely. In this paper, we study whether current agent training methods can handle these changing conditions. We build a controlled testing environment that lets us carefully change user queries, tools, feedback, and task domains, and then measure how agents trained with supervised fine-tuning or reinforcement learning respond. We find that both methods can fail in open-world settings, but often for different reasons: supervised fine-tuning tends to memorize fixed tool-use patterns, while reinforcement learning adapts better but may still try to force an answer when it should refuse. We also propose a training strategy that exposes agents to controlled disruptions during training, helping them become more robust, adaptive, and safer in realistic deployments.