Autonomous multi-agent orchestration system for real-time railway anomaly detection, reasoning, department task dispatching, and live operations management.
RailMind operates on an autonomous LangGraph pipeline, pulling telemetry, analyzing safety parameters, generating intelligent mitigation plans via Claude, dispatching actions, and broadcasting live updates.
+--------------------------------+
| Indian Railways API |
+---------------+----------------+
|
v
+---------------+----------------+
| Ingest Node |
+---------------+----------------+
|
v
+---------------+----------------+
| Detect Node |
+---------------+----------------+
|
+---------------------+---------------------+
| (Anomalies detected?) | (No anomalies)
v Yes v
+-----------+------------+ +---------+--------+
| Reason Node | | End Loop / |
| (Claude 3.5 Sonnet) | | Ingest Node |
+-----------+------------+ +------------------+
|
v
+-----------+------------+
| Reroute Node |
+-----------+------------+
| Calculates bypass |
| routes & detours |
+-----------+------------+
|
v
+-----------+------------+
| Coordination Agent |
+-----------+------------+
|
+-----------------------+-----------------------+
| | |
v v v
+-----------+-----------+ +---------+-----------+ +---------+-----------+
| Maintenance Task | | Operations Task | | Station Manager Task|
| - Repair dispatch | | - Rerouting execution| | - Announcements & |
| - High urgency | | - Medium/High urgency| | platform updates |
+-----------+-----------+ +---------+-----------+ +---------+-----------+
| | |
+-----------------------+-----------------------+
|
v
+-----------+-----------+
| Alert Node | (Twilio SMS triggers)
+-----------+-----------+
|
v
+-----------+-----------+
| Report Node | (Resets state & logs loop)
+-----------+-----------+
|
+-------------+-------------+
| |
v v
+-------------+-------------+ +-----------+-------------+
| MongoDB Server | | WebSocket Server |
| - Incidents Collection | | - Real-time stream |
| - Tasks Collection | | - Live operations logs |
+---------------------------+ +-----------+-------------+
|
v
+-----------+-------------+
| React Dashboard |
+-------------------------+
| Component | Technology | Purpose |
|---|---|---|
| Backend Framework | FastAPI (Python) | High-performance asynchronous REST and WebSocket API server. |
| Orchestration | LangGraph | State-machine graph modeling for reliable multi-agent workflows. |
| Reasoning Engine | Claude 3.5 Sonnet (Anthropic) | Multi-parameter decision-making, incident summary compilation, and department task formulation. |
| Database | MongoDB | Persistent document storage for live incident reports and department task boards. |
| Notifications | Twilio SMS API | Instant notifications to operational heads during critical alerts. |
| Frontend Framework | React 19 + Vite | Premium responsive dashboard utilizing dynamic rendering. |
| Telemetry Map | React-Leaflet (Leaflet.js) | Dynamic map widget with custom train location markers. |
| Styling | Vanilla CSS | Custom theme control, layout aesthetics, and smooth animations. |
- Autonomous Telemetry Ingestion: Seamless ingestion of live Indian Railways trains, locations, and time tables.
- Safety Parameter Guardians: Real-time evaluation of speed limits, route adherence, and delay metrics.
- Cognitive Incident Reasoning: Employs Claude 3.5 Sonnet to construct incident summaries and dynamically structure corrective tasks.
- Multi-Department Coordination: Automatically translates Claude's findings into actionable items across Maintenance, Operations, and Station Management dashboards.
- Proactive Twilio Alerts: Instantly triggers SMS notifications to target coordinators for critical speed warnings or severe track delays.
- Operations Log Console: Terminal emulator interface streaming state-graph logs and system steps live to the control room.
- Live Interactive Dashboard: Responsive controls for approving reroute plans, resolving department tasks, and visualizing maps.
- Python 3.11+ installed.
- Node.js 18+ installed.
- MongoDB running locally (port
27017) or a MongoDB Atlas connection string.
Clone the repository to your machine:
git clone https://github.com/Shreyam007/RailMind.git
cd RailMind/railmindCreate a .env file in the backend/ directory:
cp backend/.env.example backend/.envPopulate the variables in backend/.env with your active keys.
- Create a Python virtual environment:
python -m venv venv source venv/Scripts/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r backend/requirements.txt
- Open a new terminal in the
frontend/directory. - Install npm packages:
npm install
Configure these keys inside your backend/.env file:
| Variable | Description | Example |
|---|---|---|
MONGODB_URI |
MongoDB Connection URL | mongodb://localhost:27017/railmind |
ANTHROPIC_API_KEY |
Claude Anthropic developer API key | sk-ant-api03-... |
TWILIO_ACCOUNT_SID |
Twilio Account Identifier | ACxxxxxxxxxxxxxxxxxxxxxxxx |
TWILIO_AUTH_TOKEN |
Twilio API Authorization token | your_auth_token_here |
TWILIO_PHONE_NUMBER |
Twilio SMS sender phone number | +1234567890 |
COORDINATOR_PHONE_NUMBER |
SMS notification recipient | +1987654321 |
Ensure your MongoDB instance is running, then execute:
From the railmind root directory (with your virtual environment active):
python -m uvicorn backend.api.main:app --host 127.0.0.1 --port 8000The API documentation will be available at http://127.0.0.1:8000/docs.
From the railmind/frontend directory:
npm run devOpen your browser to http://localhost:5173/ to view the live dashboard.
Access the live deployment: [TO BE FILLED]
Team Name:
nitishrg.8220psgps2020Institution: PSG College of Technology, Coimbatore
| # | Name | Role |
|---|---|---|
| 1 | Nitish R G π | Team Leader |
| 2 | Prithic P | Member |
| 3 | Shreyam Pandey | Member |
| 4 | Padmanabhan SureshBabu | Member |
| 5 | Aswin R | Member |