LangChain adds cross-agent tracking to help control coding costs

LangChain is expanding LangSmith to give teams a shared view of spending and activity across multiple coding agents. The company says the tools can help organizations identify expensive sessions, improve agent workflows and govern costs as usage grows.
- LangSmith brings sessions from multiple coding agents into one trace model.
- Teams can compare cost, tokens, tool calls and subagent activity across tools.
- Engine identifies specific workflow improvements, such as redundant tool calls.
- LLM Gateway provides cost caps at user, team and organization levels.
Coding agent spending is fragmented
LangChain says teams are increasingly using several coding tools for the same development work, including Claude Code, Cursor, GitHub Copilot Chat, Pi and OpenCode. A single feature may involve multiple agents, with each tool recording activity in a different format.
That makes it difficult to answer basic questions about engineering spend, such as which sessions were expensive or whether a particular workflow delivered enough value. LangChain describes this as a fragmentation problem rather than a lack of available data. Copilot, OpenCode, Pi and Cursor each expose cost or activity information, but their records cannot easily be compared side by side.
The company says this becomes a serious issue when teams scale beyond one coding agent. It cites examples including a mid-sized startup whose coding agent bill grew 6x in two quarters, as well as claims involving Uber, Microsoft and Salesforce. These claims are presented by LangChain and are not independently detailed in the source.
LangSmith creates a common view
LangSmith now traces sessions from Claude Code, Codex, Cursor, GitHub Copilot Chat, Pi and OpenCode into a common trace model, according to LangChain. The company says the sessions use the same metadata and query syntax regardless of which tool ran them.
The normalized records can include user and assistant turns, model calls with token usage and cost, tool calls and shell commands, MCP activity, subagent invocations, errors and timing. Teams can filter sessions by thread_id, model, provider or tool name.
LangChain says this lets teams compare tool calls, token usage, cost per session and subagent activity across agents. Once teams can see the data together, they can investigate which workflows are costly and where agents are failing without switching between separate dashboards.
Optimization and spending controls
LangChain also positions Engine and LLM Gateway as parts of a broader cost-management cycle. Engine analyzes agent sessions and surfaces potential skill improvements. One example in the source is an agent repeatedly retrieving the same context, which Engine can flag with a recommendation to consolidate the calls.
LLM Gateway provides cost caps and governance at the user, team and organization levels. LangChain says it will soon be able to route suitable workloads to open source models. The company also recommends using cheaper models for scoped subtasks when frontier-level intelligence is unnecessary.
LangChain says the product is aimed at teams running more than one coding agent. Organizations using a single tool with a sufficient native dashboard may not need another layer, but the company argues that cross-agent observability becomes important as soon as a second tool enters the workflow. Setup instructions are available for Claude Code, Codex, OpenCode, Cursor, GitHub Copilot, Pi and dcode.
LangChain: Your coding agent bill doubled. Here’s how to fix it.


