Hermes Camera Control is a small Python library plus a Hermes Agent plugin for controlling a local UVC camera such as the Insta360 Link.
It gives Hermes callable tools to:
- inspect camera availability and V4L2 controls,
- capture still photos,
- record timed videos,
- move pan, tilt, zoom, and focus controls smoothly,
- record video while moving the camera,
- analyze captured media with the Antigravity CLI (
agy).
The code is intentionally split into a reusable controller library and a thin Hermes plugin wrapper. The controller is testable without camera hardware; the plugin is only responsible for registering Hermes tools.
Tested on Linux with an Insta360 Link exposed as /dev/video0.
Verified hardware behavior:
- still photo capture at
1920x1080, - timed video recording,
- recording shutdown after fixed duration,
- pan/tilt/zoom movement via
v4l2-ctl, - recording while moving,
- media interpretation via
agy --model "Gemini 3.5 Flash (Low)".
.
├── hermes_plugin/camera_control/ # Hermes plugin wrapper
├── src/hermes_camera_control/ # reusable Python controller
├── tests/ # stdlib unittest tests
├── pyproject.toml
└── README.md
Runtime tools:
- Python 3.11+
ffmpegffprobev4l-utilsforv4l2-ctlagyfor media interpretation- a UVC camera exposed as
/dev/video*
On Debian/Ubuntu:
sudo apt-get update
sudo apt-get install -y ffmpeg v4l-utilsagy must be installed and logged in separately.
Clone this repository somewhere persistent:
git clone [email protected]:RithvikKasarla/HermesCamera.git ~/hermes-camera-controlExpose the plugin to Hermes:
mkdir -p ~/.hermes/plugins
ln -s ~/hermes-camera-control/hermes_plugin/camera_control ~/.hermes/plugins/camera_controlEnable the plugin in ~/.hermes/config.yaml:
plugins:
enabled:
- camera_controlRestart Hermes or reload plugin discovery.
The plugin registers these tools in the camera_control toolset:
| Tool | Purpose |
|---|---|
camera_status |
Show visible /dev/video* devices, helper tools, recording state, and V4L2 controls. |
camera_capture_photo |
Capture a still image. Defaults to ~/Pictures/Camera. |
camera_record_video |
Start, stop, or inspect a recording. Defaults to ~/Videos/Camera. |
camera_move |
List, set, home, or smoothly move pan/tilt/zoom/focus controls. |
camera_interpret |
Ask agy to interpret a captured photo or video. |
Capture a photo:
{
"device": "/dev/video0",
"width": 1920,
"height": 1080
}Record a timed video:
{
"action": "start",
"device": "/dev/video0",
"duration_seconds": 5,
"width": 1280,
"height": 720,
"fps": 30
}Record while moving:
{
"action": "start",
"device": "/dev/video0",
"duration_seconds": 8,
"motion_path": [
{"pan": -36000, "tilt": 0, "zoom": 100, "duration_ms": 1000},
{"pan": 36000, "tilt": 36000, "zoom": 130, "duration_ms": 2500},
{"pan": 0, "tilt": 0, "zoom": 100, "duration_ms": 2500}
],
"motion_step_ms": 150
}Interpret a captured video with a low-latency model:
{
"path": "/home/rithvik/Videos/Camera/hermes-moving-video-5s.mp4",
"prompt": "Summarize the room scan and describe camera movement.",
"model": "Gemini 3.5 Flash (Low)",
"timeout_seconds": 180
}Hermes should send captured media as native attachments, not just paths. Use
Hermes' send_message tool with MEDIA:/absolute/path:
{
"target": "telegram",
"message": "Here is the room scan.\nMEDIA:/home/rithvik/Videos/Camera/hermes-moving-video-5s.mp4"
}The tests use only Python's standard library.
PYTHONPATH=src python3 -m unittest -v tests.test_controller tests.test_hermes_pluginIf the Hermes checkout is not at ~/.hermes/hermes-agent, set:
HERMES_AGENT_DIR=/path/to/hermes-agent PYTHONPATH=src python3 -m unittest -v tests.test_hermes_pluginThis repository should not contain credentials, camera captures, videos, logs, or Hermes config files. It only contains source code, tests, and documentation.
Before publishing, verify:
git status --short
rg -n "(BEGIN .*PRIVATE KEY|AKIA[0-9A-Z]{16}|ghp_|github_pat_|sk-|api[_-]?key|token|password|secret)" .The default .gitignore excludes Python caches, virtual environments, build
outputs, and package metadata.