Quick Example
Events vs Alerts
| Concept | Purpose | Example |
|---|---|---|
| Event | What to detect (reusable rule) | “Detect person without helmet” |
| Alert | Where to deliver (wiring) | Webhook URL, WebSocket ID |
Delivery Methods
| Method | Latency | Use Case |
|---|---|---|
| WebSocket | Real-time | Dashboards, interactive apps |
| Webhook | Near real-time | Automation, integrations |
WebSocket
Webhook
Latency Profile
| Operation | Typical Latency |
|---|---|
| Alert trigger | < 1 second |
| Transcript event | 1-2 seconds |
| Visual index event | 2-5 seconds |
| Search query | < 500ms |
Delivery Guarantees
| Method | Guarantee | Handle |
|---|---|---|
| WebSocket | At-most-once | Client reconnects |
| Webhook | At-least-once | Idempotency checks |
Event Channels
| Channel | Source | Content |
|---|---|---|
transcript | start_transcript() | Speech-to-text |
scene_index | index_visuals() | Visual analysis |
audio_index | index_audio() | Audio analysis |
alert | create_alert() | Alert notifications |
Best Practices
- Make events reusable - Define once, use across streams
- Be specific in prompts - “Detect person falling” beats “detect problems”
- Use both methods - WebSocket for UI, webhooks for automation
- Handle idempotency - Webhooks may deliver duplicates
What You Can Build
Baby Crib Monitoring
Real-time infant monitoring with AI-powered alerts
Intrusion Detection
Sub-second alerts when unauthorized access is detected
Traffic Violations
Real-time detection of red light and stop sign violations