SLayer v0.5 is live — the open-source semantic layer built for AI agents. View on GitHub →

Opensource semantic layer
built for agents.

Define your metrics once. Query them from any agent, app, or script — correctly, every time.

MCP
REST
CLI
Python
What is SLayer

Built for agents, not dashboards

Most semantic layers were built for BI tools and static dashboards. SLayer is built for AI agents that need dynamic, predictable, and structured access to analytics logic.

dynamic
predictable
expressive

SLayer provides a simple semantic interface that allows LLMs to generate queries in a natural way while remaining powerful enough for real analytics logic.

Instead of generating fragile SQL, agents query a structured representation of metrics, dimensions, joins, and time logic.

SLayer also doesn't spam your agent's context - skills are available on-demand via the help() tool.

This makes queries more reliable, reusable, and easier to reason about.

How it works

Define once. Query anywhere.

Connect Your Data

SLayer introspects your schema and creates semantic models automatically.

Foreign keys become joins.

Columns become measures and dimensions.

Models are queryable immediately.

Adjust models dynamically

Update models instantly through YAML or API without rebuilds or compilation steps.

Fast iteration for agent workflows and changing schemas.

Query via structured interfaces

Use the same semantic definition across every workflow — through MCP, Python, HTTP REST API, or CLI.

MCP
Python
REST
CLI

One semantic contract, accessible from agents, apps, scripts, and developer tools.

Agent-native structure

Designed for workflows where queries are generated dynamically by AI tools rather than predefined manually.

SLayer gives agents a constrained, structured query interface designed for reliability, reproducibility, and easier reasoning compared with raw SQL.

Powerful query layer

Supports query-time transformations such as time_shift, diff, and dynamic aggregations.

Complex analytical queries can be expressed through structured semantic operations without complex SQL window functions.

Lightweight and standalone

  • Runs locally, embedded, or as a service

  • No dbt project required

  • No BI platform dependency

  • No heavy infrastructure

Fast model generation

Database schemas can be converted into semantic models automatically, including relationships between tables.

New and modified models are available instantly, so agents can use updated analytics logic without waiting for manual deployment.

Reduces manual modeling work significantly.

Python-native ecosystem fit

Integrates naturally into Python-based data and agent workflows.

Works as a library, CLI tool, MCP server, or API.

Where SLayer fits best

Designed for modern data workflows

SLayer works best in environments where queries are generated dynamically and reused across tools.

Common use cases

AI-powered reporting

agent-driven analytics

internal developer platforms

embedded analytics

notebook workflows

SLayer acts as a reusable semantic contract between data and the systems that consume it.

Supported databases

Works across SQL databases

Postgres
MySQL
BigQuery
Snowflake
SQLite
ClickHouse
DuckDB

Start building with an agent-native semantic layer

Define business logic once.
Query consistently across agents, apps, and Python workflows