Hoshang07
How to safely let LLMs query your databases via sandboxed materialized views
Most AI agents need access to structured data (CRMs, databases, warehouses), but giving them database access is a security nightmare. Here's a layered architecture that addresses this:
Layer 1: Data Sources Your raw data repositories (Salesforce, PostgreSQL, Snowflake, etc.). Traditional ETL/ELT approaches to clean and transform it needs to be done here.
Layer 2: Agent Views (The Critical Boundary) Materialized SQL views that are sandboxed from the source acting as controlled windows for LLMs to access your data. You know what data the agent needs to perform it's task. You can define exactly the columns agents can access (for example, removing PII columns, financial data or conflicting fields that may confuse the LLM)
These views: • Join data across multiple sources • Filter columns and rows • Apply rules/logic
Agents can ONLY access data through these views. They can be tightly scoped at first and you can always optimize it's scope to help the agent get what's necessary to do it's job.
Layer 3: MCP Tool Interface Model Context Protocol (MCP) tools built on top of agent data views. Each tool includes: • Function name and description (helps LLM select correctly) • Parameter validation i.e required inputs (e.g customer_id is required) • Policy checks (e.g user A should never be able to query user B's data)
Layer 4: AI Agent Layer Your LLM-powered agent (LangGraph, Cursor, n8n, etc.) that: • Interprets user queries • Selects appropriate MCP tools • Synthesizes natural language responses
Layer 5: User Interface End users asking questions and receiving answers (e.g via AI chatbots)
The Flow: User query → Agent selects MCP tool → Policy validation → Query executes against sandboxed view → Data flows back → Agent responds
Agents must never touch raw databases - the agent view layer is the single point of control, with every query logged for complete observability into what data was accessed, by whom, and when.
This architecture enables AI agents to work with your data while maintaining: • Complete security and access control • Reduces LLMs from hallucinating • Agent views acts as the single control and command plane for agent-data interaction • Compliance-ready audit trails
If you're building agents that touch sensitive customer information stored across your data stack, Pylar can help!
SQL IDE that converts data views into MCP tools
Show HN: Pylar – Fix over-querying, data leaks, and governance for AI agents
Hey HN! We're Hoshang & Vishal, the team behind Pylar - a governed access layer between databases and LLMs. We previously led data and AI and we kept seeing the same problem across teams using LLMs internally: agents are great with unstructured data, but the moment you want them touching your actual systems of record — Snowflake, Postgres, CRMs, product DBs — everything becomes fragile,...
Designing RBAC for AI Agents
A $5 Domain Purchase Exposed Critical AI Agent Security Flaws – Deep Dive
Structured data access layer for AI agents
The goal’s to share what’s actually working: use cases, architecture ideas, prompt design, and maybe a few fails too.
If you’re building agents for analytics, internal ops, or workflow automation inside your company — would love to have you join.
The AI Localhost
AI agents + Data warehouses- How to make them talk safely?
Ask HN: Non-career ending way to let agents touch internal structured data?
right now i wouldn’t trust an ai agent anywhere near my warehouse with raw sql. too risky. what i really want is simple: let the agent only “search” a safe view that i define.. say a join of customers, tickets, and product events.. instead of having free rein over every table.the approach i’m experimenting with is: i build a malloy model of that view (so it’s more graph-like and semantic), then...
Show HN: Schema aware AI to build data products
hey hn — we’re hoshang & vishal, co-founders of airbook. it’s an ai-native workspace to build notebooks, dashboards, or even lightweight data apps — all from one place (https://www.airbook.io)we used to run ops and analytics at saas startups and constantly found ourselves juggling 10 tools just to get one thing done - exploration in a notebook, kpis in a dashboard, and re-usable scripts or...
Show HN: Airbook – Cursor for Analytics
Hi HN - We’re Hoshang & Vishal from Airbook (https://www.airbook.io) - An AI native workspace to do all your analytics work in one place.Airbook automatically syncs, cleans and centralizes all your data scattered across HubSpot, Amplitude, GA4, Zendesk, Stripe, Postgres, Snowflake and more - You can then use Airbook AI to build powerful interactive reports and unified dashboards.Here's a...
(the old link still works too)
Show HN: A Startup Ops Simulation Game Using Claude
Data Notebook for GTM Analytics
RevOps and Data when scaling from Seed to Series C+
PLG Funnel Overview
Airbook – The Modular Data Workspace for Startups
We've been working on Airbook, a tool that helps teams turn their data notebooks into fully functional CDPs—instantly.
Most companies either struggle with fragmented customer data or spend months engineering a homegrown solution.
We thought: what if you could just use the data notebooks you already have?
With Airbook, you can:
Connect to your existing data stack (dbt, BigQuery, Snowflake, Salesforce etc.) Define customer identities, audiences and segments dynamically Sync insights to downstream tools to trigger growth campaigns—without custom pipelines
We'd love to hear your thoughts!
Convert your data notebook to CDP instantly
The Effect of Dark Mode on Honesty
Show HN: Power Growth Campaigns from Your BI Dashboards
Hello HN! I'm Hoshang, Co-founder of Airbook.We're a team of former data and ops leaders who often struggled with a fragmented analytics landscape—various specialized tools for data pipelines, SQL explorers, BI dashboards, and ad-hoc automation scripts.These tools, tailored for distinct skill sets, unfortunately failed to integrate effectively, leaving valuable insights isolated within...