Skip to content

bagusardin25/TeamDynamics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

92 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

TeamDynamics Logo

TeamDynamics

Multi-Agent Gamified SaaS Simulation for Team Crisis Analysis

Status Next.js FastAPI React Python Database

Identify the exact breaking point of your startup before it happens in real life.


๐Ÿ“– Overview

TeamDynamics is a multi-agent AI-powered simulation platform that lets startup founders, HR leaders, and team managers stress-test their team's resilience under corporate crises. Assemble a virtual team of psychologically-profiled AI agents, inject a real-world crisis scenario, and observe in real-time how your team reacts โ€” predicting burnout cascades, communication breakdowns, and resignation waves before they happen.

Why TeamDynamics?

Challenge How TeamDynamics Solves It
Unpredictable team reactions Personality-weighted AI agents produce realistic, differentiated behavior
Costly trial-and-error Simulate weeks of crisis in minutes with zero real-world risk
Hidden team fracture points Expose breaking points through morale, stress, and loyalty tracking
One-size-fits-all management Test different interventions (bonuses, overtime cancellation, etc.) and compare outcomes

โœจ Key Features

๐Ÿง  Psychological Agent Personas

Each agent is equipped with a 5-trait personality system (Empathy, Ambition, Stress Tolerance, Agreeableness, Assertiveness) that drives unique speech patterns, decision-making, and stress responses โ€” no generic chatbot behavior.

โšก Real-Time Simulation Engine

Watch agents interact in a Slack-like surveillance interface via WebSocket connections. See public messages alongside hidden internal thoughts, with typing indicators and system event broadcasts.

๐ŸŽฎ God-Mode Interventions

Inject Pizza Parties, Cancel Overtime, Bonuses, or declare new crises on-the-fly. Watch immediate morale shifts with effects modulated by each agent's personality.

๐ŸŒ Dynamic World State

A persistent economic simulation layer tracks budget, reputation, customer satisfaction, technical debt, and deadline pressure โ€” making every agent decision consequential.

๐Ÿ—ณ๏ธ Hierarchy-Weighted Decision Engine

Proposals are voted on with influence weights based on role seniority. Senior roles carry more weight, mirroring real corporate power dynamics.

๐Ÿ“„ AI Document Analysis

Upload company documents (PDF, DOCX, CSV, XLSX) and let AI extract team risks, suggest crises, and auto-fill simulation parameters.

๐Ÿ“Š Executive Reports

Post-simulation AI-generated reports with agent-by-agent analysis, timeline charts, survival classifications, and actionable recommendations โ€” exportable as PDF.

๐Ÿ”€ BYO-AI (Bring Your Own AI)

Mix and match LLM providers (OpenAI, Google Gemini, OpenRouter) per-agent for behavioral diversity. Supports Claude, GPT-4, Llama 3, and more.


๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                     Next.js 16 Frontend                         โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚  Login /  โ”‚  โ”‚  Setup   โ”‚  โ”‚Simulation โ”‚  โ”‚  Report /    โ”‚  โ”‚
โ”‚  โ”‚ Register  โ”‚  โ”‚  Wizard  โ”‚  โ”‚  Live UI   โ”‚  โ”‚  Dashboard   โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”‚        โ”‚    JWT Auth   โ”‚  WebSocket   โ”‚   REST API    โ”‚         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚               โ”‚             โ”‚               โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚        โ–ผ    FastAPI Backend          โ–ผ               โ–ผ         โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚  Auth Router โ”‚ Simulation Router โ”‚ Document โ”‚ WebSocket  โ”‚  โ”‚
โ”‚  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค  โ”‚
โ”‚  โ”‚             Simulation Engine (Orchestrator)              โ”‚  โ”‚
โ”‚  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค  โ”‚
โ”‚  โ”‚ Agent 1  โ”‚ Agent 2  โ”‚ Agent N  โ”‚  Per-Agent LLM Model    โ”‚  โ”‚
โ”‚  โ”‚  (LLM)   โ”‚  (LLM)   โ”‚  (LLM)   โ”‚  Override Support      โ”‚  โ”‚
โ”‚  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค  โ”‚
โ”‚  โ”‚ Personality-Weighted State Machine  โ”‚  Communication DNA  โ”‚  โ”‚
โ”‚  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค  โ”‚
โ”‚  โ”‚ Decision Engine โ”‚ World State โ”‚ Phase System โ”‚ Memory    โ”‚  โ”‚
โ”‚  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค  โ”‚
โ”‚  โ”‚ Hidden Agendas  โ”‚  Random Events  โ”‚  Report Generator    โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚                  PostgreSQL Database                     โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Tech Stack

