Documentation

The Camera Agent

The camera agent is OpenNVR’s conversational front end — and a complete operator product in its own right. Ask by voice or text; everything runs on your hardware (Whisper → a local Ollama LLM with tool-calling → Piper, or any OpenAI-compatible endpoint you bring).

The screens

  • All cameras: live thumbnails per camera. Tap to peek — the agent drops that camera’s current frame into the chat with “Open →” and “📌 Ask about this frame” actions. Pin a frame and your next question is answered about that exact moment, not whatever the camera sees by the time the tools run.
  • Per-camera screen (/demo/camera/<id>, deep-linkable): plays the same WebRTC stream as the NVR’s Live view (stills are only a labelled fallback), with a scrub-back review ring of the last few minutes, detection markers on the track, and the server’s recorded segments played inline — ● LIVE always snaps back. Talk/Ask are scoped to that camera; Watch/Alarm are one-tap popovers.

Standing work

Panel What it is
Events ONE feed of alarm rings, watch hits, and app alerts. Click an event → the camera opens at that timestamp (review ring first, covering recording second, live as fallback).
Alarms Armed conditions with four annunciation levels: 🚨 siren (latches until silenced), ⚠️ pulse (loud ~1 min, stands down), 🔔 chime (one ding), 🤫 silent (log + push). Per-target defaults are site-configurable and editable in the UI (⚙ in the Alarms card).
Watching Standing monitors — notify-when-seen, live counts, line crossings — hosted on the same SDK rules the store apps run.
Background tasks Long jobs (“check every camera for a red shirt”) run off-thread; the answer lands back in chat.
Scheduled reports “Every morning at 7, summarise overnight activity” — daily or every-N-minutes, delivered to chat and your alert channels.
Hardware What your enabled skills run on vs. what makes them fast, derived from live adapter capabilities — advisory, never a gate.

Notifications

Alarms, watch hits, finished tasks, and reports fan out to webhooks (Slack, Discord, Teams, Home Assistant, n8n — one JSON POST) and to Apprise (pip install apprise): email, Telegram, ntfy phone push, Pushover, SMS — 100+ services from one config list. With agent_public_url set, every push carries a tap-to-open deep link to the right camera’s screen.

Authentication

auth_mode: opennvr delegates sign-in to your OpenNVR server — the agent never mints credentials. Three tiers from your existing RBAC roles: viewers look and chat (the mutating chat tools are physically removed from their toolset), operators arm and manage, admins govern skills and site policy. Bearer + refresh tokens, no cookies — the same contract a future mobile app will use.

Quickstart

examples/camera-agent/quickstart.sh          # voice
examples/camera-agent/quickstart.sh --chat   # text-only, lightest CPU

See examples/camera-agent/README.md, ALARMS.md, and NOTIFICATIONS.md in the main repository for configuration detail.