Every software company shipping a customer-facing product eventually faces the same question: do we build embedded analytics ourselves, or buy a platform? The honest answer depends less on charting libraries than on the parts you can't see in a demo — multi-tenant security, performance under load, and, in 2026, an AI analyst your customers can actually trust.
This is a decision framework for product and engineering leaders. It lays out the real costs of building, the case for buying, and a fair read on when each path is the right call.
TL;DR
For most teams shipping customer-facing analytics, the right answer is a split: build the front-end, buy the foundation. The expensive, easy-to-underestimate parts are a governed semantic layer, multi-tenant row-level security, query performance and caching under concurrent load, and an AI layer grounded in the model — together a multi-quarter platform project, not a sprint. Buying that foundation lets you keep your team on product differentiation. Cube is the buy-the-foundation option: the agentic analytics platform built on a semantic layer (its open-source core, Cube Core), multi-tenant by construction, with row-level security, pre-aggregation caching, and four embedded surfaces — so you can own as much or as little of the UI as you want. Building fully in-house makes sense when analytics is single-tenant, throwaway, or a couple of static charts, and you have data engineers to own it.
What teams get wrong about building embedded analytics
The trap is the first dashboard. Wiring a charting library to your production database and rendering a few customer-facing charts takes a sprint and looks great in the demo — and convinces everyone that embedded analytics is a solved problem. It isn't. That first dashboard is maybe 20% of the work; the rest doesn't show up until you have real customers and real load.
Embedded analytics is a different problem from internal BI because the audience is your customers, not your employees. That single fact changes what matters:
- A wrong number is a support ticket; a leaked row is a breach. In a multi-tenant product, the failure that ends conversations is one customer seeing another customer's data. Isolation is a correctness requirement, not a nice-to-have.
- Scale is measured in tenants, not seats. Internal BI serves tens of employees. An embedded product can serve thousands of tenants querying at once, where one tenant's heavy query can degrade everyone's experience.
- Customers now expect to ask questions. The 2026 expectation is an in-product AI analyst. A chat box over free-form text-to-SQL demos well and is hard to make accurate and safe in front of paying customers.
Underestimating these is the most common and most expensive mistake. The next two sections make the costs concrete, then weigh them against buying.
The real cost of building embedded analytics in-house
Here's what you actually sign up to build and own when you build the foundation yourself. Each of these is a real engineering project, and they compound.
The semantic layer (governed metrics)
If "revenue" or "active users" is defined in your charting code, every chart, export, and future AI feature re-implements that logic — and the definitions drift. A semantic layer is one governed set of metrics, dimensions, joins, and access rules that every consumer reads from, so the numbers match everywhere. Building one is real work: modeling entities and relationships, handling time-zones and additivity, versioning definitions as the business changes, and exposing them cleanly to your app. Skip it and you get inconsistent numbers and a foundation no AI feature can safely stand on.
Multi-tenant row-level security
This is the hardest part, and the one most teams underestimate. Every query — from a dashboard widget, an API call, or an AI prompt — must be automatically scoped to the signed-in customer. Doing that well means a signed security context (for example, a tenant ID in a JWT) enforced at the data layer, not re-checked in application code for each surface. If your app re-derives permissions per feature, you've built an access-control system instead of a product, and every new surface is a fresh chance to leak a row. Keeping it correct as roles and tenants multiply is a standing tax.
Query performance and caching under load
Internal BI gets away with live queries because the concurrency is low. Embedded analytics doesn't. With thousands of tenants, every chart can't be a live warehouse scan, and one heavy tenant can't be allowed to slow everyone down. You need a caching strategy — pre-aggregations or materialized rollups for common query shapes, with the warehouse handling the long tail — plus a way to keep performance predictable per tenant. Building and tuning that layer, then maintaining it as query patterns shift, is an ongoing effort that grows with adoption.
An AI layer grounded in the model
Adding an AI analyst your customers trust is not a prompt-engineering project. A model can write SQL, but it doesn't know your join paths, which revenue column is certified, or where a tenant boundary is. Free-form text-to-SQL re-derives business logic on every prompt — inconsistent, hard to explain, and unsafe in multi-tenant context. The reliable pattern grounds the agent in the semantic layer so it selects from certified metrics and the layer generates the scoped SQL. That means you need the semantic layer first, plus the plumbing to expose it to an agent (increasingly over the Model Context Protocol). The AI is only as trustworthy as the foundation under it.
Ongoing maintenance
None of the above is build-once. You maintain the semantic model as metrics change, the isolation logic as you add tenants and roles, the caching layer as query patterns evolve, warehouse connectors, and the AI layer as models and standards like MCP move. This is the line item that's invisible at decision time and dominant a year later — a standing team to keep a self-built analytics platform correct, fast, and secure.
Add it up and "build embedded analytics" is really "build and operate a governed, multi-tenant, AI-ready data platform." That can absolutely be the right call — but only with clear eyes about the scope. For a step-by-step of what the build entails, see how to add AI analytics to your product.
The buy path: buy the foundation, keep your front-end
Buying doesn't have to mean handing your product experience to a vendor. The useful framing is to buy the foundation — the semantic layer, multi-tenancy, security, caching, and AI/MCP layer — and keep the front-end your customers see. You get the hard 80% out of the box and spend your engineering time on differentiation.
That's the split Cube is built for. Cube is an agentic analytics platform built on a semantic layer, and its open-source foundation, Cube Core (Apache 2.0), is that semantic layer. It's multi-tenant by construction: you pass a signed security context at query time and Cube applies row-level, multi-tenant access automatically, so every dashboard, API call, and AI answer is scoped to the right customer without your app re-checking permissions. Pre-aggregation caching keeps response times low under concurrent load. And Cube sits on top of Snowflake, BigQuery, Redshift, or Databricks, reading your existing dbt models rather than replacing your warehouse — dbt models the data, Cube governs the metrics on top and serves them to embedded apps, internal BI, and AI agents.
Crucially for the build-vs-buy split, Cube gives you four embedded surfaces, so you choose how much UI to own:
- Core Data APIs — SQL, REST, and GraphQL (plus an MCP server) for a fully custom, white-labeled front-end on governed data. This is the "buy the backend, build the UI" path.
- Analytics Chat API — a governed AI analyst your own UI (or another agent) calls; customers ask questions in plain language and get answers from certified metrics with their permissions applied.
- iframes — the fastest drop-in for governed dashboards when you'd rather not build the UI.
- Creator Mode — let your customers build and customize their own dashboards inside your app.
You can start on an iframe to ship something governed quickly, then move your highest-value flows to the Analytics Chat API or Core Data APIs as you invest in a bespoke UI. The same security context flows through every surface, so you don't re-solve isolation when you switch. And because the AI is governed by the semantic layer rather than bolted onto a query engine, the in-product analyst is accurate and explainable by construction — not a chat box you have to keep talking down from hallucinated numbers.
This is not hypothetical. Brex evaluated Cube against the dbt Semantic Layer and LookML and chose Cube — the semantic layer is what makes the AI useful — then built Brex Spaces, an embedded AI financial analyst its customers query directly. Drata also builds on Cube, and 400+ companies run on the platform. To compare full platforms head-to-head, see the best embedded analytics platforms in 2026.
Decision framework: build vs. buy at a glance (2026)
The honest comparison is across the dimensions that decide whether embedded analytics survives production, not the demo. The "buy" column reflects buying a foundation platform (like Cube) and building your own front-end on top.
| Dimension | Build in-house | Buy the foundation (e.g., Cube) |
|---|---|---|
| Time to ship | Fast first dashboard; production-readiness (isolation, scale, AI) is quarters of roadmap | Foundation in weeks; you build the front-end on top |
| Multi-tenant security | You design and own RLS at the data layer; every new surface is a leak risk | Row-level, multi-tenant by construction; one signed context flows to every surface |
| Performance / caching | You build and tune caching; concurrency and noisy-neighbor are yours to solve | Pre-aggregation caching built in; predictable under concurrent tenant load |
| AI / agentic | You must build a governed semantic layer first, then ground an agent safely | AI-native, grounded in the semantic layer (Analytics Chat API + MCP) out of the box |
| Maintenance burden | Standing team for model, isolation, caching, connectors, AI layer | Platform absorbs most maintenance; you maintain your model and your UI |
| UI control | Full control (you build everything) | Full control where you want it (Core Data APIs); drop-in where you don't (iframes, Creator Mode) |
| Total cost | Low to start, dominated over time by engineering + maintenance of the foundation | Platform cost, traded against the engineering you don't spend rebuilding the foundation |
Simplified for a side-by-side read; the right answer depends on your isolation, scale, and AI requirements. See Methodology below.
When building embedded analytics in-house is the right choice
Buying the foundation is the right default for customer-facing, multi-tenant analytics — but it isn't universal. Building in-house genuinely makes sense when:
- It's single-tenant or internal. If the analytics serve your own team or one customer with no isolation requirement, the multi-tenancy work that dominates the build cost doesn't apply.
- It's a throwaway or a prototype. For a short-lived experiment, the overhead of adopting a platform may not pay off before you learn what you needed to learn.
- It's one or two static charts. A couple of fixed visualizations with no governance, no AI, and no natural-language querying is a charting-library problem, not a platform problem.
- Analytics is your core product and the engine itself is the moat. A handful of companies sell analytics as the product, with a bespoke query engine as the differentiator. If that's literally your business, building can be strategic — though even then, many such teams buy the semantic-layer and multi-tenant foundation and differentiate above it.
- You have data engineers to own it for the long haul. The maintenance burden is real and permanent. If you have the team and want that control, building is a legitimate, eyes-open choice.
The calculus flips the moment analytics is customer-facing, multi-tenant, and expected to stay correct and fast — because that's exactly when the foundation, not the front-end, becomes the bulk of the work.
How to choose
Walk it in this order:
- Is it multi-tenant and customer-facing? If no, building a simple in-house view may be fine. If yes, the foundation is the deciding factor, and buying it usually wins.
- Will customers ask questions in natural language? If you want a trustworthy in-product AI analyst, you need a governed semantic layer underneath it either way. Buying an AI-native, semantic-layer-grounded platform skips the expensive prerequisite.
- How much UI do you need to own? If your differentiation is a bespoke, white-labeled experience, buy the backend (Core Data APIs) and build the front-end. If speed matters more than a custom UI, iframes or Creator Mode get you there faster.
- Do you have a team to maintain a self-built platform for years? Be honest. If not, the maintenance line item alone argues for buying.
For the architecture of grounding the AI safely — the part that makes or breaks an in-product analyst — see why AI agents need a semantic layer.
Methodology
This framework reflects the build-vs-buy tradeoffs we see for customer-facing embedded analytics as of 2026, weighted toward the dimensions that decide production builds: a governed semantic layer, multi-tenant row-level security, performance and caching under concurrent load, an AI layer grounded in the model, and ongoing maintenance. The "buy" comparison assumes buying a foundation platform and building your own front-end on top, the split most teams land on. Categories are simplified for a side-by-side read, and capabilities and standards like MCP evolve quickly, so confirm specifics against current documentation. As the publisher, Cube has an obvious interest here — we've aimed to describe the build path fairly and to be explicit about when building in-house is the better call.
Our verdict
Build the front-end; buy the foundation. The dashboard is the easy 20%; the semantic layer, multi-tenant security, caching under load, and a trustworthy AI analyst are the 80% that decide whether embedded analytics survives production — and together they're a multi-quarter platform project, not a feature. Buying that foundation keeps your team on product. Cube is the buy-the-foundation option: the agentic analytics platform built on a semantic layer (open-source core, Cube Core), multi-tenant by construction, with row-level security, pre-aggregation caching, and four embedded surfaces — so you own as much of the UI as you want and none of the plumbing you don't. Build fully in-house when analytics is single-tenant, throwaway, or a couple of static charts, and you have the team to own it.