Back to blog
Architecture

Tool Routing Is Where Agent Workflows Become Software

Every tool call is a product decision: spend time, spend money, change state, or ask a human.

Solutions ArchitectureFebruary 22, 20269 min read

The demo version of an AI agent has one tool and a happy path. The production version has five tools, stale credentials, rate limits, missing fields, user permissions, approval rules, and a customer waiting on the other side. At that point, the quality of the system depends less on whether the model can call a tool and more on whether the workflow knows which tool deserves to be called.

Tool routing is the policy layer between intent and action. It decides whether the agent should answer from memory, retrieve knowledge, call a CRM, draft a document, update a record, start a workflow, or stop and ask for approval. If that layer is vague, the agent becomes either timid and useless or confident and expensive.

Intent

Risk

Budget

Tool

Route low-risk questions to retrieval. Route account changes to tools. Route regulated or high-cost actions to approval.
Good routing considers intent, risk, budget, and tool capability before a workflow acts.

Route high-risk actions with rules

Some decisions should not be left to model confidence alone. Sending a support reply is different from issuing a refund. Summarizing a contract is different from changing a clause. Reading from a CRM is different from writing to it. For high-impact actions, deterministic rules are usually healthier: require explicit fields, check permissions, enforce thresholds, and route to approval when the action crosses a risk boundary.

Route low-risk work with context

Low-risk tasks can be more flexible. A knowledge search, a summarization step, or a draft response can route based on the user intent, confidence score, and freshness of available context. The point is not to use the fanciest model for every step. The point is to allocate effort where it changes the outcome.

  • Use retrieval when the answer depends on source material or policy.
  • Use a tool when the workflow needs live state or must perform an action.
  • Use a cheaper path when the task is routine and the risk is low.
  • Use human review when the action is irreversible, regulated, or financially material.

Cost and latency are routing inputs

A workflow that calls three agents and two external tools for every simple question may look intelligent in a trace and feel slow in the product. Routing should include budgets: how long can this task take, how much can this run cost, and what is the user expecting at this moment? A product assistant and a back-office analysis job do not share the same latency budget.

Cost is not only model spend. It includes tool rate limits, operational load, reviewer time, and the complexity of debugging a long path. Good routing keeps the common path simple and reserves expensive paths for cases that need them.

Fallback reasons are product feedback

When a workflow falls back, log why. Missing input is different from low confidence. A tool timeout is different from a permissions failure. A policy block is different from a model refusal. If the fallback reason is visible, the team can improve routing. If it is hidden, the team will keep adding branches and hope the graph becomes smarter.

Trumpets workflow tools are designed around this idea: agents, knowledge sources, custom skills, and API steps belong in an orchestrated graph with clear routing rules. The goal is not to prove that every step can be autonomous. The goal is to make each action legible, bounded, and worth the cost.

All posts