Dev.to
7/28/2026

Deep Agents Filesystem Permissions: A Beginner-Friendly Guide with 3 Python Examples
Short summary
This tutorial explains how to use Deep Agents' FilesystemPermission rules to safely constrain what AI agents can read and write on disk. It walks through three runnable Python examples: a workspace agent blocked from secret files, a memory agent requiring human approval for sensitive writes, and a parent/subagent pair with split read-write privileges. The guide covers the permission model, glob patterns, and the critical gotcha that permissions are opt-out by default.
- •FilesystemPermission rules let you declaratively control which paths AI agents can access
- •Three runnable examples: workspace confinement, human-approval gating, and parent/subagent split privileges
- •Permissions are opt-out by default — without a catch-all deny rule, unmatched calls are allowed
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



