Cortex Arena is a predictive crowd management platform designed for large-scale sporting and entertainment venues. It leverages real-time simulation and autonomous AI orchestration to improve attendee movement, safety, and overall venue experience.
The system is tailored for the Sports and Large-Scale Venue vertical. It addresses the unique challenges of high-density spikes common in stadiums, such as halftime rushes, goal-scoring celebrations, and synchronized mass exits.
The Cortex Assistant is a real-time AI concierge that provides attendees with navigation guidance and facility information based on live stadium congestion.
The dashboard provides a high-fidelity visual representation of stadium topology, featuring predictive density heatmaps and an autonomous AI Orchestrator console for real-time crowd management.
The platform is built on a multi-layer architecture combining deterministic logic with generative intelligence:
- Backend (Python/FastAPI):
- Simulation Engine: A custom-built engine modeling crowd dynamics across 24 distinct stadium zones.
- AI Orchestrator: Monitors zone densities and triggers interventions. Now features an Autonomous/Manual toggle for intervention control.
- Predictive Analytics: The system projects density trends 90 seconds into the future, allowing for pre-emptive bottlenecks mitigation.
- Gemini Optimization: Integrated Gemini Flash Lite with a global cooldown and response caching to ensure high reliability and mitigate rate limits (429 errors).
- Frontend (Next.js/React):
- Real-Time Telemetry: Websocket-driven dashboard providing sub-second latency updates.
- Visual Fidelity: Uses Framer Motion for smooth transitions in flow arrows and heatmaps.
- Guidance System: Real-time attendee routing via digital signage and the interactive concierge.
The system manages crowd flow through four primary mechanisms:
- Real-Time Monitoring:
- Tracks capacity and occupancy across all zones (Nominal, Congested, Critical).
- Impact metrics include Total Occupancy, Congested Zones, Flow Efficiency, and Avg. Wait Time.
- Autonomous Interventions:
- Automatically triggers redirects when zones hit critical thresholds.
- Identifies the least crowded neighboring zones to reroute traffic effectively.
- Situational AI Insights:
- Provides high-level situational awareness logs, explaining the why behind automated actions.
- Reliability Layer:
- Implements a robust backend with retry logic, fallbacks, and cost-efficient LLM utilization.
During the design and implementation of Cortex Arena, the following assumptions were made:
- High Compliance: Attendees follow digital signage and AI-guided recommendations.
- Network Reliability: Consistent WebSocket connectivity for real-time telemetry.
- Static Infrastructure: Fixed stadium layout during the event duration.
Cortex Arena is deployed on Google Cloud Run using a containerized, serverless architecture.
- Frontend (Next.js) and Backend (FastAPI) are deployed as separate services
- Real-time communication is handled via secure HTTP and WebSocket (WSS)
- Environment variables (e.g., GOOGLE_API_KEY) are managed securely through Cloud Run
Access the platform here: https://cortex-frontend-263130631276.asia-south1.run.app
- Google AI API Key (Set as
GOOGLE_API_KEYin.env) - Python 3.11+
- Node.js 20+
- From the root directory, run:
docker-compose up - Access the dashboard at http://localhost:3000
- Access the API documentation at http://localhost:8000/docs