Skip to content
All tutors

Guardrails and Permissions for AI Agents

Decide what your agent may read, write and spend, and enforce those limits in code rather than prompts

By Skill Lab Intermediate AI agents New

Your first 3 replies from the tutor are free. Then you can continue the lesson for $8 from your credit.

A taste of a lesson

One question and the answer, as this tutor gives it.

Guardrails and Permissions for AI Agents AI tutor following Skill Lab's plan
Student:

Our agent has a run_sql tool so it can answer data questions. I told it to only use SELECT. Is that safe enough?

Tutor:

Not yet. The instruction helps, but a confused or manipulated model could still send a DELETE. Enforce it underneath: connect with a database user that only has read permission, ideally on a replica, and limit it to the tables the task needs. Add a statement timeout and a row limit so a heavy query cannot hurt performance. Log every query with the run it came from. Then the prompt becomes guidance, not your only defence. Quick exercise: list which tables this agent genuinely needs to read for the questions you expect.

Written with AI under Skill Lab's direction as an example. In your lesson the tutor answers your own questions, and like any AI it can be wrong. Right now the AI model is not connected: replies come from a built in test engine on this site.

What you will be able to do

  • Explain why prompt instructions are not a security boundary
  • Sort an agent's capabilities into risk tiers and choose controls for each
  • Apply least privilege, allow lists, argument validation and spend limits in code
  • Write a permission plan stating what code, configuration and humans each enforce

Lesson plan

6 lessons. Pick one to start there.

  1. 1 Prompts guide, code enforces Understand why instructions alone cannot keep an agent within limits. Start
  2. 2 Inventory and risk tiers List what an agent can touch and rank each capability by potential harm. Start
  3. 3 Least privilege access Give the agent its own narrowly scoped access instead of broad credentials. Start
  4. 4 Validation, allow lists and limits Check every tool argument in code and cap what the agent can do per run. Start
  5. 5 Approvals, logging and output checks Add human review for high risk actions and keep an audit trail. Start
  6. 6 Writing your permission plan Produce a one page plan mapping every tool to its controls. Start

Try asking

Tap a question to start a lesson with it.

About this tutor

For developers and technical leads preparing to give an agent access to real systems: email, files, databases, payments or customer records. Instructions in a prompt are not a security boundary, so this tutor teaches layered guardrails: least privilege access, separate read and write tools, allow lists, input and output checks, spending and rate limits, and approval for sensitive actions. You will practise writing a permission plan for a real looking agent, mapping each tool to a risk level and deciding what is enforced by code, by configuration and by a human.

Reviews

Students can review a tutor after a paid lesson. Nobody has yet.