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:
- Hardcode workspace list in frontend
- Fetch workspaces dynamically from backend API
- 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
apis/backend-ai-api/src/app/infrastructure/infrastructure.controller.tslibs/libs-ai/multi-agent-dashboard/src/lib/components/session-selector/session-selector.component.ts
🔗 Related
- Decision ID:
dev_1771369925291_yk3uprj - Session: 113
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation