Inspiration:-

Railway disruptions often lead to cascading delays, congestion, and operational challenges that affect thousands of passengers. While existing systems provide monitoring dashboards, many recovery decisions still rely on manual coordination. We wanted to build an AI-powered decision support platform that combines a real-time railway digital twin, intelligent planning, and human oversight to help dispatchers respond faster, make safer decisions, and improve overall network resilience. Our goal was to demonstrate how AI can enhance critical infrastructure without replacing human operators.

What it does:-

NEXUS AI is an AI-powered railway operations platform that continuously monitors a live railway digital twin and assists dispatchers during operational disruptions.

When an incident occurs, the platform:

  1. Detects and visualizes disruptions in real time.
  2. Analyzes network state, train locations, congestion, passenger load, energy usage, and operational constraints.
  3. Generates multiple recovery strategies using OpenAI's Responses API together with deterministic railway planning.
  4. Validates every recommendation against safety and operational rules.
  5. Explains why each strategy was selected and presents confidence, risks, alternatives, and expected impact.
  6. Allows dispatchers to approve or reject recommendations before execution.
  7. Commits approved strategies to the simulator while maintaining a complete audit trail and replay history.

The result is a complete human-in-the-loop AI workflow rather than a simple chatbot or dashboard.

How we built it:-

We built NEXUS AI as a full-stack AI system.

  1. The frontend uses React, TypeScript, Vite, React Flow, Leaflet, and Tailwind CSS to provide an interactive operations cockpit with live maps, planner workflows, telemetry, replay, and analytics.

  2. The backend is powered by FastAPI and Python, with SimPy driving the railway simulation and NetworkX modeling the railway graph and routing logic.

  3. For AI capabilities, we integrated OpenAI's Responses API to perform structured recovery planning using tool-based reasoning. Every AI-generated recommendation is validated against deterministic railway rules, ensuring that operational safety is never compromised. If AI is unavailable, the platform automatically falls back to a fully local planning engine, guaranteeing uninterrupted operation.

  4. Real-time communication is handled through Server-Sent Events (SSE), while SQLite stores audit logs, planner history, and replay data.

  5. Throughout development we used OpenAI Codex extensively as an engineering collaborator. Codex accelerated implementation, debugging, testing, architecture refinement, documentation, refactoring, and feature development, allowing us to focus on system design instead of repetitive coding tasks.

Challenges we ran into:-

The hardest challenge was balancing AI flexibility with the reliability expected from critical infrastructure.

Unlike traditional AI applications, every recommendation needed to be explainable, validated, and safe before execution.

Some of our biggest challenges included:

  1. Designing a realistic railway digital twin instead of a static visualization.
  2. Integrating AI planning without allowing unsafe recommendations.
  3. Building deterministic validation that could independently verify AI output.
  4. Maintaining smooth real-time synchronization between simulation, backend, and frontend.
  5. Creating an intuitive operator experience while exposing complex system behavior.
  6. Ensuring the platform remained functional even if the AI service became unavailable.

These challenges pushed us to design a system where AI augments human expertise rather than replacing it.

Accomplishments that we're proud of:-

  1. Built a complete AI-assisted railway operations platform instead of a standalone chatbot.
  2. Successfully combined a real-time digital twin with AI-assisted recovery planning.
  3. Implemented a human-in-the-loop approval workflow for safe decision making.
  4. Developed deterministic fallback planning alongside optional OpenAI-enhanced reasoning.
  5. Added replay, audit logging, scenario management, and validation for complete operational transparency.
  6. Built a modern, interactive operations dashboard capable of demonstrating real-time railway management.
  7. Used OpenAI Codex extensively to improve engineering productivity, code quality, testing, and documentation.

What we learned:-

Building NEXUS AI fundamentally changed how we think about AI systems.

We learned that the most valuable AI applications are not those that replace experts, but those that amplify human decision-making through structured reasoning, transparency, and validation.

Technically, we gained experience with:

1 . OpenAI Responses API

  1. Agentic workflows
  2. Tool-based reasoning
  3. Human-in-the-loop AI
  4. Real-time distributed systems
  5. Digital twin architectures
  6. Simulation modeling
  7. Event-driven backend design
  8. Safety validation for AI-generated actions
  9. AI-assisted software engineering with OpenAI Codex

Perhaps the biggest lesson was that combining deterministic engineering with modern AI creates systems that are both intelligent and trustworthy.

What's next for NEXUS - AI:-

NEXUS AI is designed as more than a railway platform—it is the foundation for an AI operating system for critical infrastructure.

Our roadmap includes:

  1. Integration with live railway telemetry and operational data.
  2. Predictive disruption forecasting using historical and real-time signals.
  3. Weather-aware and energy-aware recovery planning.
  4. Reinforcement learning for long-term network optimization.
  5. Advanced passenger flow prediction and congestion management.
  6. Multi-agent collaboration across dispatch, maintenance, and operations.
  7. Richer digital twin capabilities with scenario forecasting and impact analysis.
  8. Expansion to airports, ports, logistics networks, and smart energy grids using the same AI decision framework.

Our vision is to build AI systems that help operators make faster, safer, and more informed decisions across the world's most critical infrastructure.

Built With

Share this project:

Updates