AI ROUTES CLEANUP

Comprehensive guidelines for AI-assisted development within the Editor platform

AI Routes Cleanup & Organization Plan

🎯 Goals

  1. Remove outdated/broken components
  2. Connect all components to real backend-ai-api
  3. Use flash-persistence for local data
  4. Ensure consistent data flow
  5. Organize routes logically

📋 Current Routes Analysis

✅ Working Components (Keep & Improve)

1. Training Center - /ai/ai-agents-training-center

2. Agent Knowledge Viewer - /ai/agent-knowledge/:agentId?

3. AI Dashboard - /ai/dashboard

⚠️ Needs Update (Fix & Connect)

4. Platform Intelligence - /ai/platform-intelligence

5. Cursor Agents Dashboard - /ai/cursor-agents

6. Space Assistants - /ai/vitto-hubs

7. AI Agents Dashboard - /ai/agents-dashboard

8. Agent Mesh - /ai/mesh

9. Memory Browser - /ai/memory

10. AI Playground - /ai/playground

11. Visual Memory Map - /ai/memory-map

❌ Outdated/Broken (Remove or Major Refactor)

12. AI Tester - /ai/ai-tester

13. AI Guide - /ai/guide

14. AI Config - /ai/ai-config

15. AI Integration Examples - /ai/integration-examples

🆕 Missing (Consider Adding)

  1. Agent Training History - /ai/training-history

    • Show training sessions, outcomes, improvements over time
  2. Pattern Library - /ai/patterns

    • Browse all learned patterns across all agents
  3. Real-time Agent Monitor - /ai/monitor

    • Live view of agent activity, tasks, performance

🛠️ Implementation Plan

Phase 1: Remove/Clean (Immediate)

  1. ✅ Fix takeUntilDestroyed errors in agent-knowledge
  2. 🔄 Remove or drastically simplify ai-tester
  3. Remove/consolidate duplicate agent dashboards
  4. Remove outdated demo/example components

Phase 2: Connect to Real APIs (High Priority)

  1. Update Platform Intelligence Dashboard
  2. Update Cursor Agents Dashboard
  3. Update Space Assistants Dashboard
  4. Connect Memory Browser
  5. Connect Agent Mesh

Phase 3: Polish & Enhance (Medium Priority)

  1. Add real-time WebSocket updates
  2. Add comprehensive error handling
  3. Add loading states everywhere
  4. Ensure consistent UI/UX

Phase 4: New Features (Low Priority)

  1. Add training history viewer
  2. Add pattern library browser
  3. Add real-time monitoring

📊 Backend API Endpoints Available

Platform AI (/ai-api/platform/agents)

Module Intelligence (/ai-api/ai-agents/module-intelligence)

Agent Tasks (/ai-api/agents)

🎨 UI/UX Standards

  1. Loading States: All API calls must show loading indicators
  2. Error Handling: Graceful fallbacks, user-friendly error messages
  3. Empty States: "No data yet" messages with helpful actions
  4. Consistent Design: Use Material Design components
  5. Real-time Updates: Use signals for reactive UI

🔄 Data Flow

Frontend Components
    ↓
Angular Services (with signals)
    ↓
HttpClient → `/ai-api/*` (proxied to port 3001)
    ↓
backend-ai-api (NestJS)
    ↓
MongoDB (AI databases) + Flash-persistence sync

✅ Success Criteria

  1. ❌ No mock data anywhere
  2. ✅ All components connect to real APIs or flash-persistence
  3. ✅ No circular dependencies or commented-out code
  4. ✅ Consistent error handling
  5. ✅ Fast, responsive UI with loading states
  6. ✅ Clear, logical route organization
  7. ✅ Agent knowledge visible and useful

Created: 2025-01-16 Status: In Progress