Managed vs Custom Platforms and Total Cost

The cheapest option on a price sheet is often not the cheapest option to own.

BeginnerIntermediateExpert · 12 min read · Last updated:

In short

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.

Versions used

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.

Beginner The choices

It is a range, not two boxes

OptionExample shapeFits when
Finished productAn agent feature inside software you already useThe task is common and configuration is enough
Low-code builderVisual flows and connectorsSimple processes owned by business teams
Managed platformYour code on a provider's runtime and servicesCustom behavior without running the base layer
Custom on cloud basicsYour platform on containers, queues and databasesParticular control, scale or integration needs
Self-run open stackYour hardware, models and servicesIsolation, 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

LayerOften boughtOften built
ModelsProvider APIsServing for restricted or steady workloads
Runtime and sandboxManaged runtimeSpecial isolation or hardware needs
ToolsStandard connectorsBusiness operations with your rules
KnowledgeIndex servicesIngestion, permissions and definitions
ObservabilityTracing and dashboardsOutcome measures
EvaluationRunnersCases and pass criteria
Intermediate Criteria and total cost

Criteria beyond price

CriterionQuestion
Time to valueWhen can real users try it safely?
FitWhich requirements need workarounds?
ControlCan you enforce your policy at the action boundary?
DataWhere does it go, and can you delete and export it?
ReliabilityWhat happens when the supplier or your team fails?
SkillsCan you hire and keep the people required?
ChangeHow much notice do you get, and how often must you adapt?
ExitHow 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.

CheckOpen sourceCommercial
RightsRead the license, including any separate enterprise partsRead use limits and price change terms
HealthMaintainers, release pace, governanceSupplier stability and roadmap
SecurityAdvisories and who will patchResponse commitments and evidence
SupportCommunity or paid third partyHours, escalation and scope
ExitFork is possible but costlyExport formats and notice

Projects can change license or direction, and products can be retired. Plan for both.

Total cost of ownership

Cost groupOften forgotten
BuildSecurity review, integration, data preparation
UsageRetries, evaluation runs, embeddings, logs
InfrastructureIdle capacity, redundancy, non-production copies
PeopleOn-call, upgrades, user support, training
QualityHuman review and correction of errors
ChangeModel retirements and framework upgrades
ExitExport, 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.
Expert Gateways, decisions and exit

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.

Appsown keys
Checkidentity
Policyquota
Routemodel
Recordcost

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

  1. State the tasks, users, volume range and consequences of failure.
  2. List hard requirements and remove options that fail them.
  3. Build a thin slice on two finalists.
  4. Estimate multi-year cost with ranges.
  5. Assess operating capacity honestly.
  6. Choose, and record reasons, assumptions and review triggers.

Record the triggers to revisit

TriggerWhy it reopens the decision
Volume outside the assumed rangeCost ranking may flip
Price or term changeAssumptions no longer hold
Retirement noticeMigration cost is coming anyway
New residency or sector ruleOption may no longer qualify
Key staff leaveSelf-run capacity is reduced
Repeated incidentsReliability 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.

DutyManaged optionSelf-run option
Capacity and scalingQuota requests and budgetsProcurement, clusters and tuning
Security patchingYour code and configurationEvery layer
On-callApplication faults and supplier escalationAll faults, with enough people to rotate
Model changesTest and migrate on supplier datesSelect, size, test and deploy
Audit evidenceCollect yours and review the supplier'sProduce all of it
User supportYoursYours

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

MistakeConsequenceInstead
Comparing license fees with API bills onlyPeople costs dominate laterCount total ownership
One volume forecastWrong choice when reality differsScenarios and break-even ranges
Building commodity partsSlow delivery, constant upkeepBuy and focus on your domain
Assuming managed means no operationsNo owner during incidentsAssign ownership regardless
Unprotected gatewayOne failure or breach affects allHarden and make redundant
No review dateOutdated decision persistsTriggers 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

Where to go next