App Advisor
Repo: o-apps/app-advisor-srv · Port: 8105
Domain-aware AI advisor for a single application. Deployed per-tenant vCluster by advisor-controller rather than run as one shared multi-tenant instance.
Key Capabilities
- App discovery — periodically scans the vCluster for running applications and builds a profile for each
- Domain classification — classifies each app's business domain (
ecommerce,ml_training,api_service,data_pipeline,auth,analytics, ...), either auto-detected from workload characteristics or set explicitly by a user (ClassifiedBy: "user"on manual override) - Proactive advice — generates domain-aware recommendations explaining why a suggestion matters for that specific app type, not generic advice
- Interactive Q&A sessions — a conversational session per app, with streaming responses over SSE
- Change validation — given a proposed change, returns advice on its likely impact before it's applied
- Live metrics — real-time pod status, restarts, and resource usage for the app, sourced directly from the vCluster
Auth
Requires a valid JWT on every /api/v1/* route (via pkg/authmiddleware) — /healthz is public. Called by both agent-runtime (with a minted service token) and the frontend's AI chat (ai/chat/route.ts, which forwards the requesting user's own token, since app-advisor tools are customer-tenant-scoped rather than platform-wide).
REST API
| Method | Path | Description |
|---|---|---|
GET | /api/v1/discovered-apps | Apps discovered in this vCluster |
POST | /api/v1/discover | Trigger a discovery cycle |
GET | /api/v1/profiles | List app profiles |
GET | /api/v1/apps/{app_id}/profile | Get one app's profile |
PUT | /api/v1/apps/{app_id}/profile | Upsert an app's profile (e.g. manual domain override) |
GET | /api/v1/apps/{app_id}/advice | List advice for an app |
POST | /api/v1/apps/{app_id}/advice/generate | Generate new proactive advice |
POST | /api/v1/apps/{app_id}/advice/{advice_id}/dismiss | Dismiss an advice item |
POST | /api/v1/apps/{app_id}/advice/{advice_id}/implement | Mark advice as implemented |
POST | /api/v1/apps/{app_id}/sessions | Start an interactive Q&A session |
GET | /api/v1/apps/{app_id}/sessions | List sessions (not yet implemented — returns empty) |
POST | /api/v1/apps/{app_id}/sessions/{session_id}/query | Streaming Q&A query (SSE) |
POST | /api/v1/apps/{app_id}/validate | Validate a proposed change |
GET | /api/v1/apps/{app_id}/live | Live pod/resource snapshot |
GET | /healthz | Health check |
Environment Variables
| Variable | Description |
|---|---|
AUTH_JWT_ACCESS_SECRET | Shared JWT signing secret |
ANTHROPIC_API_KEY | Claude API key for advice generation and Q&A |
KUBECONFIG | Path to the vCluster's kubeconfig (omit for in-cluster) |
PORT | HTTP port (default: 8105) |