Tool in depth
Datasette Agent hides a tool from the model when the user may not use it
Simon Willison's chat agent for Datasette is still in alpha. Its README documents how to put an LLM inside an app that already has users, permissions and a write path, and four of its decisions carry over to any agent you build into your own software.