Permissions

Control how much autonomy your agent has. Explore mode is read-only, Ask to Edit prompts before changes, and Execute mode runs without prompts.

Permission Modes

TorlyAI has three permission modes that control how much autonomy the agent has during a session. You can change modes at any time using SHIFT+TAB.

๐Ÿ”

Explore

Safe Mode

Read-only mode. The agent can read files, search code, and analyze data, but cannot make any changes. Best for exploring unfamiliar codebases or sensitive data.

Blocked: File writes, bash commands that modify state, API mutations

โœ‹

Ask to Edit

Default

The agent will ask for permission before executing bash commands or making changes. You review each action before it runs.

Prompts for: Bash commands, file modifications, API calls

โšก

Auto

Full Trust

The agent runs commands automatically without prompting. Use this when you fully trust the agent and want maximum speed.

Auto-approves: All operations within configured safety rules

Safety Rules

Even in Auto mode, certain safety rules are always enforced. You can customize these rules at the workspace or source level.

Configuration Levels

  • Workspace: ~/.torlyai/workspaces/{id}/permissions.json
  • Source: ~/.torlyai/workspaces/{id}/sources/{slug}/permissions.json

Rule Types

{
  // Tools that are completely blocked
  "blockedTools": ["dangerous_tool"],

  // Regex patterns for allowed read-only bash commands
  "allowedBashPatterns": ["^ls", "^cat", "^grep"],

  // Regex patterns for allowed MCP tools
  "allowedMcpPatterns": ["github_.*", "linear_.*"],

  // Fine-grained API endpoint rules
  "allowedApiEndpoints": [
    { "method": "GET", "pathPattern": "/api/.*" }
  ],

  // Glob patterns for writable directories
  "allowedWritePaths": ["/projects/**", "/tmp/**"]
}

Best Practices

  • Start in Ask to Edit mode until you're comfortable
  • Use Explore mode for unfamiliar codebases
  • Only use Auto mode for trusted, well-defined tasks
  • Configure source-specific permissions for external integrations