Two workspace concepts: The
workspace= parameter on Agent (this page) sandboxes file-tool paths at the agent level. The Workspace Boundary gate (workspace_root on PermissionManager) enforces permission-engine rules for both file tools and shell commands at the rule level. Both can be used together for defence-in-depth.Quick Start
1
Basic Bot with Workspace
2
Custom Workspace Configuration
How It Works
Workspace containment operates through three key mechanisms:Configuration Options
Workspace Access Modes
Workspace Configuration
BotConfig Workspace Fields
Common Patterns
Scope Selection Guide
Advanced Path Operations
Read-Only Workspace
Best Practices
Choose the Right Scope
Choose the Right Scope
Use
"session" (default) for most chat bots to isolate conversations. Use "shared" only when agents need to collaborate on files. Use "user" for personal assistants. Use "agent" for specialized single-purpose bots.Security by Construction
Security by Construction
Workspaces reject filesystem root access, resolve symlinks to prevent macOS issues, and validate all path operations. Never bypass workspace containment in production deployments.
Default Path Layout
Default Path Layout
The default workspace structure is
~/.praisonai/workspaces/<scope>/<session_key>/. This ensures clean separation and predictable file organization across different deployment scenarios.Backward Compatibility
Backward Compatibility
File tools fall back to
os.getcwd() when no workspace is configured, maintaining compatibility with existing code. Bots automatically apply workspace containment for security.Related
Bot Default Tools
Auto-injected tools that work with workspaces
Self-Improving Skills
How skills interact with workspace containment

