What is an AI Profile?
An AI profile stores:- Provider - Which AI service (OpenAI, Anthropic, Gemini, etc.)
- Model - Which model to use (gpt-4o, claude-3.5-sonnet, etc.)
- Base URL - API endpoint (optional, for custom endpoints)
- Headers - Custom HTTP headers (optional)
- Settings - Provider-specific options (reasoning effort, etc.)
- API Key - Stored separately per space in
.glyph/app/ai_secrets.json
Default Profiles
On first launch, Glyph creates 7 default profiles:- OpenAI - Empty model, requires API key
- OpenAI-compatible - Points to
http://localhost:11434/v1 - OpenRouter - Empty model, requires API key
- Anthropic - Empty model, requires API key
- Gemini - Empty model, requires API key
- Ollama - Empty model, allows private hosts
- Codex (ChatGPT OAuth) - Model
codex, OAuth authentication
Creating Profiles
Glyph doesn’t currently expose profile creation in the UI. You must edit
ai.json manually to create new profiles.Profile Storage Location
Manual Profile Creation
1
Close Glyph
Close Glyph to avoid conflicts when editing
ai.json.2
Open ai.json
Navigate to the config directory and open
ai.json in a text editor.3
Add Profile
4
Save and Reopen Glyph
Save
ai.json and reopen Glyph. Your new profile appears in Settings → AI.Profile Structure
Required Fields
Optional Fields
Provider Values
Custom Headers
Switching Profiles
Via Settings UI
1
Open AI Settings
Go to Settings → AI.
2
Select Profile
Click the profile dropdown and select a profile.
3
Configure Profile
Set API key, select model, and adjust settings.
4
Use in AI Panel
The AI panel uses the active profile for all conversations.
Active Profile Storage
The active profile ID is stored inai.json:
Use Cases
Multiple Accounts
Scenario: You have personal and work OpenAI accounts. Solution: Create two OpenAI profiles with different names and API keys..glyph/app/ai_secrets.json:
Model Variants
Scenario: You want quick access to different models. Solution: Create profiles for each model.Local and Cloud
Scenario: Use Ollama for private notes, OpenAI for general tasks. Solution: Keep both profiles configured and switch as needed.Provider Comparison
Scenario: Compare responses from different providers. Solution: Create profiles for OpenAI, Anthropic, and Gemini with similar models. Switch profiles and ask the same question to compare.API Key Management
Per-Profile API Keys
API keys are stored per profile ID in.glyph/app/ai_secrets.json:
Setting API Keys
In Settings → AI:- Select a profile
- Click Set API Key
- Paste your API key
- Click Save
Clearing API Keys
Click Clear API Key to remove the key for the active profile.Security
- Keys stored per space, not globally
- Each space has independent
ai_secrets.json - Add
.glyph/to.gitignoreto avoid committing keys - Keys never logged or sent to Glyph servers
Profile Examples
Azure OpenAI Profile
Local LLaMA Profile
OpenRouter with Custom Headers
Troubleshooting
Profile doesn’t appear in UI
Cause: Invalid JSON inai.json.
Solution: Validate JSON syntax at jsonlint.com.
”Unknown profile” error
Cause: Profile ID mismatch or profile deleted. Solution: Check thatactive_profile_id matches a profile ID in the profiles array.
API key not working after switching profiles
Cause: Each profile has its own API key. Solution: Set the API key for each profile separately.Profile settings not saving
Cause: File permissions or Glyph config directory not writable. Solution: Check file permissions onai.json.
Duplicate profile names
Cause: Multiple profiles with the same name. Solution: Profile IDs must be unique, but names can be the same. Rename for clarity.Best Practices
Naming Conventions
Use descriptive names:- ✅
OpenAI (Personal) - ✅
GPT-4o-mini (Fast) - ✅
Claude 3.5 Sonnet (Research) - ❌
Profile 1 - ❌
Test
Profile Organization
Group profiles by:- Provider: OpenAI, Anthropic, Gemini
- Use case: Research, coding, writing
- Speed: Fast (mini models), Quality (full models)
- Cost: Free (Ollama), Paid (OpenAI)
Backup Profiles
Backupai.json before making changes:
Future Enhancements
Potential profile features (not yet implemented):- Profile creation via UI
- Profile import/export
- Profile templates
- Per-space profile overrides
- Profile-specific system prompts
Next Steps
AI Setup
Configure your first AI profile
Providers
Provider-specific setup guides
Chat Modes
Learn about chat vs create modes
Context Management
Attach notes to conversations