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
Enable or disable all AI features globally
Show AI button in the title bar
Panel position: "left", "right", or "bottom"
Default panel width in pixels (for left/right dock)
Default panel height in pixels (for bottom dock)
Initial view: "agent", "text_thread", or "history"
notify_when_agent_waiting
When to notify: "always", "never", or "unfocused"
play_sound_when_agent_done
Play sound when agent completes a response
Require cmd/ctrl to send messages (Enter for newline)
Minimum lines in message editor
Show token usage and timing statistics
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 AllowExecute without confirmation:
- No dialogs
- Immediate execution
- Logged for review
Best for: Safe, read-only operations DenyBlock execution:
- Never allowed
- Agent notified
- No user interaction
Best for: Dangerous operations
| Tool | Purpose | Recommended Permission |
|---|
read_file | Read file contents | allow |
edit_file | Modify files | confirm |
write_file | Create new files | confirm |
delete_file | Delete files | confirm |
terminal | Run shell commands | confirm |
search | Search code | allow |
list_directory | Browse files | allow |
Pattern Matching
Patterns use regex syntax. Escape special characters with \\.
Pattern precedence (highest to lowest):
always_deny - Blocks even if allowed
always_confirm - Requires approval
always_allow - Skips confirmation
- Tool
default - Fallback for tool
- 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
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
Maximum tokens in response (model-dependent)
Nucleus sampling threshold (0.0-1.0)
Top-k sampling (provider-dependent)
Edit Predictions (Completions)
Configure AI code completions:
{
"edit_predictions": {
"provider": "zed_cloud",
"enabled": true,
"debounce_ms": 300
}
}
Completion Settings
Enable/disable code completions
provider
string
default:"zed_cloud"
Provider: "zed_cloud", "ollama", or "openai_compatible_api"
Milliseconds to wait before requesting completion
Show completions as ghost text
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
Executable to run the server
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