Policy Profiles Guide
This guide explains the different policy profiles available in examples/policies/ and when to use each one. Each profile demonstrates different security tiers and is optimized for specific agent types and use cases.
Overviewβ
Policy profiles define security rules that control which tools agents can execute and under what conditions. They use a combination of:
- Approval modes:
yolo,autoEdit, orask - Priority levels:
admin(highest),user,default(lowest) - Glob patterns: Match tool names and arguments
- Actions:
allow,deny, orask_user
Available Profilesβ
1. Permissive Policy (permissive-policy.toml)β
Security Level: Low (Maximum Automation)
Approval Mode: yolo - Auto-approves all operations
Use Case:
- Local development with trusted agents
- Rapid prototyping and experimentation
- When you want maximum automation with minimal friction
Characteristics:
- Allows all file operations (read and write)
- Allows safe shell commands (git, cargo, npm)
- Still blocks dangerous operations (rm -rf, sudo)
- Allows MCP tools
Trade-offs:
- β Maximum speed and automation
- β Minimal user interaction required
- β οΈ Lower security - agents can make changes without approval
- β οΈ Risk of unintended modifications
Recommended For:
- Personal development projects
- Trusted development environments
- Rapid iteration workflows
2. Balanced Policy (balanced-policy.toml)β
Security Level: Medium (Balanced Security and Usability)
Approval Mode: autoEdit - Auto-approves edit operations, asks for others
Use Case:
- General development with safety guards
- When you want automation for common operations but oversight for unusual ones
- Team development environments
Characteristics:
- Allows all read operations
- Auto-approves file edit operations (write_file, edit_file)
- Requires approval for other write operations
- Allows safe shell commands (git, cargo, test)
- Blocks dangerous operations (rm -rf, sudo)
- Requires approval for MCP tools
Trade-offs:
- β Good balance of automation and safety
- β Common operations are streamlined
- β Unusual operations require approval
- β οΈ Some operations still require manual approval
Recommended For:
- General development workflows
- Team environments
- Most common use cases
3. Strict Policy (strict-policy.toml)β
Security Level: High (Maximum Security)
Approval Mode: ask - Requires approval for all operations
Use Case:
- Production-like environments
- When maximum security is required
- Review-heavy workflows
Characteristics:
- Allows only read operations
- Denies all file writes
- Denies all shell commands
- Denies all MCP tools
- Requires approval for everything else
Trade-offs:
- β Maximum security and control
- β All operations are reviewed
- β οΈ High friction - many approvals required
- β οΈ Slower workflow due to approval requirements
Recommended For:
- Production environments
- Security-critical projects
- When you need complete oversight
4. Research Profile (research-profile.toml)β
Security Level: High (Read-Only)
Approval Mode: ask - Requires approval for non-read operations
Use Case:
- Research agents (e.g.,
research-agent) - Code exploration and documentation search
- When agents should only read, never modify
Characteristics:
- Allows all read operations (read_file, codebase_search, grep, list_dir)
- Denies all write operations (write_file, search_replace, delete_file)
- Denies all shell commands
- Denies network operations
- Denies MCP tools with side effects
Trade-offs:
- β Maximum safety for exploration
- β Prevents accidental modifications
- β Ideal for research and analysis agents
- β οΈ Cannot make any changes (by design)
Recommended For:
research-agent- Read-only code explorationanalyzer-agent- Static analysis without modificationsreviewer-agent- Code review without changes
Agent Mapping:
research-agent- Perfect matchanalyzer-agent- Good match (analysis only)reviewer-agent- Good match (review only)
5. Execution Profile (execution-profile.toml)β
Security Level: Medium-High (Write-Enabled with Guards)
Approval Mode: ask - Requires approval for write operations
Use Case:
- Execution agents (e.g.,
executor-agent) - Code generation and file modifications
- When agents need to write but with oversight
Characteristics:
- Allows read operations for code understanding
- Requires approval for file writes and edits
- Allows safe build and test commands
- Blocks dangerous operations (rm -rf, sudo, production access)
- Blocks external API calls
- Requires approval for MCP tools
Trade-offs:
- β Allows necessary write operations
- β Blocks dangerous operations automatically
- β Requires approval for writes (safety guard)
- β οΈ Write operations require manual approval
Recommended For:
executor-agent- Code generation and modifications- Development workflows requiring code changes
- When you need write access with safety
Agent Mapping:
executor-agent- Perfect match
Profile Comparisonβ
| Profile | Approval Mode | Read | Write | Shell | Security | Automation |
|---|---|---|---|---|---|---|
| Permissive | yolo | β Allow | β Allow | β Allow (safe) | Low | High |
| Balanced | autoEdit | β Allow | β οΈ Auto-approve edits | β Allow (safe) | Medium | Medium |
| Strict | ask | β Allow | β Deny | β Deny | High | Low |
| Research | ask | β Allow | β Deny | β Deny | High | Low |
| Execution | ask | β Allow | β οΈ Ask | β Allow (safe) | Medium-High | Medium |
Choosing a Profileβ
For Agent Typesβ
- Research Agent β Use
research-profile.toml - Analyzer Agent β Use
research-profile.toml(analysis only) - Executor Agent β Use
execution-profile.toml - Reviewer Agent β Use
research-profile.toml(review only)
For Workflowsβ
- Rapid Development β Use
permissive-policy.toml - General Development β Use
balanced-policy.toml - Production/Review β Use
strict-policy.toml - Code Exploration β Use
research-profile.toml - Code Generation β Use
execution-profile.toml
Applying a Profileβ
To apply a policy profile to your workspace:
# Copy the profile to your workspace policy file
cp examples/policies/balanced-policy.toml .radium/policy.toml
# Or use the policy template system (if available)
rad policy templates apply balanced-policy
Customizing Profilesβ
You can customize any profile by:
- Copying the profile to
.radium/policy.toml - Modifying rules to match your specific needs
- Adding custom rules for your tools and workflows
- Adjusting priorities to change rule evaluation order
Glob Pattern Examplesβ
Profiles use glob patterns to match tools and arguments:
Tool Patternsβ
read_*- Matches all tools starting with "read_"write_*- Matches all tools starting with "write_"mcp_*- Matches all MCP tools*- Matches all tools
Argument Patternsβ
git *- Matches commands starting with "git"cargo *- Matches commands starting with "cargo"rm -rf *- Matches dangerous deletion commands* production *- Matches any command containing "production"
Security Best Practicesβ
- Start Strict: Begin with
strict-policy.tomland relax rules as needed - Use Agent-Specific Profiles: Match profiles to agent capabilities
- Review Rules Regularly: Periodically review and update policy rules
- Test Policies: Use
rad policy checkto test tool execution - Document Custom Rules: Add comments explaining custom rules