Managed vs Custom Platforms and Total Cost
The cheapest option on a price sheet is often not the cheapest option to own.
Buy what is common and hard to run; build what is specific to your work. Compare options on total cost over several years, including people, migration and failure, and test how the answer changes with volume, staffing and price. Whatever you choose, keep ownership of your data, tools, evaluations and exit plan.
What you will learn: the range from product to self-run stack, how to compare open-source and commercial software, what a model gateway adds, how to calculate total cost and break-even, and how to record a decision you can revisit.
Prerequisites: AWS, Azure and Google Cloud Compared and Agent Cost Model and Token Economics.
The example runs in November 2026 with Python 3.13 and only the standard library. Every price, salary and capacity figure is invented to show the method. None describes a real product or market rate.
It is a range, not two boxes
| Option | Example shape | Fits when |
|---|---|---|
| Finished product | An agent feature inside software you already use | The task is common and configuration is enough |
| Low-code builder | Visual flows and connectors | Simple processes owned by business teams |
| Managed platform | Your code on a provider's runtime and services | Custom behavior without running the base layer |
| Custom on cloud basics | Your platform on containers, queues and databases | Particular control, scale or integration needs |
| Self-run open stack | Your hardware, models and services | Isolation, sovereignty or large steady volume |
One organization can sensibly use several. A purchased support assistant, a managed runtime for internal agents and a self-hosted model for restricted data can coexist if identity, policy and records are consistent.
What you always own
- The decision about what the agent may do and who is accountable.
- Data quality, permissions and retention.
- Integration with your systems.
- Evaluation on your tasks.
- Incident response for harm your users experience.
- The ability to stop it.
A managed service changes who runs servers. It does not move these.
Decide layer by layer
| Layer | Often bought | Often built |
|---|---|---|
| Models | Provider APIs | Serving for restricted or steady workloads |
| Runtime and sandbox | Managed runtime | Special isolation or hardware needs |
| Tools | Standard connectors | Business operations with your rules |
| Knowledge | Index services | Ingestion, permissions and definitions |
| Observability | Tracing and dashboards | Outcome measures |
| Evaluation | Runners | Cases and pass criteria |
Criteria beyond price
| Criterion | Question |
|---|---|
| Time to value | When can real users try it safely? |
| Fit | Which requirements need workarounds? |
| Control | Can you enforce your policy at the action boundary? |
| Data | Where does it go, and can you delete and export it? |
| Reliability | What happens when the supplier or your team fails? |
| Skills | Can you hire and keep the people required? |
| Change | How much notice do you get, and how often must you adapt? |
| Exit | How long and costly is leaving? |
Open source and commercial software
Open-source licenses give rights to use, inspect and modify. They do not supply operators, guarantees or security response. Commercial software may add support, compliance documents, management features and a party to hold accountable, in exchange for fees and dependency.
| Check | Open source | Commercial |
|---|---|---|
| Rights | Read the license, including any separate enterprise parts | Read use limits and price change terms |
| Health | Maintainers, release pace, governance | Supplier stability and roadmap |
| Security | Advisories and who will patch | Response commitments and evidence |
| Support | Community or paid third party | Hours, escalation and scope |
| Exit | Fork is possible but costly | Export formats and notice |
Projects can change license or direction, and products can be retired. Plan for both.
Total cost of ownership
| Cost group | Often forgotten |
|---|---|
| Build | Security review, integration, data preparation |
| Usage | Retries, evaluation runs, embeddings, logs |
| Infrastructure | Idle capacity, redundancy, non-production copies |
| People | On-call, upgrades, user support, training |
| Quality | Human review and correction of errors |
| Change | Model retirements and framework upgrades |
| Exit | Export, parallel running, rewrite |
Compare cost per successfully completed task, not per call. A cheaper option that needs more human correction can cost more overall.
A three-year comparison
The program compares a managed service with a self-run platform that has fixed staff costs and capacity bought in whole nodes. It then searches for the volume at which self-running becomes cheaper.
"""Three-year cost of a managed service against running the stack yourself."""
MONTHS = 36
# All prices are invented. Replace them with quotes and your own measurements.
MANAGED = {"setup": 20000, "platform_month": 1500, "per_task": 0.12}
SELF = {"setup": 150000, "fixed_month": 9000, "per_task": 0.02,
"engineers": 1.5, "engineer_month": 14000,
"node_month": 4000, "tasks_per_node": 100000}
def volume(month, start, growth):
return start * (1 + growth) ** month
def managed_cost(start, growth, price=MANAGED["per_task"]):
return MANAGED["setup"] + sum(
MANAGED["platform_month"] + volume(m, start, growth) * price
for m in range(MONTHS))
def self_cost(start, growth, engineers=SELF["engineers"]):
total = SELF["setup"]
for month in range(MONTHS):
tasks = volume(month, start, growth)
nodes = max(2, -(-tasks // SELF["tasks_per_node"])) # round up
total += (SELF["fixed_month"] + engineers * SELF["engineer_month"]
+ nodes * SELF["node_month"] + tasks * SELF["per_task"])
return total
def compare(label, start, growth, **change):
m = managed_cost(start, growth, change.get("price", MANAGED["per_task"]))
s = self_cost(start, growth, change.get("engineers", SELF["engineers"]))
cheaper = "managed" if m < s else "self-run"
print(f"{label:<34}{m:>12,.0f}{s:>12,.0f} {cheaper}")
print(f"{'scenario (36 months)':<34}{'managed':>12}{'self-run':>12} cheaper")
compare("50k tasks a month, flat", 50_000, 0.00)
compare("500k tasks a month, flat", 500_000, 0.00)
compare("2M tasks a month, flat", 2_000_000, 0.00)
compare("100k, growing 8% a month", 100_000, 0.08)
compare("500k, but 4 engineers needed", 500_000, 0.00, engineers=4)
compare("500k, managed price down 40%", 500_000, 0.00, price=0.072)
# Node counts jump in steps, so the lead can change hands more than once.
cheaper = [v for v in range(1_000, 2_000_001, 1_000)
if self_cost(v, 0) < managed_cost(v, 0)]
wins = set(cheaper)
dearer = [v for v in range(1_000, 2_000_001, 1_000) if v not in wins]
print(f"\nSelf-run first wins at about {cheaper[0]:,} tasks a month")
print(f"and wins at every tested volume above {max(dearer):,}")
Output:
scenario (36 months) managed self-run cheaper
50k tasks a month, flat 290,000 1,554,000 managed
500k tasks a month, flat 2,234,000 2,310,000 managed
2M tasks a month, flat 8,714,000 5,550,000 self-run
100k, growing 8% a month 2,319,226 2,420,204 managed
500k, but 4 engineers needed 2,234,000 3,570,000 managed
500k, managed price down 40% 1,370,000 2,310,000 managed
Self-run first wins at about 562,000 tasks a month
and wins at every tested volume above 601,000
At low volume the fixed costs of running a platform dominate. At two million tasks a month the position reverses clearly. Near the crossover the result is close and uneven: self-running first wins at about 562,000 tasks, then loses again at some higher volumes because an extra node is bought before it is full, and wins consistently only above 601,000. A single break-even figure would hide that. The growth scenario is also instructive, since volume ends far above break-even yet the three-year total still favors the managed service. Staffing and price assumptions matter greatly: adding engineers or cutting the managed price turns a near tie into a gap of roughly a million. The model omits discounting, migration, outages, quality differences and exit, any of which could matter.
Make the estimate honest
- Use volume ranges with a source, not one hopeful forecast.
- Take staff effort from comparable work, including on-call cover for absences.
- Measure tokens, retries and run time from a pilot.
- Obtain written quotes and note commitment terms.
- Show which two or three assumptions drive the result.
- Revisit with actual figures after launch.
Model gateways
A model gateway sits between applications and model providers or local servers. It offers one interface, holds provider keys, applies quotas and routing, records cost and can fail over. LiteLLM is a widely used open-source example; managed gateways come from cloud and data platforms.
It is also a concentration point. Outage stops everything behind it, and compromise exposes keys and prompts. In March 2026, malicious LiteLLM package versions were published to PyPI, as the project's security update records. Whatever gateway you pick, pin and verify releases, run it redundantly, restrict configuration changes and rehearse key rotation. Check that provider-specific features pass through correctly. Model Routing, Fallbacks and Gateways covers routing logic.
A decision sequence
- State the tasks, users, volume range and consequences of failure.
- List hard requirements and remove options that fail them.
- Build a thin slice on two finalists.
- Estimate multi-year cost with ranges.
- Assess operating capacity honestly.
- Choose, and record reasons, assumptions and review triggers.
Record the triggers to revisit
| Trigger | Why it reopens the decision |
|---|---|
| Volume outside the assumed range | Cost ranking may flip |
| Price or term change | Assumptions no longer hold |
| Retirement notice | Migration cost is coming anyway |
| New residency or sector rule | Option may no longer qualify |
| Key staff leave | Self-run capacity is reduced |
| Repeated incidents | Reliability assumption is wrong |
See Architecture Decision Records and Reviews and Business Case, Build vs Buy and Vendor Evaluation.
Plan the exit at the start
List what must move: tools, prompts, workflows, conversation and memory data, knowledge indexes, evaluation cases, traces and user habits. For each, note the export format and effort. Rehearse a small part early. Keep interfaces at the edges standard where it costs little, and accept deliberate dependency where a proprietary feature earns its keep. In some jurisdictions switching rules may help with charges, as discussed in Private, Air-Gapped and Sovereign Deployment, but technical work remains yours.
When an internal platform pays off
If several teams build agents, shared identity, gateways, tracing, evaluation and templates avoid repeated work and inconsistent controls. Start from needs two or three teams actually share, provide it as a product with an owner and measure adoption and time saved. Building a large platform before the first useful agent usually serves nobody. Agent Fleets and Internal Platforms describes a staged route.
Count the people honestly
Staff cost is where estimates most often go wrong, because the first working version is built by enthusiastic people who are not yet counting nights, upgrades or absences. List the duties and give each an estimate.
| Duty | Managed option | Self-run option |
|---|---|---|
| Capacity and scaling | Quota requests and budgets | Procurement, clusters and tuning |
| Security patching | Your code and configuration | Every layer |
| On-call | Application faults and supplier escalation | All faults, with enough people to rotate |
| Model changes | Test and migrate on supplier dates | Select, size, test and deploy |
| Audit evidence | Collect yours and review the supplier's | Produce all of it |
| User support | Yours | Yours |
A fraction of an engineer on paper rarely means a fraction in practice. Continuous coverage needs several people who know the system, even when average workload is small. Include the cost of what those people would otherwise build.
Put quality into the equation
Options may complete different shares of tasks correctly. Let the cost per successful task be the total spend, including review and rework, divided by tasks completed acceptably. Suppose one option costs less per attempt but sends more cases to people. The saving disappears once their time is counted, and the people affected also wait longer. Measure completion on the same evaluation set for each finalist, then plug the measured rates and review minutes into the model. Treat serious errors separately, since an average cost hides rare events with large consequences. Task, Tool and Planning Metrics and Product Analytics, KPIs and Outcomes help define success.
Questions for contracts and licenses
- What is the price unit, and what can change it during the term?
- How much notice precedes retirement of a feature or model?
- What happens to your data and configuration at termination, and for how long can you export?
- Which service levels apply, what is excluded and what is the remedy?
- Who are the subprocessors, and how are changes announced?
- Does an open-source component include parts under different terms?
- Are there minimum commitments that remain if usage falls?
Involve procurement, legal and security early. A technical favorite that cannot be contracted wastes the trial.
Use the pilot to replace guesses
Before committing, run both finalists long enough to observe a change or two: a model update, a load peak, a deliberately injected failure. Record hours spent, tickets opened, time to diagnose and cost per completed task. Then rerun the comparison with measured values and note which assumption moved most. If the ranking depends on a figure you still cannot measure, say so in the decision record and choose the option that is cheaper to reverse.
Prefer decisions you can reverse
When estimates are close, as in the middle rows of the example, reversibility is a sound tie-breaker. Starting on a managed service with tools and evaluation cases held in your own repository usually leaves more room to change course than buying hardware and hiring for it. The opposite can be true when data may not leave your environment at all, because then moving to a managed service later is not an option. Write down which way is easier to undo and why.
Common mistakes
| Mistake | Consequence | Instead |
|---|---|---|
| Comparing license fees with API bills only | People costs dominate later | Count total ownership |
| One volume forecast | Wrong choice when reality differs | Scenarios and break-even ranges |
| Building commodity parts | Slow delivery, constant upkeep | Buy and focus on your domain |
| Assuming managed means no operations | No owner during incidents | Assign ownership regardless |
| Unprotected gateway | One failure or breach affects all | Harden and make redundant |
| No review date | Outdated decision persists | Triggers and periodic review |
Checklist
- Requirements and volume ranges are written.
- Each layer has a buy or build reason.
- Licenses and commercial terms are reviewed.
- Total cost includes people, review, change and exit.
- Sensitivity and break-even ranges are shown.
- Finalists were tried on real work.
- Gateways and shared services have owners and redundancy.
- Decision triggers and exit steps are recorded.
Frequently asked questions
Should a startup build its own platform?
Usually it should start with managed pieces and build where its product differs, revisiting when volume or constraints justify the work.
Is open source free?
There may be no fee, but operation, upgrades, security and support take time and money that belong in the comparison.
Do we need a model gateway?
It helps once several applications or providers need shared keys, quotas and cost records. A single small application may not need one.
How many years should the cost model cover?
Match your commitment and hardware life, and show shorter horizons too, because fast change makes long forecasts uncertain.
References
- Open Source Initiative: Open source AI
- LiteLLM documentation
- LiteLLM: security update, March 2026
- Microsoft: Azure Well-Architected Framework
Where to go next
Agent FinOps, Budgets and Chargeback
Track and control real spend.
Agent Fleets and Internal Platforms
Build shared services in stages.
Architecture, Mosaic AI, Agent Framework and Agent Bricks
Examine one data platform in depth.