Layer Technology
Frontend Next.js 16 (App Router), React 19, TypeScript
Styling Tailwind CSS v4, shadcn/ui, Framer Motion
Charts Recharts
Backend Python, FastAPI, Uvicorn
Database PostgreSQL (asyncpg)
Auth JWT (python-jose) + bcrypt, Google OAuth 2.0
AI Providers OpenAI, Google Gemini, OpenRouter
Documents PyPDF2, python-docx, openpyxl
Real-Time WebSocket (FastAPI native)

๐Ÿš€ Quick Start

Prerequisites

  • Python 3.11+
  • Node.js 20+
  • Git
  • At least one LLM API key (OpenAI, Gemini, or OpenRouter)

1. Clone the Repository

git clone https://github.com/bagusardin25/TeamDynamics.git
cd TeamDynamics

2. Backend Setup (FastAPI)

cd backend

# Create and activate virtual environment
python -m venv venv
venv\Scripts\activate          # Windows
# source venv/bin/activate     # macOS / Linux

# Install dependencies
pip install -r requirements.txt

# Configure environment
cp .env.example .env
# Edit .env with your API keys (see Environment Variables below)

# Start the backend
python -m uvicorn main:app --reload --host 0.0.0.0 --port 8000

๐Ÿ“ API Docs: Swagger UI available at https://teamdynamics.vercel.app/docs

3. Frontend Setup (Next.js)

Open a second terminal:

cd frontend

# Install dependencies
npm install

# Start the dev server
npm run dev

4. Launch

Navigate to https://teamdynamics.vercel.app โ€” create an account, set up a team, trigger a crisis, and watch the chaos unfold!


โš™๏ธ Environment Variables

Create a .env file inside /backend based on .env.example:

# โ”€โ”€โ”€ LLM Provider (required โ€” at least one) โ”€โ”€โ”€
LLM_PROVIDER=openai                    # openai | gemini | openrouter
OPENAI_API_KEY=sk-...
OPENAI_MODEL=gpt-4o-mini              # optional, default model
OPENAI_CHEAP_MODEL=gpt-4o-mini        # used during traffic/cost spikes
GEMINI_API_KEY=AI...
GEMINI_MODEL=gemini-2.0-flash         # optional, default model
GEMINI_CHEAP_MODEL=gemini-2.0-flash
OPENROUTER_API_KEY=sk-or-...
OPENROUTER_DEFAULT_MODEL=meta-llama/llama-3.1-8b-instruct:free
OPENROUTER_CHEAP_MODEL=meta-llama/llama-3.1-8b-instruct:free
LLM_DAILY_BUDGET_USD=5.00
LLM_FALLBACK_ENABLED=true
LLM_FALLBACK_BUDGET_THRESHOLD_PCT=80
LLM_TRAFFIC_SPIKE_ACTIVE_CALLS=10

# โ”€โ”€โ”€ Server โ”€โ”€โ”€
HOST=0.0.0.0
PORT=8000
FRONTEND_URL=https://teamdynamics.vercel.app
ENVIRONMENT=production
FORCE_HTTPS=true

# โ”€โ”€โ”€ Authentication โ”€โ”€โ”€
JWT_SECRET_KEY=<output-of-openssl-rand-hex-32>
ADMIN_EMAIL=admin@example.com          # gets unlimited credits

# Error Tracking
SENTRY_DSN=https://...
SENTRY_ENVIRONMENT=production

# โ”€โ”€โ”€ Database โ”€โ”€โ”€
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/teamdynamics

# โ”€โ”€โ”€ Google OAuth (optional) โ”€โ”€โ”€
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret

Frontend analytics is optional. Set these in the frontend deployment when using PostHog:

NEXT_PUBLIC_POSTHOG_KEY=phc_...
NEXT_PUBLIC_POSTHOG_HOST=https://us.i.posthog.com

Note: DATABASE_URL must point to a PostgreSQL database in local and production environments. In production, JWT_SECRET_KEY must be a strong random value with at least 32 characters or the backend will refuse to start.

