THE INDEPENDENT RECORD · AGENTIC AI AS A SERVICE AboutStandardsContact
GAASAGENTIC AI · AS A SERVICE
INDEPENDENT · SINCE 2026
UPDATED DAILY
NO HYPE · NO PAY-TO-PLAY
PER-TASK PRICING NOW STANDARD ● NEW BENCHMARK: 71% TASK COMPLETION ● ENTERPRISE PILOTS UP 4X ● RUNTIME FUNDING ACCELERATES ● "AGENTS ARE THE NEW SEATS" ● MARGINS UNDER PRESSURE ● THE INDEPENDENT RECORD ON GAAS
Economics

Gross Margin Math for an Agent That Calls Three Other Vendors' Models

Most GaaS founders quote one gross margin number. The honest answer is a distribution. When your agent orchestrates a planner from one vendor, a retrieval embedder from a second, and a final generator from a third, your cost per task swings with three independent price sheets, three latency profiles, and three retry behaviors. This piece walks the actual arithmetic, fixed price minus variable, fan-out, retries, and the markup you're really paying, and shows why the margin you put in the deck is usually the best case, not the median. Read it before you commit to per-task pricing.

By L. Karlsson · May 10, 2026 · 12 min read

Table of Contents

The setup nobody puts in the pitch deck

Picture a contract-review agent. A customer uploads a 40-page master services agreement and asks, "flag anything unusual versus our standard terms." That single request, one billable task, does not map to one model call. It maps to a small supply chain.

The agent reasons about what to do (a frontier model from Vendor A). It chunks and embeds the document to retrieve the customer's playbook (an embeddings model from Vendor B). It drafts the redline and explanation (a cheaper, fast model from Vendor C, because generation volume is high and you don't need the smartest model for every paragraph). Three vendors, three invoices, one price you charge the customer.

Founders love to say "our gross margin is 70%." But 70% on what? On the median task? The 90th-percentile task? The task where the planner decided to re-read the document twice? In a multi-vendor agent, your cost of goods sold isn't a constant you multiply against revenue. It's an emergent property of how the orchestration behaves on real inputs. That's the whole game, and it's why this article exists as a node in the broader GaaS economics cluster, the unit-cost mechanics here feed directly into how you price, forecast, and value the business.

Let me walk an actual task end to end, then build the margin model around it.

Walking the cost of a single task

I'll use representative 2026 list prices. Plug in your own; the structure is what matters. Assume the agent processes the 40-page contract, roughly 30,000 input tokens of document plus prompts.

Step 1: the planner call

The planner is a strong reasoning model. It reads a summary of the task, decides the workflow, and may emit a chain of thought before producing a plan. Say it consumes 8,000 input tokens and produces 2,000 output tokens, including reasoning tokens you pay for but never show the user.

At a representative frontier rate of $3 per million input and $15 per million output:

Cheap in isolation. Watch what happens when it isn't called once.

Step 2: retrieval and embeddings

To compare against the customer's standard terms, you embed the contract's clauses and run similarity search against a stored playbook. Embeddings are dirt cheap per token, on the order of $0.02-$0.13 per million tokens depending on the vendor and model, so embedding 30,000 tokens costs a fraction of a cent. Call it $0.002. Vector search itself is mostly your own infra cost, not a vendor pass-through, so it lands in a different bucket (one worth tracking separately, as the cluster piece on shared infrastructure cost attribution argues).

This step is almost free at the token level, which is exactly why people ignore it. It still adds latency and a third dependency to your reliability surface.

Step 3: the generation call

Now the agent writes the redline. This is the token-heavy step. It re-ingests relevant clauses, the retrieved playbook passages, and instructions, say 20,000 input tokens, and produces a detailed 6,000-token explanation. You deliberately route this to a cheaper, fast model at roughly $0.50 input / $1.50 output per million:

Add it up. A clean, single-pass task costs about $0.075 in vendor model fees. If you charge $2.00 per contract reviewed, that's a 96% gross margin on the happy path. Spectacular. File it under "numbers that won't survive contact with production."

Why your COGS is a distribution, not a number

