frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Non-career ending way to let agents touch internal structured data?

2•Hoshang07•1h ago
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 i generate custom mcp tools on top of it. those tools basically act as guardrails - the agent can only call “get_customer_tickets” or “fetch_usage_events” instead of writing arbitrary queries. These tools are embedded into my malloy model so it's not really a sql query its firing on that view, instead it's searching by filtering from my view. finally, i give access to those tools into my agent builder.

this feels cleaner and safer, but i'm new to this and not sure if this is the right pattern. is anyone here tackling this differently? are there any efficient ways to give agents scoped, governed access to internal data without shooting yourself in the foot? what are some more things i should consider here?

Comments

raxxorraxor•1h ago
I currently don't allow agents to write arbitrary queries. But if I wanted to, I would probably just use the security model of the DB and give the AI a user that is restricted to data it can access.

AI is fairly apt at writing efficient queries for that matter and I use it a lot for this purpose.

Hoshang07•1h ago
that's a good baseline..db rbac locks scope, but i guess not behavior. inside that schema the agent can still fire off wide scans, weird joins, or grab way more rows than needed.. Ai can write apt queries for sure but there's always a dependancy on the kinda prompt it gets. you may also lose semantic clarity and telemetry .. no way to know if it actually pulled the right data. how would you enforce “only these lookups” or “only these joins” with just db perms? is there a way?
mindcrime•47m ago
> right now i wouldn’t trust an ai agent anywhere near my warehouse with raw sql.

Same. And definitely not with read/write access. But even RO is risky due to the possibility of an unintentional DDOS via a bad query, etc.

> custom mcp tools on top of it. those tools basically act as guardrails - the agent can only call “get_customer_tickets” or “fetch_usage_events” instead of writing arbitrary queries.

This is more or less what I would do, although I would say it's neither here nor there to me whether one uses a view or not. But I'd definitely advocate building dedicated, purpose specific tools, with known queries, and let the agent use those. At least in the near-term.

If it proves too unwieldy to implement all those tools, I might could be convinced to let the agent generate its own queries to use, but I'd insist on a HITL mechanism to have a given query reviwed before it is ever allowed to be executed the first time.

Hoshang07•36m ago
yes.. that makes a lot of sense to me. I'm almost imagining building an evals layer to show which views were useful (or not) for the agent to do it's thing.. so i'd know whether to increase/decrease the scope of the views + further tuning the custom mcp layers. thoughts on how you'd imagine doing this?

The Unfinished Digital Estate: Culture, Law, and Technology After Death

https://openid.net/open-for-comment-the-unfinished-digital-estate/
1•mooreds•30s ago•0 comments

Slice tails don't grow forever

https://flak.tedunangst.com/post/slice-tails-dont-grow-forever
1•GarethX•32s ago•0 comments

Bcachefs goes DKMS after Torvalds' kernel banishment

https://www.theregister.com/2025/09/25/bcachefs_dkms_modules/
1•Bender•54s ago•0 comments

The Long Trip from Silica to Smartphone

https://spectrum.ieee.org/the-long-strange-trip-from-silica-to-smartphone
1•sohkamyung•3m ago•0 comments

The Company Man

https://substack.com/inbox/post/174122758
1•chlorokin•3m ago•0 comments

Apple TV+'s 'The Savant' Delayed Amid Violence

https://www.macrumors.com/2025/09/24/jessica-chastain-the-savant-apple-tv-plus-delay/
1•mgh2•4m ago•0 comments

Seven Years of Firecracker

https://brooker.co.za/blog/2025/09/18/firecracker.html
1•fbuilesv•8m ago•0 comments

How Many Elephants?

http://howmanyelephants.co.uk
1•tagawa•9m ago•0 comments

EU starting registration of fingerprints and faces for short-stay foreigners

https://www.theregister.com/2025/09/25/eu_entry_exit_system/
3•jjgreen•9m ago•0 comments

And 2026 Ultimate Guide to the Data Lakehouse

https://amdatalakehouse.substack.com/p/the-2025-and-2026-ultimate-guide
1•alexmerced•10m ago•1 comments

State Machines to living systems: Design tenets for intelligent systems

https://medium.com/@pacificleo/state-machines-to-living-systems-design-tenets-for-intelligent-sys...
1•pacificleo12•12m ago•0 comments

Reasoning Core: A Scalable RL Environment for LLM Symbolic Reasoning

https://github.com/sileod/reasoning_core
1•dmnsl•14m ago•0 comments

"Screwworm is dangerously close": Flesh-eating parasites just 70 miles from US

https://arstechnica.com/health/2025/09/flesh-eating-parasite-just-70-miles-from-us-check-pets-tex...
2•tomrod•16m ago•0 comments

HSBC Says Quantum Computing Trial Beat Wall Street Rivals

https://www.bloomberg.com/news/articles/2025-09-24/hsbc-says-it-s-beaten-wall-street-rivals-with-...
2•mgh2•16m ago•1 comments

Founder Mode Song (starts at 14:00)

https://www.youtube.com/watch?v=YRddOEtlnEk
1•kevinkatzke•16m ago•0 comments

Widespread Supply Chain Compromise Impacting NPM Ecosystem

https://www.cisa.gov/news-events/alerts/2025/09/23/widespread-supply-chain-compromise-impacting-n...
1•chha•19m ago•0 comments

Cycle: An Open Software Development Methodology

https://github.com/oneapplab/cycle
1•avan1•20m ago•1 comments

A 10x Faster TypeScript

https://github.com/kaleidawave/benchmarks/actions/runs/17978178009
1•bk496•21m ago•0 comments

Apache Gluten

https://gluten.apache.org/
1•Lutzb•22m ago•0 comments

The Richest Man in Germany Is Worth $44B. The Nazis Know Why

https://www.vanityfair.com/news/story/richest-german-nazi-billions
2•doener•23m ago•0 comments

Rooftop solar is in a slump. Are dark days ahead?

https://www.thenewlede.org/2025/09/rooftop-solar-california-utilities-clean-energy/
2•PaulHoule•24m ago•0 comments

Show HN: Planvo – a free goal tracker with social discover and analytics

https://www.planvo.xyz/
1•tumaki88•25m ago•0 comments

Woman in Spanish cold case identified after 20 years

https://www.bbc.co.uk/news/articles/cj4yqwnl1q7o
1•scorpion_rain•26m ago•0 comments

AeroSpace: An i3-like tiling window manager for macOS

https://nikitabobko.github.io/AeroSpace/guide
1•fanf2•28m ago•0 comments

The algorithm will see you now

https://worksinprogress.co/issue/the-algorithm-will-see-you-now/
1•dionysou•30m ago•0 comments

The Cause of One of the Deadliest Cancers Might Be Inside Your Mouth

https://www.sciencealert.com/the-cause-of-one-of-the-deadliest-cancers-might-be-inside-your-mouth
3•amichail•30m ago•0 comments

Show HN: Bloom – A Free Screen and Video Recording Software

https://www.thepublic.dev/posts/bloom-new-ui
1•vaneyckseme•31m ago•0 comments

Pascal's Wager

https://en.wikipedia.org/wiki/Pascal%27s_wager
2•simonebrunozzi•32m ago•0 comments

Martin Heidegger: The Question Concerning Technology [pdf]

https://www2.hawaii.edu/~freeman/courses/phil394/The%20Question%20Concerning%20Technology.pdf
1•doener•36m ago•1 comments

Microsoft makes Windows 10 extended security updates free in EEA

https://www.windowscentral.com/microsoft/windows-10/major-backtrack-as-microsoft-makes-windows-10...
3•kirenida•37m ago•0 comments