Cube Core Hits 20k Stars Blocking AI Agents From Raw Warehouse Data
Cube Core is an open-source semantic layer that lets AI agents, BI tools, and apps query governed metrics instead of raw warehouse tables.
Takeaways
- Cube Core is an open-source semantic layer, now positioned as governed infrastructure for AI agents doing analytics
- Define metrics, dimensions, joins, and access rules once, expose via SQL, REST, GraphQL, and MCP
- Agents query using Semantic SQL with a MEASURE function instead of hitting raw warehouse tables directly
- Row-level and multi-tenant security enforced at compile time, pre-aggregation caching keeps queries under sub-second
- Works with Snowflake, Databricks, BigQuery, Postgres, ClickHouse, Presto, Athena and other SQL sources
- Apache 2.0 backend, self-hostable via Docker, with a commercial Cube platform built on the same core
Text-to-SQL demos are easy. Getting an agent to consistently return the correct revenue number, exclude refunds the way finance does, and never leak another tenant's data is the hard part. Cube Core is a bet that this problem gets solved not with a bigger model but with a semantic layer sitting between the agent and the warehouse.
The project has crossed 20k stars on GitHub and positions itself as the open-source foundation for what the team calls agentic analytics. Cube Core lets you define metrics, dimensions, joins, and access rules once in code, then expose them through SQL, REST, and GraphQL APIs to anything downstream: BI tools, custom applications, or AI agents. It is headless, so you build the analytics experience that fits your product.
Why agents need a semantic layer
When an LLM writes SQL directly against warehouse tables, every query becomes a fresh interpretation of what the business means. The dangerous moment isn't writing SQL, it's deciding what the data means: what counts as revenue, whether refunds are excluded, which date defines last quarter, whether this user is even allowed to see this customer's data.
Cube's answer is to never let the agent touch raw tables. Its AI agents query the semantic layer using Semantic SQL, a Postgres-compatible interface that extends SQL with the MEASURE function. Every query passes through the semantic layer runtime, where it gets validated against the data model and has access policies applied deterministically before reaching the warehouse. You get the flexibility of SQL on top of certified metric definitions, rather than picking between the two.