Files
awesome-agentic-ai/HOWTO_WEB.md
Tony_at_EON-DEV 12f2134f4a
Some checks failed
CI / test (push) Has been cancelled
CI / build (push) Has been cancelled
CI / update-argocd (push) Has been cancelled
CI / canary-promote (push) Has been cancelled
Agentic AI CI/CD / build-and-deploy (push) Has been cancelled
feat: Introduce mobile UI guide, update web and backend documentation for multi-agent "Crew AI" features, and address related technical debt.
2026-02-24 11:48:03 +09:00

2.9 KiB

🌐 Web UI Development Guide

1. Project Overview

The frontend is a Single Page Application (SPA) built with React, Vite, and TailwindCSS. It communicates with the FastAPI backend to provide a rich, reactive interface for the agent.

📁 Folder Structure

The web/ directory is structured by feature domain (Phase 6+):

web/
├── package.json
├── vite.config.js
├── tailwind.config.js
├── src/
│   ├── App.jsx             # Main Component
│   ├── index.jsx           # Entry logic
│   ├── context/            # Global State
│   │   └── PersonaContext.jsx # Global emotion/persona state
│   ├── chat/               # Chat Components
│   │   ├── FollowUpChat.jsx
│   │   └── ...
│   ├── emotion/            # Emotion UI Components
│   │   ├── EmotionOverlay.jsx
│   │   ├── EmotionBadge.jsx
│   │   └── ...
│   └── ...

2. Setup & Installation

📦 Prerequisites

  • Node.js: v16+ (Recommended)
  • npm or yarn

📥 Install Dependencies

Navigate to the web directory and install dependencies:

cd web
npm install

Key dependencies:

  • react, react-dom
  • axios (API requests)
  • tailwindcss, postcss, autoprefixer (Styling)

3. Running Development Server

To start the Vite development server:

npm run dev

The UI will be available at http://localhost:5173 (default).


4. Key Features & Components

🎭 Persona & Context

  • PersonaContext.jsx: Wraps the application to provide global access to the current persona and userEmotion.
  • App.jsx: Consumes PersonaContext to dynamically change the background theme/gradient based on the agent's mood.

💬 Chat Interface

  • FollowUpChat.jsx: The main chat window. It renders messages and handles user input. It also listens for emotion updates from the backend response to trigger UI state changes.

🎨 Styling

  • TailwindCSS: Used for all styling.
  • Emotion Overlays: emotion/EmotionOverlay.jsx provides visual feedback (e.g., color shifts, particles) based on the detected emotion.


6. Mission Control & Gradio (Phase 10/11)

The Mission Control dashboard acts as the central hub for multi-agent coordination.

📊 Live Monitoring

  • Gradio Integration: A live monitoring feed is embedded in web/src/dashboard/MissionControl.jsx.
  • Telemetry: Real-time activity traces and trust scores are fetched from the /api/crew endpoints and displayed in reactive widgets.

🔧 Automation Hub

  • Browser Automation: Integrated with Playwright for agentic web navigation.
  • Connectors: Supports IMAP (Email) and CalDAV (Calendar) sync via the backend orchestration layer.