Semantic Layer

The Cube semantic layer: define every metric once

Cube is the agentic analytics platform built on a semantic layer. Model your metrics, dimensions, joins, and access rules once, in code, on top of your warehouse. Analytics Chat, workbooks, dashboards, embedded analytics, and AI agents all answer from the same governed definitions.

BrexWixWebflowIntuitAlconTubiDrataand 50+
Why a semantic layer

When every tool defines revenue, you get several revenues

Revenue gets defined in a dashboard, again in a notebook, and again in the SQL an AI agent writes on the fly. Each copy drifts a little, so the same question gets three answers and nobody trusts any of them. A semantic layer moves that logic upstream into one governed model that every query passes through.

  • One definition per metric
    Define “active customer” or “net revenue” once, and every query resolves it the same way.
  • Permissions in the query path
    Access policies apply before a query reaches the warehouse, for every person and every agent.
  • On top of your warehouse
    Cube queries Snowflake, BigQuery, Databricks, Redshift, ClickHouse, Postgres, and other sources where the data already lives.
What is a semantic layer?
Workbooks, dashboards, and Analytics Chat all reading from one context model built on the semantic layer
How it works

Four parts of the Cube semantic layer. Data modeling, access control, caching, and APIs, all managed as code.

Model your business in code

Cubes represent business entities such as customers and orders, with their measures, dimensions, and joins. Views on top of them present curated, query-ready datasets for people and agents. Models are written in YAML or JavaScript and live in git, so every change is reviewed, tested in a development branch, and shipped through CI.

Explore data modeling
The Cube IDE in development mode, with a YAML data model and an agent adding a join
Semantic layer for AI

Agents answer from certified definitions, not guesses

Point an LLM at raw tables and it re-derives joins and metric logic on every prompt, so the same question can return different numbers.

Cube's own agent, and Claude, ChatGPT, or your own agent over MCP, query the semantic layer instead of the raw schema. They pick from governed metrics, inherit the asker's permissions, and every answer traces back to a named definition you can check.

Explore the AI context layer
Claude answering a revenue question from Cube's governed model, alongside ChatGPT, Cursor, and Slack
Internal BI and embedded analytics

One model for your team and your customers

Your team works in Analytics Chat, workbooks, and dashboards. Your customers get the same governed metrics inside your product, with multi-tenancy and customer-level row-level security. Both run on one semantic layer, so a metric means the same thing in your board deck and in your customer's dashboard.

See how it works for business intelligence and embedded analytics.

White-labeled analytics embedded in three different software products
Open source

Built on Cube Core, the open-source semantic layer

Cube Core is the semantic layer itself: data modeling, access control, caching, and APIs, licensed under Apache 2.0. Cube Cloud is the agentic analytics platform built on it, adding Analytics Chat, workbooks, dashboards, embedded analytics, and managed infrastructure. Data models port unchanged between the two.

Explore Cube Core
The Cube platform resting on Cube Core, the open-source semantic layer at its foundation
Evaluating semantic layer tools

Run the grounded-answer test

Whichever semantic layer tools you compare, put an AI agent in front of a real business question on the model. Check that it returns the right number, respects the asker's permissions, and lets you trace the answer back to the definition that produced it.

In our benchmark across three frontier models, adding semantic layer definitions raised answer accuracy by 17 to 23 percentage points over the schema alone. Our guide to evaluating semantic layer tools turns the test into weighted criteria and a scorecard, and the 2026 shortlist runs the main options through it.

Benchmark results: adding a semantic layer raised answer accuracy from about 46-51% to 68-69% for Claude Opus 4.7, Claude Sonnet 4.6, and GPT-5.4
Brex
Brex evaluated semantic layers against AI-readiness criteria and chose Cube for Spaces, its embedded AI financial analyst for 35,000+ customers. As Brex puts it, the LLM is commodity; the context is the product.
Read the story

Frequently Asked Questions

It's the governed model at the foundation of Cube, the agentic analytics platform. It defines your metrics, dimensions, joins, and access rules once, on top of your warehouse, and every Cube surface queries through it: Analytics Chat, workbooks, dashboards, embedded analytics, and AI agents connected over MCP. The open-source version of the semantic layer is Cube Core.

Start building on the Cube semantic layer