Skip to main content

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 in config.yaml:
config.yaml
allow-remote:
  • false (default): Only localhost can access management endpoints
  • true: Allow remote access (requires authentication)
secret-key:
  • Used for all management API requests
  • Stored as a hash after first startup
  • Leave empty to disable Management API entirely (404 for all routes)
disable-control-panel:
  • false (default): Dashboard is available
  • true: Disable the web UI (API endpoints still work)

First-Time Setup

1

Set Management Key

Edit config.yaml and set a strong secret key:
2

Start Server

Or with Docker:
3

Access Dashboard

Navigate to http://localhost:18080/management and enter your secret key.

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 auto model selection
  • Cortex Router Matrix: Map intents to specific models

Real-Time Monitoring

Provider Health Status

Monitor the health of all configured providers:
Displays:
  • Provider availability
  • Response latency
  • Last successful request
  • Error rates
  • Quota usage

Performance Analytics

View detailed performance metrics:
Metrics include:
  • 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:
Shows:
  • 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:
Supported operations:
  • 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

Response:

Revoke Session


Feedback and Learning

Provide feedback to improve routing decisions:
Feedback is used to:
  • 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:
Shows:
  • 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
Response includes:
  • Request volume per provider
  • Token consumption
  • Cost estimates
  • Peak usage times
  • Model distribution

Quota Monitoring

Track provider quota usage:
Displays:
  • Current quota used per provider
  • Quota limits
  • Reset times
  • Usage trends

Security Best Practices

  1. Strong Secret Key: Use a cryptographically random key (32+ characters)
  2. Restrict Remote Access: Set allow-remote: false for local-only access
  3. Enable TLS: Use HTTPS in production with valid certificates
  4. Regular Key Rotation: Change the secret key periodically
  5. Monitor Access Logs: Review management API access logs
  1. Firewall Rules: Block port 18080 from external networks if not needed
  2. Reverse Proxy: Use nginx or Caddy with authentication
  3. VPN Access: Require VPN for remote management access
  4. API Rate Limiting: Implement rate limits on management endpoints

Troubleshooting

Dashboard Won’t Load

Issue: Dashboard returns 404 or fails to load. Solution:
  1. Verify disable-control-panel: false in config.yaml
  2. Check that secret-key is set (not empty)
  3. Ensure server is running: curl http://localhost:18080/health

Authentication Fails

Issue: Invalid management key error. Solution:
  1. Verify the key matches config.yaml
  2. Restart server if you changed the key
  3. Check logs for hashing errors

Remote Access Denied

Issue: Cannot access dashboard from another machine. Solution:
  1. Set allow-remote: true in config.yaml
  2. Restart the server
  3. Verify firewall allows port 18080

Next Steps

Setup Providers

Configure AI providers through the dashboard

Troubleshooting

Resolve common issues