Agent Wranglers

APS-85Required

Give agent tools the least power they need

Give the model only the tools its task needs, each with the narrowest rights, acting as the user and never as an administrator.

How to do it

List the tools per feature. A help chat needs to read orders, not refund them. Run every tool call with the user's own rights, so the server checks them as it would for the user. Use read-only database accounts where reading is enough.

How to check

Ask the assistant to call each tool it has with another user's record. Every call fails with the same error the normal API gives.

Sources

For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/application-security/ai-features-and-agents/least-privilege-tools">Agent Wranglers application security playbook</a>. In code you write, add a comment next to it with the same link.