File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55
66Sanitise agent-written SQL for multi-tenant DBs.
77
8- You provide a tenant ID, and the agent supplies the query.
8+ 1 . Agents prefer code to tools
9+ 2 . Security is important
10+ 3 . [ LLMs (and humans) are dumb] ( https://x.com/BenjDicken/status/2035821666170008046 )
11+
12+ Rather than write hundreds of tools for your deployed agent, just give it one: ` executeQuery ` .
13+ Then let ` agent-sql ` sanitise those queries to stop it from doing anything dangerous (or dumb).
14+ Primarily targeting deployed agents, but you should get your coding harness to use it too.
915
1016Apparently this is how [ Trigger.dev does it] ( https://x.com/mattaitken/status/2033928542975639785 ) .
1117And [ Cloudflare] ( https://x.com/thomas_ankcorn/status/2033931057133748330 ) .
@@ -22,11 +28,11 @@ agent-sql works by fully parsing the supplied SQL query into an AST and transfor
2228- ** ` JOIN ` s added:** if needed to reach the guard tenant tables (save on tokens).
2329- ** No sneaky joins:** no ` join secrets on true ` . We have your back.
2430
25- ## What's next
31+ ## Coming soon
2632
27- - [ ] Support ` INSERT ` , ` UPDATE ` , even ` DROP TABLE ` as user-configurable options
33+ - [ ] Configurable support for ` INSERT ` , ` UPDATE ` , even ` DROP TABLE `
2834- [ ] Support CTEs, subqueries and more, once they can be fully hardened
29- - [ ] Skills for common harnesses
35+ - [ ] Plugins/hooks for common harnesses
3036
3137## Quickstart
3238
You can’t perform that action at this time.
0 commit comments