Skip to main content

How do you limit what an agent can do?

Responsible AI and governance · Pro 1

Short answer

Give it the least privilege it needs: scoped credentials per tool, read-only access by default, allow-lists for commands, domains and file paths, and separate credentials per user rather than one admin key. Run code and browsing in a sandbox such as a container with no secrets and limited network. Gate irreversible actions with human approval and log everything.

Deeper answer

The OWASP Top 10 for LLM applications calls the risk 'excessive agency': too much functionality, permission or autonomy. Prompt injection turns that into a real attack, because any document or web page the agent reads could try to steer it.

So assume the model can be tricked, and make the damage small: no tool should be able to do more than the user could do themselves, and destructive operations should be impossible without a person.

What a strong answer covers

Answer it out loud in the mock interview about 1.5 min

Follow-ups to expect

Common mistakes

Learn it

Permissions and sandboxing

Today's AI turns are used

Lessons, roadmaps, videos, practice cards and the code playground stay free with your account, with no limit.