Production Monitoring

Configure an external uptime monitor such as UptimeRobot or Better Stack to check GET /health every 1-5 minutes. Alert on non-2xx responses and latency spikes. Sentry covers application errors, while PostHog covers product analytics.


๐Ÿ“‚ Project Structure

TeamDynamics/
โ”œโ”€โ”€ backend/
โ”‚   โ”œโ”€โ”€ main.py                    # FastAPI app entry point
โ”‚   โ”œโ”€โ”€ requirements.txt           # Python dependencies
โ”‚   โ”œโ”€โ”€ .env.example               # Environment template
โ”‚   โ”œโ”€โ”€ models/
โ”‚   โ”‚   โ””โ”€โ”€ database.py            # DB init, schemas, connection pooling
โ”‚   โ”œโ”€โ”€ routers/
โ”‚   โ”‚   โ”œโ”€โ”€ auth.py                # Auth endpoints (register, login, OAuth)
โ”‚   โ”‚   โ”œโ”€โ”€ simulation.py          # Simulation CRUD & intervention endpoints
โ”‚   โ”‚   โ”œโ”€โ”€ agents.py              # Preset agent configurations
โ”‚   โ”‚   โ”œโ”€โ”€ document.py            # Document upload & AI analysis
โ”‚   โ”‚   โ””โ”€โ”€ websocket.py           # WebSocket real-time streaming
โ”‚   โ””โ”€โ”€ services/
โ”‚       โ”œโ”€โ”€ auth_service.py        # JWT, password hashing, Google OAuth
โ”‚       โ”œโ”€โ”€ simulation_engine.py   # Core simulation orchestrator
โ”‚       โ”œโ”€โ”€ llm_service.py         # Multi-provider LLM integration
โ”‚       โ”œโ”€โ”€ decision_engine.py     # Proposal system & hierarchy voting
โ”‚       โ”œโ”€โ”€ document_service.py    # File parsing & AI extraction
โ”‚       โ””โ”€โ”€ report_generator.py    # Post-simulation report generation
โ”‚
โ”œโ”€โ”€ frontend/
โ”‚   โ”œโ”€โ”€ package.json
โ”‚   โ”œโ”€โ”€ public/
โ”‚   โ”‚   โ””โ”€โ”€ logo.svg               # Application logo
โ”‚   โ””โ”€โ”€ src/
โ”‚       โ”œโ”€โ”€ app/
โ”‚       โ”‚   โ”œโ”€โ”€ page.tsx            # Landing page
โ”‚       โ”‚   โ”œโ”€โ”€ login/              # Authentication โ€” login
โ”‚       โ”‚   โ”œโ”€โ”€ register/           # Authentication โ€” register
โ”‚       โ”‚   โ”œโ”€โ”€ dashboard/          # User dashboard & simulation history
โ”‚       โ”‚   โ”œโ”€โ”€ setup/              # 3-step simulation setup wizard
โ”‚       โ”‚   โ”œโ”€โ”€ simulation/         # Live simulation interface
โ”‚       โ”‚   โ”œโ”€โ”€ report/             # Post-simulation executive report
โ”‚       โ”‚   โ””โ”€โ”€ docs/               # In-app technical documentation
โ”‚       โ””โ”€โ”€ components/
โ”‚           โ”œโ”€โ”€ simulation/         # Simulation UI components
โ”‚           โ”‚   โ”œโ”€โ”€ MessageFeed.tsx
โ”‚           โ”‚   โ”œโ”€โ”€ MessageBubble.tsx
โ”‚           โ”‚   โ”œโ”€โ”€ AgentSidebar.tsx
โ”‚           โ”‚   โ”œโ”€โ”€ MetricsDashboard.tsx
โ”‚           โ”‚   โ”œโ”€โ”€ InterventionPanel.tsx
โ”‚           โ”‚   โ”œโ”€โ”€ RadialGauge.tsx
โ”‚           โ”‚   โ””โ”€โ”€ ...
โ”‚           โ””โ”€โ”€ ui/                 # shadcn/ui components
โ”‚
โ””โ”€โ”€ README.md

๐Ÿ”Œ API Reference

Authentication

Method Endpoint Description
POST /api/auth/register Register with email/password
POST /api/auth/login Login with email/password
POST /api/auth/google Google OAuth sign-in
GET /api/auth/me Get current user profile
GET /api/auth/me/simulations Get user's simulation history

