Skip to main content
Version: 1.0

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​

MethodPathDescription
GET/api/v1/discovered-appsApps discovered in this vCluster
POST/api/v1/discoverTrigger a discovery cycle
GET/api/v1/profilesList app profiles
GET/api/v1/apps/{app_id}/profileGet one app's profile
PUT/api/v1/apps/{app_id}/profileUpsert an app's profile (e.g. manual domain override)
GET/api/v1/apps/{app_id}/adviceList advice for an app
POST/api/v1/apps/{app_id}/advice/generateGenerate new proactive advice
POST/api/v1/apps/{app_id}/advice/{advice_id}/dismissDismiss an advice item
POST/api/v1/apps/{app_id}/advice/{advice_id}/implementMark advice as implemented
POST/api/v1/apps/{app_id}/sessionsStart an interactive Q&A session
GET/api/v1/apps/{app_id}/sessionsList sessions (not yet implemented — returns empty)
POST/api/v1/apps/{app_id}/sessions/{session_id}/queryStreaming Q&A query (SSE)
POST/api/v1/apps/{app_id}/validateValidate a proposed change
GET/api/v1/apps/{app_id}/liveLive pod/resource snapshot
GET/healthzHealth check

Environment Variables​

VariableDescription
AUTH_JWT_ACCESS_SECRETShared JWT signing secret
ANTHROPIC_API_KEYClaude API key for advice generation and Q&A
KUBECONFIGPath to the vCluster's kubeconfig (omit for in-cluster)
PORTHTTP port (default: 8105)