III · Tool Use & EnvironmentExperimental·

Tool Transition Fusion

also known as Tool Pair Fusion, Composite Tool Synthesis, Telemetry-Driven Tool Composition

Mine tool-call telemetry for high-probability X-then-Y transitions and fuse those pairs into a single composite tool, shrinking the planner's step count.

Context

An agent has been running long enough to accumulate substantial tool-call telemetry: which tool was called, then which tool followed, and how often. Each tool call is a model-decoding decision that can fail or cost tokens; the planner is also paying per-step latency.

Problem

Many tool sequences are nearly deterministic. After a search, the agent almost always fetches one of the top results; after a database lookup, it almost always formats and writes a row. These transitions are paid for over and over: each step is a model call, each decision an opportunity for the planner to mis-pick. The agent's intermediate decoding errors and per-step latency dominate the trajectory cost even though the team could see, from the telemetry alone, that the transition was effectively fixed.

Forces

  • Frequent X-then-Y pairs are visible from logs but require periodic mining to detect.
  • Fusing into a composite tool removes the per-step decoding decision and one step of latency.
  • Over-fusion hides flexibility — sometimes the agent does need to deviate from the common path.
  • Composite tool surface must stay legible to the planner and to humans reviewing traces.

Example

A code-review agent's telemetry shows that after `read_file(path)` it calls `parse_python(content)` on 94% of trajectories. The team adds a composite `read_and_parse(path)` tool; the planner now makes one call where it used to make two. End-to-end latency drops noticeably and a class of bug where the model occasionally called `parse_json` instead of `parse_python` disappears.

Diagram

Solution

Therefore:

Sweep tool-call telemetry for transitions P(Y|X) above a threshold (e.g. 0.8). Wrap qualifying X-then-Y pairs in a composite tool whose signature is X's input and Y's output. Add the composite to the catalog; leave X and Y available for edge cases. Re-run the sweep periodically as task mix shifts. Document why each composite exists so a later reviewer understands the fusion was telemetry-driven, not author intuition.

What this pattern forbids. Tools must not be fused merely on author intuition; fusion is gated on observed transition probability above a documented threshold from real telemetry.

And the patterns that stand alongside it, or against it —

  • complementsAgent-Computer InterfaceDesign the tool surface for an LLM agent specifically, with affordances different from human-facing CLIs.
  • complementsAgent SkillsPackage author-time procedures (markdown + optional resources) the agent loads on demand for specific task types.
  • alternative-toCompound Error DegradationAnti-pattern: deploy a long-horizon agent without modelling that per-step accuracy multiplies across the trajectory.
  • complementsTool Use★★Let the LLM produce typed calls against an external toolkit instead of producing free-form text the surrounding system has to parse.
  • composes-withHierarchical Tool SelectionOrganise tools into a tree of categories so the agent first picks a branch and then a specific tool within it.

Neighbourhood

Click any neighbour to follow the language. Scroll to zoom, drag to pan.

Used in recipes

References

Provenance