Overview
The Management Dashboard is a modern, single-file React web UI (226 KB, zero dependencies) that provides visual configuration and monitoring for switchAILocal.Accessing the Dashboard
The dashboard is available at:The dashboard requires authentication using your management secret key configured in
config.yaml.Configuration
Enable Management API
Configure the management API inconfig.yaml:
config.yaml
Security Settings
Security Settings
allow-remote:
false(default): Only localhost can access management endpointstrue: Allow remote access (requires authentication)
- Used for all management API requests
- Stored as a hash after first startup
- Leave empty to disable Management API entirely (404 for all routes)
false(default): Dashboard is availabletrue: Disable the web UI (API endpoints still work)
First-Time Setup
Dashboard Features
Provider Configuration
Visually manage AI provider credentials and settings:- Add Provider Credentials: Configure API keys for Gemini, Claude, OpenAI, and more
- OAuth Management: View and manage OAuth sessions
- Model Discovery: Trigger automatic model discovery
- Load Balancing: Configure multiple credentials per provider
Model Routing
Configure intelligent routing behavior:- Routing Strategy: Choose between round-robin and fill-first
- Model Aliases: Create friendly names for models
- Auto Model Priority: Set fallback order for
automodel selection - Cortex Router Matrix: Map intents to specific models
Real-Time Monitoring
Provider Health Status
Monitor the health of all configured providers:- Provider availability
- Response latency
- Last successful request
- Error rates
- Quota usage
Performance Analytics
View detailed performance metrics:- Total Requests: Count per provider and model
- Success Rates: Percentage of successful completions
- Average Latency: Response time statistics
- Error Rates: Failure analysis
- Cost Tracking: Token usage and estimated costs
Memory System Stats
Monitor the learning system:- User preferences per API key
- Provider bias scores
- Model performance history
- Routing decision cache
Live Log Streaming
View real-time application logs directly in the dashboard:- Filter by log level (DEBUG, INFO, WARN, ERROR)
- Search log content
- Auto-scroll to latest entries
- Download log files
Configuration Editor
Edit configuration settings through the web UI:- Update basic settings (port, debug mode)
- Modify provider credentials
- Adjust routing strategies
- Configure intelligence features
Management API Reference
All dashboard features are backed by REST endpoints.All management endpoints require the
X-Management-Key header with your secret key.Monitoring Endpoints
Operations Endpoints
Configuration Endpoints
OAuth Session Management
Manage OAuth tokens for CLI and cloud providers:View Active Sessions
Revoke Session
Feedback and Learning
Provide feedback to improve routing decisions:- Adjust provider bias scores
- Improve model selection confidence
- Identify provider quirks
- Optimize routing decisions
Intelligence System Controls
Cortex Router Status
View the current state of intelligent routing:- Router model status
- Semantic tier performance
- Skill matching statistics
- Cache hit rates
- Cascade activations
Reload Skills
Hot-reload Cortex Router skills without restarting:Hooks and Automation
View and manage webhook hooks:List Active Hooks
Reload Hook Configuration
Usage Analytics
Detailed usage statistics when enabled:config.yaml
- Request volume per provider
- Token consumption
- Cost estimates
- Peak usage times
- Model distribution
Quota Monitoring
Track provider quota usage:- Current quota used per provider
- Quota limits
- Reset times
- Usage trends
Security Best Practices
Production Deployment
Production Deployment
- Strong Secret Key: Use a cryptographically random key (32+ characters)
- Restrict Remote Access: Set
allow-remote: falsefor local-only access - Enable TLS: Use HTTPS in production with valid certificates
- Regular Key Rotation: Change the secret key periodically
- Monitor Access Logs: Review management API access logs
Network Security
Network Security
- Firewall Rules: Block port 18080 from external networks if not needed
- Reverse Proxy: Use nginx or Caddy with authentication
- VPN Access: Require VPN for remote management access
- API Rate Limiting: Implement rate limits on management endpoints
Troubleshooting
Dashboard Won’t Load
Issue: Dashboard returns 404 or fails to load. Solution:- Verify
disable-control-panel: falsein config.yaml - Check that
secret-keyis set (not empty) - Ensure server is running:
curl http://localhost:18080/health
Authentication Fails
Issue: Invalid management key error. Solution:- Verify the key matches
config.yaml - Restart server if you changed the key
- Check logs for hashing errors
Remote Access Denied
Issue: Cannot access dashboard from another machine. Solution:- Set
allow-remote: truein config.yaml - Restart the server
- Verify firewall allows port 18080
Next Steps
Setup Providers
Configure AI providers through the dashboard
Troubleshooting
Resolve common issues