60-second card
Guardrails
Guardrails limit what an agent can do, so mistakes and attacks can't cause real damage.
- Least privilege: give only the tools and access the task needs.
- Ask a person to approve risky actions (send, pay, delete).
- Treat text from web pages and tools as data, never as instructions.
allowed = {"search", "read_file"}
requested = ["search", "delete_file", "read_file"]
print([t for t in requested if t in allowed])Prints
['search', 'read_file']Remember: The more an action can't be undone, the more checks it needs.
Common mistake: Giving an agent admin access 'to save time'.