arXiv:2610.34679cs.LGOct 2026

Manuscript Offprint

arXiv:2610.34679

AT-AT: Automatic Tool Optimization from Agent Traces

Maya Ravichandran, Pragya Tripathi, Dharamendra Kumar, Adith Swaminathan, Nathan Kallus

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Efforts to improve LLM-based agents typically focus on modifying the agent itself, yet success also depends on the environment in which an agent acts. Tools mediate this interaction: a tool's description shapes how an agent calls it, and its implementation determines the results and errors the agent receives afterwards. Many tools, such as APIs and MCP servers, are shared by many agents and maintained by providers who cannot change those agents. We introduce AT-AT (Automatic Tool Optimization from Agent Traces), an agentic tool optimizer that improves a shared toolset offline from historical agent executions while holding the agents fixed. A lightweight coding agent reads agent trajectories and their evaluation results, and selectively edits tool descriptions and, when permitted, implementations. On τ2\tau^{2}-bench-verified, AT-AT achieves the highest task completion rates in the Airline and Telecom domains at lower cost than strong prompt- and tool-optimizer baselines, and its Telecom gain is statistically significant under paired permutation tests. Optimizing the tools within a coding agent harness also improves held-out performance on TerminalBench-2 and TBLite. When applied to three production MCP servers at a large enterprise, AT-AT lowered cost or tool error rates on every server and increased held-out task passes on one. By turning accumulated execution traces into updates to shared tool environments, AT-AT provides a path toward continual improvement of agent systems through environment-side learning.

1 Introduction

Efforts to improve LLM-based agents typically modify the agent itself: training the underlying model, optimizing its prompts [Agrawal et al., 2026, Kassianik et al., 2026], or engineering the harness that manages its execution [Lee et al., 2026b, Zhang et al., 2026, Weng, 2026]. However, an agent's success is a property not only of the agent, but also of its interaction with the external environment. Tools mediate this interaction, as they define the actions available to the agent and the information returned in response. We study a complementary path to better agent performance: improving the tool environment from accumulated agent experience based on historical execution traces, while holding the agent fixed.

The opportunity for such optimization is large and growing. In an enterprise, an agent's tool environment may include Model Context Protocol (MCP) servers spanning many internal systems. More broadly, nearly any software API can be exposed as an agent-callable tool. Most APIs, however, were designed for human developers or conventional software rather than for the capabilities and limitations of LLM agents. Cloud services can now automatically translate existing APIs into agent-

40th Conference on Neural Information Processing Systems (NeurIPS 2026). Workshop: Continual Learning in the Era of Foundation Models and Embodied Agents.

A Agent Traces

Figure

B Automatic Tool Optimization

Figure

Figure 1: AT-AT optimizes tools from historical agent traces. (A) An agent completes a task by calling tools, implemented in its harness or the external environment, producing a trajectory. (B) In a sandbox holding evaluated traces and the current tool source, a Pi coding agent driven by an optimizer LLM selectively edits tool descriptions and implementations.

callable tools [Microsoft, 2026, Wadhwa et al., 2025], but callability does not imply usability by LLMs. An API's agent-facing description, schema, outputs, and errors remain consequential design choices that we aim to automatically optimize. These tools are typically maintained by a provider who cannot change the many agents that call them, but any change the provider makes to a tool reaches all of those agents. This is our primary setting.

A tool has two parts. Its description, comprising its name, parameter schema, and usage notes, shapes the agent's expectations before a call, while its implementation determines the results and errors the agent receives after it. Because tool results enter the agent's context, actionable errors can enable recovery and relevant outputs can support better subsequent decisions. We call this mechanism feedback shaping: improving the information returned by tools without changing the agent or its evaluation objective. For example, a τ2\tau^{2}-bench-verified Telecom tool that reports a line's data usage and plan limit leaves the agent to work out whether the line has run out of data, while an implementation that also returns the remaining data gives the agent this information directly.

Anthropic reported a 40% decrease in task completion time after redesigning the tools available to an agent [Anthropic, 2025b], suggesting that tool design materially affects agent performance. Existing automatic methods primarily optimize the information presented before a tool is invoked: DRAFT [Qu et al., 2025], Play2Prompt [Fang et al., 2025], EasyTool [Yuan et al., 2025], and ToolObserver [Hallinan et al., 2026] use exploration traces or reflection to refine tool descriptions or usage examples. Harness optimizers such as Meta-Harness [Lee et al., 2026b] can also edit tool code, but they optimize the harness of a single agent rather than a toolset shared by many agents. In this work, we aim to automatically improve both the descriptions and implementations of shared tools from evaluated agent traces.

We introduce AT-AT (Automatic Tool Optimization from Agent Traces), which converts historical agent experience into selective edits to a toolset. A lightweight coding agent searches evaluated agent traces for recurring failure modes, inspects the tool source, and edits tool descriptions and, when permitted, implementations. A coding agent can search many long traces as needed, and it can read the tool's code to decide whether a failure calls for a description or an implementation fix. AT-AT performs a single offline pass over previously collected executions, requiring no new agent rollouts.

Trace-driven optimization raises two methodological challenges. First, repeated agent executions can produce materially different outcomes even when the task, model, harness, environment, and decoding configuration are held constant. We evaluate the original and optimized toolsets with 30 trials per held-out task and use paired permutation tests to determine whether observed changes exceed stochastic variation. Second, an optimizer can overfit to a small set of trajectories or tasks, which is a particularly consequential risk for shared tools. We expose AT-AT to traces spanning multiple tasks and repeated trials, direct it toward generalizable edits, and evaluate the resulting toolsets on held-out executions.

We evaluate AT-AT in three settings. On τ2\tau^{2}-bench-verified, AT-AT achieves the highest held-out task completion rate in Airline and Telecom at a lower cost per test simulation than prior prompt and tool optimizers, and its gain of 7.25 percentage points in Telecom is statistically significant. On TerminalBench-2 and TBLite, optimizing the tools within the OpenCode harness improves held-out pass@1 and pass@3, demonstrating applicability beyond customer service tools. On three production MCP servers at Netflix, description edits learned from historical logs from production traffic increased held-out task passes on one server and reduced tool errors and cost while maintaining performance on the other two. Together, these results show that the traces used to diagnose agent failures can also be converted into improvements to the environment itself. Because AT-AT can be rerun as traces accumulate, it provides a mechanism for continual improvement, although we evaluate a single update rather than a continual learning loop.

Our contributions are as follows:

• We formulate tool optimization for fixed agents from previously collected traces, where a tool’s description guides the agent before a call and its implementation shapes the feedback the agent receives after the call (feedback shaping).

• We introduce AT-AT, a lightweight coding agent optimizer that translates evaluated historical trajectories into selective edits of tool descriptions and, when permitted, implementations, without new agent executions during optimization.

• We evaluate AT-AT on τ2\tau^{2}-bench-verified, TerminalBench-2, TBLite, and three production MCP servers, using repeated held-out trials and paired permutation tests on τ2\tau^{2}-bench-verified to separate tool improvements from run-to-run noise.