ToolAnchor: Anchoring Counterfactual Context to Boost Agentic Tool-use Capability
For developers of LLM agents, this work provides a method to dynamically adapt to new tools without retraining, bridging static post-training and dynamic adaptation.
ToolAnchor addresses the toolset expansion problem in tool-augmented LLM agents by injecting counterfactual anchor contexts to overcome behavioral inertia, achieving competitive performance on GAIA, BrowseComp, and VDR-Bench tasks.
Tool-augmented large language model agents excel at long-horizon tasks, yet they are typically post-trained on fixed toolsets. When tasks demand new tools, these agents struggle to incorporate them effectively, and retraining from scratch is often impractical. We identify the core obstacle in such toolset expansion problem as behavioral inertia: the tendency of agents to fall back on familiar tools and established reasoning patterns despite having access to new ones. We demonstrate that injecting counterfactual anchor contexts at critical decision points can break this inertia, recovering failed trajectories by eliciting suppressed agent capabilities. To scale this insight, we propose ToolAnchor, a framework that uses teacher models to hypothesize these counterfactual contexts, verifies them via student rollouts, and internalizes the successful interventions through agentic post-training. Extensive evaluations across general AI assistant (GAIA), textual search (BrowseComp), and visual search (VDR-Bench) tasks demonstrate that ToolAnchor consistently exhibits competitive performance under expanded toolsets. Our work bridges the gap between static post-training and dynamic adaptation, charting a new path for scalable agentic reinforcement learning.