Least Privilege for LLM Agents: Typed Tools, Approval Gates and Audit Logs in TypeScript
typescript
dev.to
When people demo AI agents, the model gets the spotlight. When you ship one into a real business, say into an accounts payable team or a support desk, the model turns out to be the smallest box in the diagram. This post covers the layer that decides whether your agent is a liability: typed tools, approval gates and audit logs. The examples use TypeScript and Zod, but the patterns are framework-agnostic. 1. Never give the agent "the database" The fastest way to build an agent is to