Cosmos Semantic
Open source · Semantic layer for AI

Your AI agent just gave you a number.
Can you prove it’s right?

The same number on every database and platform, with the proof in every answer.

The problem

“Revenue” has three definitions.
The agent picks one. Nobody knows which.

The solution

Define once.
Serve everyone.
Prove it every time.

1
Define
Metrics, business rules and concepts in one versioned model, with owners and tests.
2
Serve
Agents request the governed metric over MCP instead of guessing SQL. Apps use the REST API.
3
Prove
Every answer carries its evidence: formula, rules, filters, reference date and hashes.
Multi-database, multi-platform

One model.
The same number on all of them.

Data platforms
DatabricksSnowflake
Databases
OracleSQL ServerPostgreSQL MySQLMariaDBDuckDB

The engine generates deterministic SQL for each dialect. The same equivalence suite runs on all of them:

Verifiable numbers

Every answer
comes with the proof.

cosmos replay reproduces the answer and tells you whether the number changed, and why: the model, the engine or the data.

Reconciliation

Doesn’t match the legacy report?
Cosmos tells you why.

It compares the governed metric with the SQL your team already uses and names the likely cause of each divergence:

Rows multiplied by a join Day cut in another time zone Integer division Counted rows, not distinct Rows lost in an inner join Different filter Blank group dropped Rounding
The conversation moves from “who is right” to “which rule do we want”.
Ontology at the core

Business context,
not just SQL.

Console

A console
for the people who decide.

Cosmos Semantic

Open.
No lock-in.

$ pip install cosmos-semantic
Live demo
wiliamrosa.github.io/cosmos-semantic-platform
Code, and issues to contribute
github.com/WiliamRosa/cosmos-semantic-platform