Agent Safehouse operates in two distinct modes depending on whether you provide a command to execute.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/eugene1g/agent-safehouse/llms.txt
Use this file to discover all available pages before exploring further.
Policy Mode
Generates a sandbox policy file without executing a command. Use this mode when you want to inspect the policy or pass it to your ownsandbox-exec invocation.
Print Policy Path
Print Policy Content
Policy mode is useful for:
- Inspecting generated policies before execution
- Debugging sandbox behavior
- Creating reusable policy files
- Understanding what permissions are granted
Execute Mode
Generates a sandbox policy and immediately executes the specified command inside that sandbox.Basic Execution
-- separator is recommended to clearly distinguish policy options from command arguments.
Examples:
Execution Without Separator
-- if the command is unambiguous (doesn’t start with --).
Example:
Explain Mode
Debugging mode that prints detailed information about policy decisions to stderr.- Effective workdir and its source (flag, env, or default)
- Path grants (read-only and read-write)
- Selected agent profiles
- Integration selections and reasons
--explain is invaluable for troubleshooting:- Why certain files are accessible/inaccessible
- Which profiles are being loaded
- Where configuration values come from
Common Usage Patterns
Quick Testing
Development Workflow
CI/CD Integration
Debugging
Command Resolution
Safehouse automatically detects the command being executed and loads appropriate agent profiles:Supported Wrappers
Safehouse looks through these wrapper commands to find the actual target:npxbunxuvxpipxxcrun
For wrappers, safehouse uses the second argument (the actual command name) for profile selection.