How to design safe tool permissions for AI agents in production apps
The model is not the authority
An AI agent can choose a tool, fill in arguments, and explain what it intends to do. None of those things make it authorized to perform the action.
That distinction matters as soon as an agent can access customer records, create invoices, update a project, send a message, or call an external service. A helpful demo often gives the model a broad function such as runAction and trusts the model to decide when it is appropriate. A production application cannot make that the security boundary.
Treat the model as an untrusted decision-maker inside a user session. The application must authenticate the user, check authorization, validate the tool arguments, enforce limits, and record the outcome independently of the model’s reasoning.
This is an excerpt. Read the full post at otf-kit.dev/blog/safe-ai-agent-tool-permissions — full-stack kits your AI coding agent can actually ship to production. Browse the kits →
