Skip to main content

Command Palette

Search for a command to run...

How to design safe tool permissions for AI agents in production apps

Updated
1 min readView as Markdown
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 →

More from this blog

O

OTF — kits your AI coding agent can ship to production

493 posts

Engineering notes on shipping production apps with AI coding tools — Claude Code, Cursor, Codex, Lovable, Bolt — and the stack underneath: React Native, Expo, Next.js, Supabase. Honest takes on what works, what breaks, and the full-stack kits that get you to production faster. By OTF.