Self-Hosted vs Managed Agent Platform: Build or Buy?

The real tradeoff between self-hosting agent frameworks and managed platforms. Most production teams don't pick one—they self-host orchestration and pay for managed observability.

Yash Amin
12 min

The Pattern Most Teams Miss

The choice isn't "self-hosted OR managed." It's "self-hosted orchestration PLUS managed observability." Most production teams run open-source agent frameworks (LangGraph, CrewAI) on their own infrastructure — full control, no per-node fees — and pay for managed tracing platforms (Langfuse, Honeycomb) because that's where managing in-house has the worst cost-to-value ratio. Start there, then optimize as you scale.

What Self-Hosting Actually Costs You (and What It Saves)

Self-hosting an agent framework means you own the orchestration layer. You run the code, manage the infrastructure, instrument the system, and write the governance controls. For the first agent, this feels cheaper — you skip the SaaS fees. For the tenth agent, you're maintaining a whole platform.

The Engineering Cost

  • Weeks 1-4: Build your first agent. The framework (LangGraph MIT free, CrewAI, AutoGen) handles orchestration; you write business logic. Framework cost: near zero engineering.
  • Weeks 4-12: You need to see what's happening. Build observability — tool-call tracing, memory operations, workflow visibility. Cost: 1-2 weeks of one engineer, or ~$8K.
  • Weeks 12-20: Production agents fail silently. Add cost controls (spending caps, action limits), governance (approval gates, audit trails), and scaling infrastructure (load balancing, multi-region support). Cost: 3-5 weeks across 2 engineers, or ~$25K.
  • Month 6+: Maintaining the observability layer, onboarding new agents to your internal framework, enforcing governance rules. Cost: 0.5 FTE ongoing, or ~$50K/year.

Total to self-host one agent sustainably: ~$80-100K in engineering time. For a startup with one agent, that's not a cost you pay upfront — it's spread over months. For a 30-person organization running 50 agents, you need 1-2 dedicated platform engineers. That's the crossover point where managed platforms start winning on pure economics.

What You Keep

  • Full execution control: No vendor constraints on how your agent behaves, how long it runs, or what data it can access.
  • No per-node fees at scale: LangGraph Platform charges $0.001 per node execution. At 100K nodes/month, that's $100. At 1M nodes/month, it's $1,000. Self-hosted costs are mostly fixed (infrastructure), not usage-based.
  • No vendor lock-in: Migrate agents to another framework by refactoring the orchestration layer — the business logic stays portable.
  • Data stays yours: Execution traces, costs, governance decisions — all stored in your database, not a third-party SaaS platform.

What Managed Platforms Actually Buy You (and What They Cost)

Managed agent platforms abstract away the infrastructure and observability layers. You focus on agent design; they handle deployment, scaling, tracing, and SLA compliance. This is valuable — but only if you'd otherwise be building that layer yourself.

The Value

  • Faster time to first agent: Deploy in days instead of weeks. No infrastructure setup, no observability plumbing.
  • SLA-backed reliability: Guaranteed uptime, automated failover, disaster recovery. You don't have to build this; it's included.
  • Built-in observability: Traces, cost attribution, governance controls — ready to go. No custom instrumentation required.
  • Compliance and audit trails: Regulatory requirements (SOC 2, HIPAA, GDPR) are pre-built. Auditing infrastructure changes or compliance drift is automatic.
  • Simplified scaling: Add new agents without managing Kubernetes clusters or load balancers.

The Cost

  • Per-seat fees: LangGraph Platform at $39/user/month. OpenAI Agents SDK usage-based. Multiply this by your team, and a 10-person team costs $3,900/month just for seat licenses.
  • Per-execution fees: LangGraph Platform: $0.001 per node. At scale, this compounds. 10M nodes/month = $10K on top of seat licenses.
  • Reduced execution control: Timeout limits, memory limits, and resource constraints are set by the platform. Edge cases (very long-running agents, high memory use) hit platform ceilings fast.
  • Vendor lock-in: Migrating agents off the platform means refactoring orchestration. Business logic stays portable, but it's still effort.
  • Data residency and privacy: Execution traces and audit logs live on the vendor's servers. Data sovereignty requirements (EU data residency, GDPR, data classification) may not be met.

For a solo founder with one agent: $39/month is a steal. For a 50-person SaaS company with 5-10 production agents: $3,900/month seat fees + usage costs = ~$60K/year in platform fees, not including your own observability costs if the platform doesn't cover your needs. At that scale, self-hosted is cheaper on a total-cost basis.