Simulation

Method Endpoint Description
POST /api/simulation/create Create & launch a new simulation
GET /api/simulation/{id}/status Get simulation state & messages
POST /api/simulation/{id}/intervene Send God-Mode intervention
GET /api/simulation/{id}/report Generate executive report
POST /api/simulation/generate-crisis AI-generate a crisis scenario

Other

Method Endpoint Description
GET /api/agents/presets Get preset agent configurations
POST /api/document/analyze Upload & analyze document with AI
WS /ws/simulation/{id} WebSocket: real-time simulation stream
GET /health Backend health check

๐ŸŽฎ How It Works

   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
   โ”‚  1. SETUP โ”‚โ”€โ”€โ”€โ–ถโ”‚ 2. CRISISโ”‚โ”€โ”€โ”€โ–ถโ”‚ 3. LIVE  โ”‚โ”€โ”€โ”€โ–ถโ”‚ 4. REPORTโ”‚
   โ”‚  Team &   โ”‚    โ”‚  Inject  โ”‚    โ”‚  Observe โ”‚    โ”‚  Analyze โ”‚
   โ”‚  Company  โ”‚    โ”‚  Scenarioโ”‚    โ”‚  & Act   โ”‚    โ”‚  Results โ”‚
   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
  1. Setup โ€” Configure your company profile, assemble a team (4-8 agents) with custom personalities, and choose simulation parameters.
  2. Crisis Injection โ€” Select a pre-built crisis (layoffs, CEO resignation, database wipe) or let AI generate one from uploaded documents.
  3. Live Simulation โ€” Watch agents debate, propose solutions, burn out, or resign in real-time. Use God-Mode to intervene with bonuses, pizza parties, or overtime cancellation.
  4. Report โ€” Receive an AI-generated executive report with per-agent analysis, morale/stress timelines, survival classifications, and actionable recommendations.

Simulation Engine Details

  • 5-Phase Narrative Arc: Crisis Shock โ†’ Debate & Proposals โ†’ Escalation โ†’ Resolution Attempt โ†’ Aftermath
  • Personality-Weighted State Machine: Morale, stress, loyalty, and productivity changes are modulated by each agent's unique personality traits
  • Hidden Agendas: Agents have secret motivations that subtly influence their proposals and alliances
  • Random Events: Unexpected events (client threats, security breaches, investor calls) inject chaos into the simulation
  • Critical Events: Resignation, burnout, and warning detection based on personality-adjusted thresholds
  • 6 Possible Outcomes: Team Triumph ๐Ÿ† | Negotiated Settlement ๐Ÿค | Pyrrhic Victory โšก | Team Fracture ๐Ÿ’” | Total Collapse ๐Ÿ”ฅ | Stalemate โณ

๐ŸŒ Live Demo

Frontend: https://teamdynamics.vercel.app Backend API: Hosted on Railway


๐ŸŽฌ Demo Video

๐Ÿ“บ Watch the Demo on YouTube


๐Ÿงช Testing (TestSprite)

This project was tested using TestSprite MCP with 35 automated end-to-end test cases covering:

Category Tests Pass Rate
Authentication (register, login, OAuth, guards) 6 100%
Dashboard (stats, history, logout) 4 50%*
Simulation Setup (wizard, agents, crisis gen) 4 100%
Report & Analytics (metrics, PDF export, share) 6 83%
Landing Page & Navigation (CTAs, 404, docs) 4 75%**
Theme & Accessibility 3 100%

*TC008 and TC016 failures were root-caused and fixed post-test run. **TC015 blocked due to test plan targeting a deprecated feature โ€” not a product defect.

๐Ÿ“‚ All test cases and the full report are in testsprite_tests/.


๐Ÿ›ฃ๏ธ Roadmap

  • Parallel simulation execution for A/B testing
  • Agent-to-agent private messaging channels
  • Historical simulation replay
  • Custom personality trait definitions
  • Team template library (save & share configurations)
  • Slack / Teams integration for output distribution
  • Subscription-based pricing with tiered credits
  • Admin dashboard with user management

๐Ÿ“„ License

This project is proprietary. All rights reserved.


Built with passion, caffeine, and a whole lot of AI for Hackathon Season 2.

About

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors