Databricks launches Unity Gateway Insights to uncover AI token waste

Databricks has introduced Unity Gateway Insights, a tool that uses Genie to analyze millions of agent traces alongside business data and ontology. It is designed to show where coding-agent tokens are being wasted, including recurring MCP errors, expensive models used for simple tasks and workflows that could become shared skills.
- Unity Gateway Insights analyzes agent traces with Genie and business context.
- Reports identify MCP errors, costly model choices and repeated workflows.
- Databricks says seven MCP bugs led to an estimated $1.2M in annual costs.
- Traces are stored in a governed Delta table in Unity Catalog.
- Users can generate reports for the last day, 7 days or 30 days.
Reports connect token use to engineering work
Teams that already route traffic through Unity Gateway can open AI Gateway > Observability > Insights and generate a report covering the last day, 7 days or 30 days. The report examines the token economics of a coding-agent rollout and groups sessions by workstream.
Insights compares each workstream's share of sessions with its share of tokens. Databricks gives the example of a workstream representing 10% of sessions but 35% of tokens as a priority for investigation. The report ranks potential waste by cost, links findings to example sessions and provides prompts that can be copied to turn repeated workflows into shared skills.
Users can add up to 10 questions to a report, such as whether the newest model is worthwhile for their team's work. They can also continue the investigation with Genie. Databricks says a question about which MCP server wasted the most tokens, and who owns it, could produce a bug report ready to send.
Three sources of waste in agent traces
Databricks says its analysis identified several ways to reduce costs while deploying coding agents. Offline replays showed no performance gain from upgrading from Opus 4.8 to Opus 5, so the company stayed with the cheaper 4.8. Traces also showed that simple prompts were being sent to expensive models, leading Databricks to adopt Smart Routing.
MCP errors are another target. When a tool call fails, an agent may retry or work around the problem, creating additional token costs even when the session eventually succeeds. Databricks says the estimated $1.2M in annual costs it identified came from seven small bugs in its MCP servers. Those bugs accounted for $499K in wasted tokens and 12,000 hours of engineers waiting on agents, while fixing all seven took about an hour, according to the company.
Insights also identifies repeated workflows. A workflow qualifies when it recurs in at least three sessions or across two engineers. A shared skill can then give agents the required steps in advance instead of making them rediscover those steps during every session.
Built into Databricks' governed data platform
Databricks positions Unity Gateway Insights as an analysis layer that requires a complete record of agent sessions, including inputs and outputs, tool calls, subagents, intermediate steps, latency and token cost. The company says a standalone gateway records only requests passing through it, while Insights relies on automatically captured traces from agents including Claude Code, Codex and GitHub Copilot when launched with the ug CLI.
Those traces land in a unified trace table, described by Databricks as a governed Delta table in Unity Catalog that the customer owns. Genie writes SQL and uses Genie Ontology to interpret project names and business-specific context. Databricks SQL is used to query the trace history, including millions of traces.
Access is restricted by default because traces can contain prompts, code and tool output. Databricks says only the table owner can query the data until administrators grant access using Unity Catalog grants and row filters. For teams already using Unity Gateway, the company directs them to set up the unified trace table, launch coding agents with the ug CLI, then generate a report from AI Gateway, Observability and Insights.
Databricks: Introducing Unity Gateway Insights