The Real Decision Framework: Three Factors

Skip the "which is better" question. Instead, measure three things about your situation:

1. Team ML Engineering Maturity

  • No ML engineers: Managed platform wins. You need the observability and compliance built-in; you don't have the expertise to maintain a custom layer.
  • 1-2 ML/platform engineers: Self-hosted orchestration + managed observability. You can own the agent business logic; let the observability vendor own tracing and cost attribution.
  • 4+ engineers + dedicated infra team: Self-hosted everything. You've got the team to maintain the platform layer; vendor lock-in and per-execution fees hurt more than platform overhead helps.

2. Scale and Agent Count

  • 1-3 agents: Managed platform. Fixed cost, fast setup, no infrastructure to own.
  • 5-15 agents: Hybrid (self-hosted orchestration + managed observability). Orchestration complexity is low enough that self-hosting saves money; you're not yet at the scale where building observability in-house makes sense.
  • 20+ agents: Self-hosted. You've hit the scale where per-execution fees and seat licenses become expensive. Custom infrastructure is cheaper.

3. Compliance and Data Residency Requirements

  • None (B2C or internal-use agents): Managed platforms are the simplest choice.
  • Audit trails and basic governance: Hybrid works. Managed observability platforms can log execution trails; you own the approval workflows.
  • Data residency (EU, China, regulated industries): Self-hosted. Managed platforms may not guarantee where your data lives. Custom infrastructure lets you choose.

Why the Hybrid Pattern Is Actually Winning

Most production teams are converging on the same pattern: self-host the orchestration layer (LangGraph free tier, CrewAI), pay for managed observability (Langfuse $25/month, Honeycomb on-demand). This split makes sense because:

  • Orchestration is your moat. How your agent selects tools, handles errors, and manages state is business logic unique to you. Build it in-house.
  • Observability is table stakes, not moat. Seeing what your agent did and how much it cost doesn't differentiate you. Buy it.
  • The cost split is predictable. Orchestration costs scale with your engineering team size (fixed). Observability costs scale with execution volume (managed vendor).

If you start here instead of picking one extreme, you're already ahead. You get the control and economics of self-hosting without the observability tax. And if your needs change (compliance, scale, budget), you can migrate either layer independently — swap observability vendors, or migrate orchestration to a managed platform — without a full rebuild.

Next Steps: Designing Your Architecture

Before committing to either path, revisit the nine engineering control layers behind every production AI system. The build-vs-buy decision is really about which layers you own and which you outsource.

If you're comparing specific frameworks and platforms, see the framework comparison to map features to your decision criteria. And for the observability piece of the hybrid strategy, see what to track in production agent observability and the vendor comparison there.

Frequently Asked Questions

Self-host the orchestration (LangGraph free, CrewAI) — that's where you build knowledge specific to your task domain. Pay for managed observability (Langfuse, Honeycomb) — that's where building in-house wastes money with no ROI. A startup's value is in the agent's behavior, not in how you trace it. You'll outgrow the free tiers of managed platforms, but by then you'll know what you actually need to instrument, not guess.
First 2-4 weeks: minimal. The framework handles orchestration, you write business logic. Weeks 4-12: you'll start needing observability. Weeks 12+: governance, cost control, scaling infrastructure—this is the cliff. A 3-person team can self-host for months. A 20-person organization running 50+ agents will burn 1-2 engineers just maintaining the observability layer you would've outsourced. The crossover is around 10-15 concurrent production agents.
Orchestration lock-in is real (moving from LangGraph to CrewAI is a rewrite). Observability lock-in is manageable (switching from Langfuse to Honeycomb is a retooling; export logs, redeploy agents, done). The smart strategy: self-host orchestration with broad tool support, self-manage your observability layer (JSON logging + time-series DB, ~10% of what Langfuse costs), or pay for managed observability later. Most teams should start self-hosted orchestration on open-source (LangGraph MIT license, not Platform) to keep it portable.
Yes, but it's more friction than the reverse. Starting with managed platforms (like OpenAI Agents SDK) bakes vendor assumptions into your agent design. Migrating means refactoring agents to run on self-hosted orchestration. Starting self-hosted (LangGraph free) is friction-free: you already own your agents, deploy them anywhere. If a managed platform wins later (SLAs, scale), you've just tested whether you actually need it.