Architecture: How should workspace discovery work in production for the mu...

Documentation for Sessions

🏗️ Architecture: How should workspace discovery work in production for the mu...

Date: 2026-02-17
Time: 23:12:05 UTC
Session: gspace1-113.4
Agent: backend
Confidence: 95%
Status: ✅ Documented


📋 Decision Context

Question:

How should workspace discovery work in production for the multi-agent control center?

Task: Session 114: Production readiness audit


🎯 Decision Made

Chosen:

Fetch workspaces dynamically from backend API via GET /ai-api/infrastructure/workspaces

Options Considered:

  1. Hardcode workspace list in frontend
  2. Fetch workspaces dynamically from backend API
  3. Read from environment config file

💭 Reasoning

The backend already has access to MongoDB sessions collection (distinct workspaces) and env config (WORKSPACE_ID, SIBLING_WORKSPACES). A new endpoint merges all sources into a single response, eliminating the need for hardcoded workspace lists in any frontend component. The session-selector now fetches this on init and populates the dropdown dynamically.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation