| name | ai-gateway-management |
|---|---|
| description | Manage AI Gateway providers, routes, and model assignments for Manager and Workers. Provides a web UI and API for dynamic configuration. |
This skill provides a web-based management interface for the AI Gateway, allowing human admins to:
- Manage AI Providers — Add, edit, remove LLM providers (Qwen, DeepSeek, OpenAI, etc.)
- Assign Models — Set default models for Manager and individual Workers
- Dynamic Switching — Change models at runtime without container restart
- Monitor System — View system metrics and worker status
- Backup & Restore — Backup configurations and restore when needed
The management interface is accessible via multiple ways:
http://manager-local.hiclaw.io:8080
http://<your-server-ip>:8080/agm/
This allows access from LAN or internet without configuring a domain.
Both access methods require Basic Auth:
- Username:
admin(orHICLAW_ADMIN_USERenv var) - Password: Set during installation (or
HICLAW_ADMIN_PASSWORDenv var)
Three themes available:
- Pixel — Classic green terminal style
- Cyber — Neon pink/cyan cyberpunk style
- Office — Warm brown retro office style
Workers display animated pixel-art avatars with status indicators:
- 🟢 Idle — Green, ready for tasks
- 🟡 Busy — Yellow, currently processing
- 🔵 Sleeping — Blue, inactive
- 🔴 Offline — Red, not connected
- Automatic backup before any configuration change
- Manual backup button on home page
- Reset button to restore from last backup
All endpoints are prefixed with /ni_status/ and require authentication.
| Method | Path | Description |
|---|---|---|
| GET | /ni_status/metrics |
Get system metrics (CPU, memory, connections) |
| POST | /ni_status/reload |
Reload configuration for Manager or Worker |
| GET | /ni_status/health |
Health check endpoint |
| Method | Path | Description |
|---|---|---|
| GET | /ni_status/assignment/manager |
Get Manager's current model |
| PUT | /ni_status/assignment/manager |
Set Manager's model |
| GET | /ni_status/assignment/workers |
List all Worker model assignments |
| GET | /ni_status/assignment/workers/{name} |
Get Worker's model |
| PUT | /ni_status/assignment/workers/{name} |
Set Worker's model |
| POST | /ni_status/set-model |
Set model (alternative endpoint) |
| POST | /ni_status/test-provider |
Test provider connectivity |
| Method | Path | Description |
|---|---|---|
| GET | /ni_status/providers |
List all AI providers |
| POST | /ni_status/create-provider |
Create a new provider |
| GET | /ni_status/route |
Get current AI routes |
Starts the monitor API server on port 18080.
# Start monitor server
bash /opt/hiclaw/agent/skills/ai-gateway-management/scripts/monitor-server.sh start
# Stop monitor server
bash /opt/hiclaw/agent/skills/ai-gateway-management/scripts/monitor-server.sh stop
# Check status
bash /opt/hiclaw/agent/skills/ai-gateway-management/scripts/monitor-server.sh statusList all configured AI providers.
bash /opt/hiclaw/agent/skills/ai-gateway-management/scripts/list-providers.shCreate a new AI provider.
bash /opt/hiclaw/agent/skills/ai-gateway-management/scripts/create-provider.sh \
--type qwen \
--name qwen \
--token "sk-xxx"Set model for Manager or a Worker. Tests connectivity before applying.
# Set Manager model
bash /opt/hiclaw/agent/skills/ai-gateway-management/scripts/set-model.sh \
--target manager \
--provider qwen \
--model qwen3.5-plus
# Set Worker model
bash /opt/hiclaw/agent/skills/ai-gateway-management/scripts/set-model.sh \
--target worker:alice \
--provider deepseek \
--model deepseek-chat
# With custom parameters
bash /opt/hiclaw/agent/skills/ai-gateway-management/scripts/set-model.sh \
--target manager \
--provider openai \
--model gpt-4 \
--context-window 128000 \
--max-tokens 8192 \
--reasoning trueGet current model assignment.
bash /opt/hiclaw/agent/skills/ai-gateway-management/scripts/get-assignment.sh manager
bash /opt/hiclaw/agent/skills/ai-gateway-management/scripts/get-assignment.sh worker:aliceWhen this skill is installed, it automatically:
- Creates a monitor service source pointing to
127.0.0.1:18080 - Creates a route with prefix
/ni_statuspointing to the monitor service - Enables key-auth for the route (manager access only)
- Starts the monitor API server
Model assignments are stored in MinIO for persistence:
- Manager:
/agents/manager/model.json - Workers:
/agents/{worker-name}/model.json
Format:
{
"provider": "qwen",
"model": "qwen3.5-plus",
"contextWindow": 200000,
"maxTokens": 64000,
"reasoning": true,
"updatedAt": "2024-01-15T10:30:00Z"
}┌─────────────────────────────────────────────────────────────┐
│ Higress AI Gateway │
│ ┌─────────────────────────────────────────────────────────┐│
│ │ Route: /ni_status/* → monitor service (this skill) ││
│ │ Route: /v1/* → AI Providers (LLM proxy) ││
│ │ Route: / → default-ai-route (configurable) ││
│ └─────────────────────────────────────────────────────────┘│
└─────────────────────────────────────────────────────────────┘
│
┌───────────────┼───────────────┐
▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌──────────┐
│ Manager │ │ Worker 1 │ │ Worker N │
│ (model A)│ │ (model B)│ │ (model C)│
└──────────┘ └──────────┘ └──────────┘
- Connectivity Test: The skill tests the model via
POST /v1/chat/completionsto ensure it's reachable - Update AI Route: Updates
default-ai-routeto use the new provider - Update OpenClaw Config: Modifies
openclaw.jsonusing the standardhiclaw-gatewayprovider format - Reload: Triggers OpenClaw config reload via API
- Store Assignment: Saves model assignment to
/agents/{worker-name}/model.json - Update Config: Updates Worker's
openclaw.jsonin MinIO - Apply on Next Task: Worker pulls updated config on next task assignment
Before switching models, ensure:
- The AI Provider exists in Higress Console
- The provider has a valid API key configured
- The model is supported by the provider
If model switching fails:
- Check Higress Console for provider configuration
- Verify the model name is correct
- Test connectivity manually via curl
- Check monitor server logs at
/tmp/monitor-server.log
This skill uses the default-ai-route for all model requests. Do not create separate routes for each provider unless you need advanced routing (e.g., model-based routing with predicates).
Model assignments are backed up automatically before changes:
- Backup file:
/agents/{name}/model.json.backup.YYYYMMDD_HHMMSS - Restore manually by copying backup file back
Symptom: set-model.sh fails with "Model not reachable" error
Solution:
- Open Higress Console
- Navigate to AI Providers
- Verify provider exists and has API key
- Test model manually:
curl -H "Authorization: Bearer <key>" http://ai-gateway.hiclaw.io:8080/v1/models
Symptom: Model set but Manager doesn't use it
Solution:
- Check OpenClaw is running:
ps aux | grep openclaw - Manually reload:
curl -X POST http://127.0.0.1:18799/api/reload - Verify config:
jq '.agents.defaults.model.primary' /root/manager-workspace/openclaw.json
Symptom: Worker model set but Worker uses old model
Solution:
- Verify MinIO sync:
mc stat <bucket>/agents/<worker>/openclaw.json - Restart Worker container
- Check Worker logs for config pull errors