SLayer, a semantic layer maintained by your agent
Hello HN! If you want to connect your agent to a database (say, to build a data analyst chatbot or any kind of agentic app) today you have 2 options: an SQL MCP server or a semantic layer. SQL MCP is the easiest path to setup, especially if you also have a .md knowledge base which the agent can update. It gets quite messy quickly though, especially if there's many interactions or DB is large. Generated SQL is hard to review if you want to understand where the numbers came from, and related queries can be hard to align and compare. The natural alternative is a semantic layer, which is an…
In plain words
SLayer is a semantic layer that connects AI agents to databases for building applications like data analyst chatbots. Rather than generating raw SQL, it provides a structured interface with data models, measures, dimensions, and filters that handle database queries behind the scenes. This approach makes generated queries easier to review and compare, and reduces complexity when managing large databases or frequent interactions. It's designed for developers building agentic applications that need reliable, auditable database access.
written from the facts on this page · September 2026
From the sources
In the maker’s words, at launch
Hello HN! If you want to connect your agent to a database (say, to build a data analyst chatbot or any kind of agentic app) today you have 2 options: an SQL MCP server or a semantic layer. SQL MCP is the easiest path to setup, especially if you also have a .md knowledge base which the agent can update. It gets quite messy quickly though, especially if there's many interactions or DB is large. Generated SQL is hard to review if you want to understand where the numbers came from, and related queries can be hard to align and compare. The natural alternative is a semantic layer, which is an inventory of what data is available/useful (data models) and an interface for querying it using a structured DSL — usually a list of measures, dimensions, filters, with joins etc. handled under the hood. When we needed a semantic layer at Motley for connecting to our customers' data, we first settled on Cube with custom wiring for multi-tenancy and updating the models on the fly. We quickly hit some limitations which led us to realize existing semantic layers just weren't built for the purpose: they're still a part of the BI world where you want an efficient backend for an essentially static set of human-curated dashboards, whereas agents need to iterate their way to the answer, learning in the process. That's when we built the first version of SLayer, which is now open-source. Using either SLayer MCP or CLI, agents (and humans) can: - Explore models, run queries, connect to multiple databases - Edit columns/measures or create new ones - Create custom models from SQL or from a query on other models - Learn from interactions: save and retrieve natural-language memories linked to models, columns or queries, to form a knowledge base Agents evolve the semantic layer, reuse the results of past interactions, and make fewer mistakes going forward. A few more features: - Auto-creation of models from introspecting your DB schema for a warm start - Embeddability — doesn't need a server running - Python client for doing data analysis with dataframes - Schema drift detection and handling - Expressive DSL with compact, natural representations for arbitrarily deep multistage queries, custom aggregations, time shifts, combining metrics from multiple models, and other features that are tricky to get right in raw SQL On the roadmap: access controls, caching, and more. Repo: https://github.com/MotleyAI/slayer Docs: https://motley-slayer.readthedocs.io/en/latest/
More ai this month
the category →
I trained a 125M-parameter transformer to autocomplete piano performances in real time (~108 notes/sec on an iPhone 15). The idea is basically GitHub Copilot or Tabnine, except instead of prompting it with code, you prompt it by playing a few notes on a MIDI piano. The model then continues what you played, entirely on-device. The app is free if anyone wants to try it. Happy to answer questions about the model, training, Core ML, or the many things that didn't work.
AI · 17d ago · simedw.com
Astute▲585Automate your B2B brand going viral, with new media creators
AI · 18d ago · company-app.joinastute.com


Hey HN, Henry from Cactus here! We previously released Cactus Needle, a 14MB agentic LLM for tool call, device use, and structured extraction for phones, wearables, smart homes, small robots and microcontrollers. We got really great feedback here, and have now incorporated the suggestions to release Needle 2. The whole model is a single 14MB binary that runs a full session in 28MB of RAM; 45m parameters at 2bit compression. Needle hits 500 tokens/sec decode speed on a Raspberry Pi 5, sits between 400-1,500 tokens/sec on VR devices like Meta Quest 3S and Apple Vision Pro, and ranges…
AI · 26d ago · cactuscompute.com


Launched alongside, May 2026
the whole month →

Parallel agents, diff reviewer, and multi-model comparisons
Dev tools · May 2026 · kilo.ai


- NW
Hey HN, Henry here from Cactus. We open-sourced Needle, a 26M parameter function-calling (tool use) model. It runs at 6000 tok/s prefill and 1200 tok/s decode on consumer devices. We were always frustrated by the little effort made towards building agentic models that run on budget phones, so we conducted investigations that led to an observation: agentic experiences are built upon tool calling, and massive models are overkill for it. Tool calling is fundamentally retrieval-and-assembly (match query to tool name, extract argument values, emit JSON), not reasoning. Cross-attention…
Life & fun · May 2026 · github.com
- FM
Dev tools · May 2026 · github.com