Skip to main content
Customize Glass’s AI capabilities to match your workflow. This guide covers all available configuration options.

Settings Location

AI settings are configured in your Glass settings file:
~/.config/zed/settings.json
Open with cmd-, (macOS) or ctrl-, (Linux/Windows).

Agent Settings

Core agent configuration:
{
  "agent": {
    "enabled": true,
    "button": true,
    "dock": "right",
    "default_width": 400,
    "default_height": 600,
    "default_view": "agent"
  }
}

Setting Descriptions

enabled
boolean
default:true
Enable or disable all AI features globally
button
boolean
default:true
Show AI button in the title bar
dock
string
default:"right"
Panel position: "left", "right", or "bottom"
default_width
number
default:400
Default panel width in pixels (for left/right dock)
default_height
number
default:600
Default panel height in pixels (for bottom dock)
default_view
string
default:"agent"
Initial view: "agent", "text_thread", or "history"
notify_when_agent_waiting
string
default:"always"
When to notify: "always", "never", or "unfocused"
play_sound_when_agent_done
boolean
default:true
Play sound when agent completes a response
use_modifier_to_send
boolean
default:false
Require cmd/ctrl to send messages (Enter for newline)
message_editor_min_lines
number
default:3
Minimum lines in message editor
show_turn_stats
boolean
default:false
Show token usage and timing statistics

Tool Permissions

Configure how agent tools are authorized:
{
  "agent": {
    "tool_permissions": {
      "default": "confirm"
    }
  }
}

Permission Modes

Confirm (default)Show approval dialog before execution:
  • Review operation details
  • Approve or deny
  • Remember choice for session
Best for: Most operations

Available Tools

ToolPurposeRecommended Permission
read_fileRead file contentsallow
edit_fileModify filesconfirm
write_fileCreate new filesconfirm
delete_fileDelete filesconfirm
terminalRun shell commandsconfirm
searchSearch codeallow
list_directoryBrowse filesallow

Pattern Matching

Patterns use regex syntax. Escape special characters with \\.
Pattern precedence (highest to lowest):
  1. always_deny - Blocks even if allowed
  2. always_confirm - Requires approval
  3. always_allow - Skips confirmation
  4. Tool default - Fallback for tool
  5. Global default - System-wide fallback

Security Rules

Glass has hardcoded security rules that cannot be overridden:
  • rm -rf / and variants
  • rm -rf ~ and variants
  • rm -rf $HOME and variants
These are always blocked regardless of settings.

Model Parameters

Fine-tune model behavior:
{
  "agent": {
    "model_parameters": [
      {
        "provider": "anthropic",
        "model": "claude-4.6-sonnet",
        "temperature": 0.7
      },
      {
        "provider": "openai",
        "temperature": 0.3
      }
    ]
  }
}

Parameter Reference

temperature
number
Randomness in responses (0.0-2.0):
  • Lower (0.0-0.3): Focused, deterministic
  • Medium (0.4-0.8): Balanced
  • Higher (0.9-2.0): Creative, varied
max_tokens
number
Maximum tokens in response (model-dependent)
top_p
number
Nucleus sampling threshold (0.0-1.0)
top_k
number
Top-k sampling (provider-dependent)

Edit Predictions (Completions)

Configure AI code completions:
{
  "edit_predictions": {
    "provider": "zed_cloud",
    "enabled": true,
    "debounce_ms": 300
  }
}

Completion Settings

enabled
boolean
default:true
Enable/disable code completions
provider
string
default:"zed_cloud"
Provider: "zed_cloud", "ollama", or "openai_compatible_api"
debounce_ms
number
default:300
Milliseconds to wait before requesting completion
show_inline
boolean
default:true
Show completions as ghost text
show_in_menu
boolean
default:true
Show completions in popup menu

Agent Profiles

Create custom agent configurations:
{
  "agent": {
    "default_profile": "write",
    "profiles": {
      "write": {
        "default_model": {
          "provider": "anthropic",
          "model": "claude-4.6-sonnet"
        },
        "system_prompt": "You are a helpful coding assistant focused on writing clean, maintainable code."
      },
      "review": {
        "default_model": {
          "provider": "openai",
          "model": "o1"
        },
        "system_prompt": "You are a code reviewer focused on finding bugs and suggesting improvements."
      },
      "fast": {
        "default_model": {
          "provider": "openai",
          "model": "gpt-4o-mini"
        }
      }
    }
  }
}

Context Servers

Configure Model Context Protocol (MCP) servers:
{
  "context_servers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/project"]
    }
  }
}

Server Configuration

command
string
required
Executable to run the server
args
array
Command-line arguments
env
object
Environment variables
required
boolean
default:false
Whether agent requires this server

Agent Servers

Configure external agents via Agent Client Protocol:
{
  "agent_servers": {
    "claude-code": {
      "command": "npx",
      "args": ["-y", "@anthropic/claude-code"],
      "env": {
        "ANTHROPIC_API_KEY": "your-key"
      }
    },
    "gemini": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-gemini"],
      "env": {
        "GEMINI_API_KEY": "your-key"
      }
    }
  }
}

Language-Specific Settings

Override AI settings per language:
{
  "languages": {
    "Python": {
      "edit_predictions": {
        "enabled": true
      },
      "agent": {
        "inline_assistant_model": {
          "provider": "anthropic",
          "model": "claude-4.6-sonnet"
        }
      }
    },
    "Rust": {
      "edit_predictions": {
        "enabled": false
      }
    }
  }
}

Experimental Features

Enable experimental AI features:
{
  "experimental": {
    "ai_enabled_languages": ["*"],
    "enable_semantic_search": true,
    "enable_context_servers": true,
    "enable_agent_tool_streaming": true
  }
}
Experimental features may be unstable or change without notice.

Complete Example

Comprehensive AI configuration:
{
  "agent": {
    "enabled": true,
    "button": true,
    "dock": "right",
    "default_width": 450,
    "default_model": {
      "provider": "anthropic",
      "model": "claude-4.6-sonnet"
    },
    "inline_assistant_model": {
      "provider": "openai",
      "model": "gpt-4o-mini"
    },
    "thread_summary_model": {
      "provider": "openai",
      "model": "gpt-4o-mini"
    },
    "model_parameters": [
      {
        "provider": "anthropic",
        "temperature": 0.7
      }
    ],
    "tool_permissions": {
      "default": "confirm",
      "tools": {
        "read_file": { "default": "allow" },
        "terminal": {
          "default": "confirm",
          "always_deny": [
            { "pattern": "rm\\s+-rf" },
            { "pattern": "sudo" }
          ]
        }
      }
    },
    "notify_when_agent_waiting": "unfocused",
    "play_sound_when_agent_done": true,
    "show_turn_stats": true
  },
  "edit_predictions": {
    "provider": "ollama",
    "enabled": true,
    "ollama": {
      "api_url": "http://localhost:11434",
      "model": "codellama:7b"
    }
  },
  "context_servers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "${workspaceRoot}"]
    }
  }
}

Next Steps

Build docs developers (and LLMs) love