The $0.075 above assumes every step fires exactly once and the document is average-sized. Neither holds. Real cost per task is shaped by four sources of variance, and they compound:

  1. Input size variance. A 5-page NDA and a 200-page credit agreement are the same "task" to your pricing page but a 40× difference in token cost. If your customers skew long, your median quietly drifts up.
  2. Fan-out. The planner may decide the contract needs clause-by-clause analysis, spawning a generation call per section. One task becomes thirty calls. This is the core mechanic behind fan-out economics when agents spawn sub-agents, and it can turn a $0.075 task into a $2.00 task that wipes out the margin entirely.
  3. Retries. A malformed tool call, a timeout, a JSON parse failure, or a self-critique loop re-runs steps. More on this below, it's the single most underestimated line item.
  4. Vendor price drift. Three vendors means three independent pricing roadmaps. One raising output prices, or you migrating to a newer (pricier) model for quality, shifts your COGS without any change in your product.

So the right artifact isn't "gross margin = X%." It's a histogram of cost per task across a real sample, with a p50, p90, and p99. Price against the p90, not the p50, or your worst customers, the ones with the longest documents and the messiest inputs, will be the ones you lose money serving. The mechanics of why averages mislead here are covered well in a16z's writing on the economics of AI agents and why per-call costs deceive.

The markup you're actually paying three vendors

Here's the part founders rationalize away. When you call three vendors' hosted APIs, you are paying each one's gross margin on top of raw GPU cost. Frontier labs run inference at healthy markups; independent analyses have pegged hosted-API gross margins in the broad 50-75% range depending on model and load, though the labs don't publish exact figures. You're stacking three of those markups into one task.

This is the case the "we'll just orchestrate other people's models" crowd has to answer. Your COGS is structurally someone else's revenue, three times over. That's fine, plenty of great businesses resell compute, but it caps your ceiling and makes you fragile to their pricing decisions. It's the same dynamic the cluster piece on the margin trap of passing through model costs dissects: pass-through pricing feels safe but transfers all the upside to your vendors.

Two structural responses, neither free:

Cloud taught this lesson a decade ago: when compute is your COGS, you obsess over rate, utilization, and commitment structure. Andreessen Horowitz's older but still-cited analysis of cloud repatriation and the cost of compute at scale reads almost word-for-word as a warning to GaaS founders.

Retries: the line item that eats the margin

Run the single-task math again, but assume realistic failure behavior. Suppose:

Now the expected cost of a task isn't $0.075. The generation step's expected cost is no longer $0.019, it's $0.019 × (1 + 0.15 retry + 0.30 critique) = roughly $0.028. Small in absolute terms here, but on agents where the heavy model does the generating, a 45% inflation of the dominant cost line is the difference between 70% and 55% gross margin.

The deeper trap: retries correlate with the hard inputs you can least afford to lose money on. The 200-page agreement is both the most expensive task and the most likely to trigger retries and critique loops. Your cost variance and your input variance point the same direction. This is why the hidden cost of retries, when one task becomes fifty model calls deserves its own treatment; here it's enough to say: model retries explicitly, with a probability and a cap, or your margin model is fiction.

A worked margin model you can copy

Build a per-task cost as the sum of expected vendor costs across steps, then derive margin against your price. The skeleton:

cost_per_task =
 P(planner_called) × planner_cost × E[planner_runs]
 + P(retrieval_called) × retrieval_cost
 + P(generation_called) × generation_cost × E[generation_runs]
 + fixed_infra_cost_per_task # vector DB, orchestration, logging

gross_margin = (price - cost_per_task) / price

Then compute it three times, at p50, p90, and p99 input size and retry behavior, using a real sample of tasks, not assumptions. A representative output might look like:

Scenario Vendor cost/task Price Gross margin
p50 (clean, average doc) $0.09 $2.00 95.5%
p90 (long doc, one retry) $0.41 $2.00 79.5%
p99 (huge doc, fan-out + critique) $1.85 $2.00 7.5%

That p99 row is the whole point. A handful of tasks can run at near-zero or negative margin, and if those tasks cluster in one or two heavy customers, you have a cost-attribution problem, you're funding a money-losing account with everyone else's margin. The fix isn't always raising prices. Sometimes it's a fan-out cap, a per-task token budget, or routing the heaviest documents to a batch tier. Several startups are quietly doing exactly this; it's the subject of the cluster piece on capping autonomy to protect margin.

Levers that actually move the number

Once you can see the distribution, the optimization order is fairly consistent across multi-vendor agents:

The uncomfortable truth: in a three-vendor agent, you don't fully control your COGS. You control routing, caching, retries, and caps. Those four levers are your real margin surface. Everything else is somebody else's pricing committee.

Insights Most People Overlook

References

#agent gross margin#gaas unit economics

More in Economics