Central Hub
Architecture and API reference for the ai-platform-hub on port 5050
The AI Platform Hub (platform/hub/) is the single browser entry point for the entire ~/ai-mac-studio ecosystem. It runs as a FastAPI application on port 5050 and serves:
| Path | What |
|---|---|
/ |
Quarto documentation site (this site) |
/admin/ |
Live admin UI (HTMX + Bootstrap-sandstone) |
/api/... |
JSON API (consumed by UI and CLI) |
/metrics |
Prometheus-style metrics |
/health |
Liveness endpoint |
/ws/events |
WebSocket event stream |
Admin UI: visit localhost:5050/admin/ for a live dashboard with services, registry browser, MCP catalog, port map, and log tail.
Starting the hub
cd ~/ai-mac-studio/platform/hub
PYTHONPATH=src python3.14 -m ai_platform_hubOr via launchd:
cp ~/ai-mac-studio/platform/launchd/com.ai-platform.hub.plist ~/Library/LaunchAgents/
launchctl load ~/Library/LaunchAgents/com.ai-platform.hub.plistAdmin UI sections
| URL | Content | Data source |
|---|---|---|
/admin/services |
Route status, start/stop | proxy /_proxy/state |
/admin/registry |
Agents / skills / instructions | catalog.duckdb |
/admin/mcp |
MCP server inventory | catalog.duckdb |
/admin/projects |
60+ packages with port, machine | catalog.duckdb |
/admin/ports |
Port map 5000–5199 | routes.yaml + lsof |
/admin/machines |
Per-machine status | machines/*.json |
/admin/syncthing |
Folder sync status | Syncthing API :8385 |
/admin/data-mounts |
PDAI-1 health, free space | data-mounts.yaml |
/admin/logs |
Live log tail | logs/proxy.jsonl |
/admin/launchd |
All com.ai-platform.* agents |
launchctl list |
/admin/instructions |
Render Jinja2 templates | registry/instructions/ |
API reference
GET /api/health
{"status": "ok"}GET /api/routes
Returns the full routes.yaml as JSON.
GET /api/proxy/state
Proxies /_proxy/state from the reverse proxy on :5001.
GET /api/projects?category=&search=
Returns projects from catalog.duckdb.
GET /api/skills?query=
Returns skills with optional keyword filter.
GET /api/mcp-servers
Returns all MCP server manifests.
GET /api/ports
Returns all registered ports from catalog.duckdb.
GET /api/instructions?domain=
Returns instruction templates.
GET /api/data-mounts
Returns PDAI-1 mount health with free space stats.
WS /ws/events
WebSocket stream broadcasting proxy state updates every 10 seconds.