Architecture
ClientCoach AI is built using a modular, multi-agent system architecture designed for flexibility, scalability, and maintainability.
🧱 System Overview
multi-agent/
├── backend/ (FastAPI + Python 3.11+)
│ ├── agents/ # Core AI agents (Customer, Observer, Phase)
│ ├── routers/ # API endpoints
│ ├── services/ # Supabase integration, evaluation logic
│ └── main.py # API entry point
├── frontend-react/ (React 19 + TypeScript)
│ ├── components/ # UI elements: Chat, Feedback, Scenario Builder
│ ├── lib/ # API clients, speech utilities
│ └── pages/ # Main pages (index.tsx, admin.tsx)
🧠 Core AI Agents
Customer Agent: Simulates realistic customer behavior based on system prompts, persona, and scenario context.
Phase Agent: Determines when to advance, stay in, or exit a conversation phase based on evaluation outcomes.
Observer Agent: Evaluates user performance, checks for critical/optional/red-flag aspects, and generates score and feedback.
🗃️ Backend Stack
FastAPI: Handles API requests and orchestrates agent interactions.
Supabase: Stores user sessions, scenarios, phase configs, and evaluation logs.
Azure OpenAI: Powers GPT-4 for generating customer responses and feedback analysis.
💻 Frontend Stack
React 19: Builds a responsive and modern UI.
TypeScript: Ensures type safety across frontend components.
Azure Speech SDK: Enables text-to-speech and speech-to-text.
Tailwind CSS: Used for styling.
Last updated