Trimio Field Notes

Your AI Agents Need Two Cost Scorecards. Most Teams Have Zero.

May 22, 2026 6 min read finopsagentscost-attributionobservability

A new Show HN project called Metrx hit the front page this week. The pitch: connect your AI agents to Stripe and HubSpot, and get a per-agent P&L scorecard — cost per agent vs. revenue it's attributed to, with A/B model experiments and board-ready ROI reports.

It's a real problem with a real solution. But Metrx sits at one layer of a two-layer accountability problem. The teams we talk to who are struggling with AI cost governance are missing both layers. Understanding the distinction matters for how you build your observability stack.

The two layers

Essential
Layer 1: inference-layer cost attribution — what did each token cost, which model, which call, which virtual key. Layer 2: application-layer P&L — what revenue did the agent generate, what did it cost to run, is it net-positive. You need both. They don't substitute for each other.

Layer 1 — inference-layer cost attribution is about raw token economics. It answers: what did I spend on inference in the last 24 hours, broken down by model, by traffic class, by virtual key (team / feature / customer). Which calls were routed to Opus vs. Qwen3 vs. Gemini Flash? Where did compression reduce token spend? Where did caching capture savings? This layer lives between your application and the model provider. It's where the token-level data is generated.

Layer 2 — application-layer P&L attribution is about business outcomes. It answers: which AI agent generated what revenue, at what operational cost? The sales SDR agent that sent 400 emails — did it convert enough pipeline to justify its inference bill? The support agent that handled 2,000 tickets — what's the net cost vs. human-hours displaced? This layer lives above your application, connecting LLM spend to business metric data (Stripe, HubSpot, your ticketing system).

Both layers are necessary. Neither substitutes for the other.

Why Layer 1 without Layer 2 fails CFOs

Essential
Inference-layer attribution tells you what you spent. Without application-layer P&L, you can't answer the question that matters: did it work? CFOs can see the bill. They need to see the ROI.

Inference-layer attribution is what Trimio provides. Every call through the proxy is tagged with cost, model, traffic class, virtual key, quality score. You can see, with token-level precision, that your document processing pipeline spent $847 in the last week, with 68% of that on Claude Opus and 32% on Qwen3 serverless, at an effective compression-adjusted cost of $0.0043 per document.

What inference-layer attribution can't tell you: was $847 a good spend? Did those documents generate outcomes that justify the cost?

That's the business outcome question. Without Layer 2 data — Stripe charges attributed to the pipeline, HubSpot deals influenced by the document summaries, ticket deflection metrics from the support agent — the CFO has a precise cost number with no ROI context. The conversation stalls at "we spent X" rather than advancing to "we spent X and earned Y."

Why Layer 2 without Layer 1 fails engineers

Essential
Application-layer P&L tells you the agent is net-positive. Without inference-layer attribution, you can't see where the cost is — which means you can't optimize it, and you can't catch drift before it erodes the margin.

Metrx and tools like it give you the app-level P&L view. The SDR agent cost $240 to run this month. It influenced $18,000 in pipeline. Net-positive. Ship it.

What app-level P&L doesn't give you: where in the SDR agent is that $240 coming from? Is it the prospect research calls — the ones using Opus for company analysis — or the email drafting calls that could safely run on a cheaper model? When your inference cost doubles next month because a new feature added a research step that wasn't there before, does the P&L dashboard catch it? Or does the agent just silently become less profitable before anyone notices?

The inference layer is where cost optimization actually happens. Routing rules, compression, caching, traffic class classification — none of these are visible at the app-level P&L layer. They're infrastructure decisions that only make sense with token-level visibility.

The full-stack view: what it looks like with both layers

An AI-native team that has both layers instrumented can answer a question like this:

The SDR agent generated $18K in pipeline at $240 in inference cost this month. The per-call breakdown shows 60% of the cost is the prospect research step, which uses Claude Opus for company analysis. Routing the research step to GPT-5.4 (quality 94, $2.50/$15.00, value 6.3) instead of Opus (quality 95, $5/$25, value 3.8) would cut that step's cost by ~38% with negligible quality degradation. Projected monthly savings: $87. At $18K influenced pipeline, the optimization changes the margin from 75× to 112× — same agent, lower cost base, same outcomes.

That's the conversation that closes AI budget arguments. Not "we spent $240" and not "the agent influenced $18K in pipeline" in isolation — both numbers together, with the inference-layer detail that shows you where to optimize and the app-level attribution that shows you the business case for doing it.

Layer 1: Inference
$240/mo
Token cost, model breakdown, optimization levers
+
Layer 2: App P&L
$18K influenced
Revenue attribution, ROI, CFO-grade reporting

The accountability gap in most teams today

Most teams we see at this stage have neither layer fully instrumented. The inference cost is visible only at the provider-billing level — a single Anthropic invoice that doesn't break down by feature, team, or agent. The business outcome attribution is done informally ("the SDR agent seems to be working") without connecting it to actual revenue data.

The path to full-stack accountability is sequential:

  1. First: get Layer 1 in place. Route all inference through a proxy that records cost, model, and virtual key per call. This is a one-URL change if you're using OpenAI-compatible clients. No code rewrite required. The data starts flowing immediately.
  2. Then: build Layer 2 attribution. Connect inference costs (by virtual key / agent identity) to your business metric data. This is the harder step — it requires defining what "revenue attributed to this agent" means for each agent in your stack. Metrx provides scaffolding for this; so does a well-structured HubSpot integration.

You can do Layer 2 before Layer 1. Some teams start with the business case because that's what the CFO is asking for. But without Layer 1, the "cost" side of your P&L is a guess — the real per-token cost with routing and compression applied is never visible at the app-level layer.

The inference layer is where the margin lives

Bottom line
App-level P&L tells you the agent works. Inference-layer attribution tells you how to make it profitable. Both layers, together, are what CFO-grade AI cost governance looks like.

Metrx solves the board-level reporting problem: "show me which agents are net-positive." That's a real problem worth solving, and the Stripe + HubSpot attribution is a credible approach to it.

Trimio solves the engineering-level optimization problem: "show me where the cost is coming from and give me the controls to reduce it without changing application behavior." That's a different problem — it operates at the token level, under the application layer, in the routing and compression infrastructure.

The $2.52 trillion in worldwide AI spending in 2026 is generating both types of accountability pressure simultaneously. CFOs want the P&L view. Engineers need the token-level view. The teams that build both layers first will have the competitive advantage: they can invest AI budget in the agents that are proven net-positive, and they can optimize the inference cost of those agents as the model landscape evolves.

The teams that build neither will have a large Anthropic invoice and no clear answer when the board asks what it returned.

Trimio is the inference-layer attribution and routing proxy — cost visibility, traffic classification, and least-cost routing in a single layer your application never has to know about. See how it works.

Trimio
Inference-layer visibility. CFO-grade reporting.
trimio sits between your agents and your model providers, recording every token, every model, every routing decision — with the attribution data your CFO needs and the optimization controls your engineers want.