# SLayer

> Self-hosted semantic layer letting AI agents query warehouses via structured requests with runtime formulas instead of raw SQL. Supports multiple databases.

- **Category:** AI
- **Licence:** MIT
- **Latest version:** v1.4.1
- **Open source:** oss
- **Languages:** Python
- **Platforms:** Python, Linux
- **Tags:** Analytics, Data Warehouse, CLI, Mcp, REST API, Ai Agents, SQL, Python, Semantic Layer, Query Engine

## Description

SLayer is an embeddable semantic layer designed for AI agents and humans to query data warehouses using governed, structured requests instead of raw SQL. It handles database connectivity, SQL translation, query-time aggregations and transforms (like time shifts, ratios, period changes), row-level security, and multi-stage queries. Agents and apps interact via MCP (stdio or SSE), REST API, Python SDK, CLI, Flight SQL, or a Postgres wire facade. Models can be defined as YAML code, auto-generated from database introspection, or imported from dbt/Cube/OSI, and can be edited at runtime without rebuilds. A memory store with semantic search captures business context. SLayer is MIT licensed and runs on Python 3.10+.

## Links

- [Homepage](https://github.com/motleyai/slayer)
- [Website](https://motley.ai/slayer)
- [Documentation](https://docs.motley.ai/slayer/)
- [GitHub Repository](https://github.com/MotleyAI/slayer)
- [Discord Community](https://discord.gg/egWxMctHCA)
- [PyPI Package](https://pypi.org/project/motley-slayer/)

---
Source: https://selfhost.directory/project/slayer