Real-Time Multimodal Safety Agent built with Vision Agents SDK.
Sentinel AI monitors live video and audio streams, detects workplace safety violations, classifies risk severity, and logs incidents in real time using LLM reasoning and tool calling.
- Helmet not worn ->
HIGHrisk - Phone detected ->
MEDIUMrisk - Loud sound detected ->
LOW,MEDIUM, orHIGHrisk
| Layer | Technology |
|---|---|
| Agent Framework | Vision Agents SDK |
| Realtime Transport | Stream Video (getstream.Edge) |
| Reasoning | OpenAI Realtime (gpt-realtime-1.5) |
| Vision Detection | Roboflow (helmet + phone), YOLO fallback |
| Audio Detection | NumPy RMS processor |
| Media Processing | OpenCV, AV |
| Frontend | React + @stream-io/video-client |
| Deployment | Railway (backend), Vercel (frontend) |
Camera + Mic (Frontend)
|
v
Stream Call (shared call ID)
|
+--> Sentinel Agent (Vision Agents SDK)
|
+--> Video processor -> Roboflow helmet/phone inference
+--> Audio processor -> RMS noise risk
+--> OpenAI Realtime reasoning + tool-calling
|
+--> Custom events: incident_log, risk_status, warning
|
v
React Incident Panel (newest-first logs + summary)
Run from repo root.
py -3.13 -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install -e .
Copy-Item examples/10_sentinel_ai/.env.example .envFill real keys in .env:
STREAM_API_KEYSTREAM_API_SECRETOPENAI_API_KEYROBOFLOW_API_KEY
.\.venv\Scripts\Activate.ps1
python examples/10_sentinel_ai/sentinel_ai.py run --no-demo --call-id sentinel-live-001 --log-level info.\.venv\Scripts\Activate.ps1
python examples/10_sentinel_ai/frontend/dev_server.pyhttp://localhost:5500/preview.html
In UI:
- Enable
Helmet Mode (send camera to agent) - Click
Connect to Call - Click
Start Monitoring
- No helmet in camera -> incident log shows
HIGH+ helmet type - Hold phone visibly -> incident log shows
MEDIUM+ phone type - Clap/loud sound -> incident log shows sound type + risk
- Click
Generate Summary-> summary entry appears in incident log
- Real-time multimodal safety monitoring (video + audio)
- Live incident feed and risk status updates
- Tool-calling for autonomous logging and warning workflows
- False-positive controls for phone detection:
- confidence threshold
- person-required gate
- multi-frame confirmation
- Internet is required (Stream + Roboflow APIs)
- Accuracy depends on camera angle, lighting, and model quality
- Frontend/backend must use the same call ID, otherwise incidents will not appear
- Realtime session can drop on unstable networks
.envis ignored and should never be committed- Use
.env.exampleas the template for public setup - Rotate API keys immediately if exposed
Sentinel AI combines processor signals from vision and audio before invoking LLM reasoning:
- Vision processors detect helmet/phone events.
- Audio processor computes RMS loudness bands.
- Structured event payload is sent to the LLM.
- LLM classifies risk (
LOW,MEDIUM,HIGH) and calls tools:log_incidentspeak_warning
- Frontend receives
incident_logandrisk_statuscustom events in real time.
