MSBA-311 · Lesson 11 of 12 · 20 min
Cost control
▶ Video coming soon A video version of this lesson is on the way.
Hamish Quarrington had looked after Quillfield's agent capacity since the first agents went live. He knew the shape of the numbers: an illustrative tenant capacity of 50,000 Copilot Studio credits a month, of which 40,000 were allocated to the agents production environment (30,000 for the Policy Service Assistant, 6,000 for the HR Leave Assistant and 4,000 for Claims Questions), 8,000 to automation and 2,000 held back. The Submission Desk would add something new: a solution that consumed Copilot Studio credits, Foundry model tokens and Azure resources at the same time, with every agent call adding to more than one bill. In the last week of October he asked Bram for an hour and came with a spreadsheet and one question: "What does one submission cost, and what stops it costing ten times that?"
This lesson answers both halves of Hamish's question. It explains where the money goes in a multi-agent system, how to estimate it before building, the design levers that reduce it, and the controls that stop it running away.
Where the money goes
A multi-agent system has more cost drivers than a single agent, and they appear on different bills.
Copilot Studio consumption. Copilot Studio usage is measured in Copilot Studio credits. Different kinds of work consume different amounts. At the rates Quillfield used for planning, taken from Microsoft's billing documentation, a generative answer consumed 2 credits, an agent action such as a tool call consumed 5 credits, and agent flow actions consumed 13 credits per 100 actions. Rates and the ways they apply change, so always plan from the current billing documentation. Important for multi-agent design: when a parent calls a connected agent, the connected agent's own answers and actions are consumed as well.
Foundry model usage. Foundry agents consume model tokens, charged per million input and output tokens at rates that depend on the model and deployment type. Larger models cost much more per token than smaller ones. Every agent turn sends instructions, conversation history, tool descriptions and retrieved content as input tokens, so input usually dominates.
Tools and hosting. Knowledge bases built on Azure AI Search have their own service costs; code interpreter sessions, hosted agent compute and other tools can add charges; and the MCP servers Quillfield runs itself have hosting costs.
Observability and evaluation. Telemetry ingested into Application Insights is billed by volume, and evaluation runs consume model tokens of their own. These are easy to forget and can be significant if content capture is left on for every request.
People. Human review takes time, and so does operating the system. A cost model that leaves out people's time will favour designs that push work onto them.
Estimating before building
Hamish's method was to estimate per business unit of work, here one submission, then multiply by expected volume. He listed every step, counted the calls each made, and attached a cost to each call.
| Step | Calls per submission (typical) | Consumption |
|---|---|---|
| Front door conversation | 6 generative answers | 12 credits |
| Start workflow tool | 1 agent action | 5 credits |
| Submission status child agent | 4 tool calls | 20 credits |
| Policy Service Assistant (connected) | 2 answers and 2 actions of its own | 14 credits |
| Intake, appetite, risk review and brief writer (Foundry) | About 230,000 input and 12,000 output tokens in total | Model charges at current rates |
| Inspection report search | About 10 queries | Search service charges |
The Copilot Studio side came to about 51 credits per submission. With about 140 submissions a month, that is roughly 7,140 credits, plus an allowance for status questions about submissions already in progress, which Hamish estimated at another 2,000 credits. The Submission Desk therefore needed an allocation of about 9,000 to 10,000 credits a month, more than the 2,000 held back. Hamish proposed taking 4,000 from the Policy Service Assistant's 30,000, which had been running at about 24,000, and asking Celestine to approve additional capacity for the rest.
The Foundry side was dominated by input tokens. The risk review agent sent the most, because it retrieved passages from inspection reports; the brief writer used the largest model. At the list prices current when Hamish built his spreadsheet, the model charges for one submission came to a little over one dollar, and search and other services to well under one dollar. Hamish was careful to label these figures as estimates from a given date, because model prices change often.
Then he put the technology cost beside the value. Account executives had estimated three to five hours of their time per submission before the Submission Desk; the pilot suggested it saved between one and a half and two hours, after allowing for the six minutes of review that lesson 8 made deliberate. On any reasonable valuation of an account executive's time, the technology cost per submission was a small fraction of the time saved. That did not make cost control unimportant; it meant cost control was about preventing waste and runaway usage, not about whether the solution was worth having.
Why multi-agent costs run away
Hamish's second question, what stops it costing ten times as much, is the more important one. Multi-agent systems have several ways to multiply cost unexpectedly.
Fan-out multiplies. A concurrent step that calls five agents costs five times as much as one, every time it runs.
Context grows. Each turn of a conversation or loop resends the history. A group chat of four agents over six rounds can send the same growing transcript dozens of times.
Loops repeat. A handoff loop or an unbounded critique cycle can run until something stops it, consuming credits and tokens all the way.
Retries add up. Retries during an outage, multiplied across every submission in flight, can double consumption for a period.
Chatty tools. The forty sequential inspection report calls from lesson 10 were slow, and each one also added its result to the agent's context, increasing the tokens sent on every later turn.
Design levers
Most cost reductions come from design decisions, not from negotiating prices. Bram and Hamish worked through the levers in order of impact.
Fewer hops. Every agent call costs at least one model turn. Removing an unnecessary agent, or replacing it with a tool or a deterministic step, often saves more than any other change. This is lesson 1's split test seen from the cost side.
Deterministic steps where possible. A flow action is far cheaper than an agent action, and a step in a Foundry workflow that calls an API directly uses no model tokens at all. The Submission Desk creates the BrokerDesk draft and sends quote requests through workflow steps, not through agents deciding to call tools.
Right-size the model for each agent. The intake agent's extraction task worked as well on a small model as on a large one in evaluation, at a fraction of the token cost. The brief writer stayed on a larger model because quality measurably dropped on smaller ones. The model router, described in lesson 5, can make this choice per request where requests vary in difficulty, provided evaluation is done with the router in place.
Trim context. Pass references instead of whole documents (lesson 7). Return lean tool results (lesson 3). Do not pass conversation history to sub-agents that do not need it (lesson 6). Each saves input tokens on every turn that follows.
Cache. Results that do not change quickly can be reused. Appetite answers for the same business type and region are stable for a day or more, and the 2026 MCP specification lets servers mark results as cacheable with a time to live. The Submission Desk's appetite step caches answers for 24 hours, which removed about a third of carrier calls in the pilot.
Avoid polling. Waiting for a carrier's A2A task by asking every minute wastes calls; push notifications cost nothing while nothing happens.
Bound every loop. Turn, time and cost limits from lesson 2 are cost controls as much as safety controls.
Guardrails and budgets
Design reduces the expected cost; guardrails cap the worst case. Quillfield used four kinds.
Per-request budgets. The Submission Desk workflow tracks tokens and calls as it runs and stops with a clear message if a single submission exceeds three times the typical consumption. This catches loops and pathological documents, such as a 400-page application, before they consume a day's budget.
Capacity allocation. In Power Platform, Hamish allocated Copilot Studio capacity per environment and set limits per agent, so that the Submission Desk cannot consume credits meant for the contact centre. When an agent approaches its limit, he is alerted before it is reached.
Azure budgets and alerts. The Foundry resources sit in a resource group with an Azure budget and alerts at 50, 80 and 100 percent of the monthly amount, sent to Hamish and to Ngozika as the Foundry owner.
Rate limits at the gateway. The API gateway in front of Quillfield's MCP servers limits calls per agent identity, which protects BrokerDesk and caps the cost of a misbehaving agent.
Costs you should not cut
Some costs exist to keep the system safe and good, and they are the first targets of a careless savings exercise. Evaluation runs consume model tokens; continuous evaluation on 50 submissions a week adds a few percent to the Foundry bill. Prompt injection detection adds a small charge per request. Human review takes an account executive's time on every submission. Fault injection tests use test capacity every release. Each of these can be cut, and each cut would save a little money and remove a protection that earlier lessons showed was needed.
Hamish's spreadsheet therefore had a separate section for assurance costs, kept apart from operating costs, with Wendell as their owner. Changes to that section need his agreement. When a later budget review asked whether the completeness evaluator could run monthly instead of weekly, the answer came from the risk side, not the cost side: a missed location in a submission could leave a client underinsured, which costs far more than the evaluator. The evaluator stayed weekly.
Forecasting and seasonality
Volume is rarely flat. Quillfield's commercial submissions peak in the weeks before the most common renewal dates, and the pilot ran in a quiet month. Hamish built his forecast from two years of BrokerDesk history rather than from the pilot alone, which showed peaks of up to twice the monthly average in the busiest weeks. Capacity allocations and Azure budgets were set for the peak, not the average, with the alert thresholds tuned so that a normal peak does not look like a runaway agent.
Growth matters too. If the Submission Desk works, other teams will want it: personal lines for high-value homes, group benefits for new plans. Each new use multiplies traffic to the shared parts, such as the BrokerDesk MCP server and the Policy Service Assistant, whose owners need warning before their consumption grows. Hamish added a simple rule to the agent contracts: any new consumer of a shared agent or server must give its owner an estimate of calls per month before connecting, so that capacity can be planned rather than discovered.
Who decides to spend more
Finally, someone must own the decision to spend more when a design change would improve quality at a higher cost, as with Ngozika's larger risk review model. At Quillfield the business owner of each solution decides, within a budget agreed with Celestine and Lorne Macpherson-Ibe, the chief financial officer, with Hamish providing the numbers and Bram the options. Writing that down early saved arguments later: proposals arrive with a cost per outcome before and after, and a measured quality difference, and the owner chooses.
Measuring cost per outcome
Total spend is a poor measure on its own: it rises when the system is used more, which is usually good. The useful measure is cost per outcome, here cost per completed submission, tracked over time and broken down by component. Hamish's dashboard shows credits per submission, tokens per submission by agent, and the share of submissions that hit a per-request budget. When the risk review agent's tokens per submission rose by 40 percent in one week, the dashboard pointed straight at a change in its retrieval settings, which had started returning twice as many passages.
Cost per outcome also supports chargeback or showback: showing each business area what its use of shared agents costs. Commercial lines owns the Submission Desk budget; when it calls the Policy Service Assistant, the consumption is attributed back to commercial lines, which keeps the contact centre's allocation honest.
Worked problem
A cost review after the pilot
After three weeks of the pilot, Hamish finds that credits per submission average 68, not the 51 estimated, and Foundry tokens per submission are 15 percent above estimate. What should he look for?
Show solution
- Break credits down by component: the connected Policy Service Assistant is using 30 credits per submission, not 14.
- Read sample traces: account executives ask the Submission Desk several policy questions per submission, each routed to the connected agent.
- Check whether history is passed to the connected agent: it is, increasing its answers' length and actions.
- For Foundry, compare tokens by agent: the intake agent is receiving whole attachments rather than references for some document types.
- Decide fixes: stop passing history to the Policy Service Assistant for simple lookups, and route those attachment types through the reference path.
Answer: The overrun came from heavier-than-expected use of the connected agent and from one document path that skipped referencing. Both are design fixes. Hamish also updated the estimate: account executives value asking policy questions in the same place, so some of the extra consumption is worth paying for.
Common mistakes
MistakeEstimating only the front-door agent's consumption.
InsteadInclude connected agents, Foundry tokens, tools, telemetry, evaluation and people's time.
MistakeUsing the largest model for every agent.
InsteadChoose models per agent from evaluation results, and consider the model router.
MistakeLeaving loops and fan-outs without limits.
InsteadSet turn, time and cost limits per request.
MistakeTracking total spend only.
InsteadTrack cost per outcome, broken down by component.
MistakePlanning with prices remembered from months ago.
InsteadPlan from current billing documentation and label estimates with their date.
Summary and key terms
- Multi-agent costs span Copilot Studio credits, Foundry tokens, tools and hosting, telemetry, evaluation and people's time.
- Estimate per unit of work by counting calls per step, then multiply by volume and compare with value.
- Fan-out, growing context, loops, retries and chatty tools make costs run away.
- Fewer hops, deterministic steps, right-sized models, trimmed context, caching and push notifications reduce cost.
- Per-request budgets, capacity allocation, Azure budgets and gateway rate limits cap the worst case.
- Copilot Studio credit
- The unit in which Copilot Studio consumption is measured.
- Token
- A unit of text processed by a model; model usage is charged per token.
- Cost per outcome
- The cost of one completed unit of business work, such as a submission.
- Per-request budget
- A cap on the consumption of one request, after which it stops and reports.
- Showback
- Reporting to each business area the cost of its use of shared services.
Practice problems
Work each problem on paper first, then reveal the answer to check.
At planning rates of 2 credits per generative answer and 5 per agent action, what do 6 answers and 3 actions consume?
Show answer
6 × 2 + 3 × 5 = 27 credits.
Why do input tokens usually dominate agent costs?
Show answer
Every turn resends instructions, history, tool descriptions and retrieved content.
What did caching appetite answers for 24 hours achieve in the pilot?
Show answer
It removed about a third of carrier calls.
Lesson quiz · 5 questions
Score 60% or more to complete this lesson.
Create a free account to save your progress, take quizzes and earn a certificate.