SLayer - an open-source semantic layer for AI agents.
The usual argument for giving agents more context is that it helps them write better SQL. SLayer takes a different angle: the problem isn't that agents write bad SQL, they're generally fine at that, it's that they don't know which SQL answers the question, so they guess, and the guess looks just as confident as a correct one. Same question, different query, sometimes a different number.
Instead of feeding the agent more context and hoping it reasons its way to the right query, SLayer gives it a governed set of pre-defined metrics to call. The agent still picks what it needs, but it never decides what "revenue" means or which tables to join, so the same question always returns the same, traceable answer.
Built by the team behind Motley, running as a library, CLI, or MCP/REST interface, no separate service required.
GitHub: github.com/MotleyAI/slayer
X: x.com/usemotley
Website: motley.ai/slayer


