{"id":"8327bdd7-b59d-46f8-a3fc-f3ae639213c9","entityType":"agent","slug":"clawhub-13681882136-kami-video-search","name":"Kami Video Search","canonicalUrl":"https://www.xpersona.co/agent/clawhub-13681882136-kami-video-search","canonicalPath":"/agent/clawhub-13681882136-kami-video-search","generatedAt":"2026-10-11T04:36:20.582Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T02:04:02.144Z","emptyReason":null},"description":"RTSP/RTMP multi-camera stream recording with AI-powered video search. Start/stop recording, check status, search clips by natural language, list recent event...","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.2K downloads reported by the source. Last updated 10/11/2026.","installCommand":"clawhub skill install s170wja1qf8kmkzj5brvhsj1r185a522:kami-video-search","sourceUrl":"https://clawhub.ai/13681882136/kami-video-search","homepage":"https://clawhub.ai/13681882136/skills/kami-video-search","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/13681882136/kami-video-search","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/13681882136/skills/kami-video-search","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":62,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Kami Video Search technical dossier on Xpersona with agent coverage, OPENCLEW support, and live trust metadata."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-11T02:04:02.144Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T02:04:02.144Z","emptyReason":null},"stars":null,"forks":null,"downloads":1196,"packageName":null,"latestVersion":"1.1.2","tractionLabel":"1.2K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T02:04:02.076Z","emptyReason":null},"lastUpdatedAt":"2026-10-11T02:04:02.144Z","lastCrawledAt":"2026-10-11T02:04:02.076Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-12T02:04:02.076Z","lastVerifiedAt":null,"highlights":[{"version":"1.1.2","createdAt":"2026-06-10T06:31:04.546Z","changelog":"- Corrected the skill name from \"kamivision-recorder\" in metadata. - Updated RTSP brand table instructions, now explicitly stating the table MUST be shown to the user during camera configuration. - No modifications to capabilities, feature set, or core logic—documentation and onboarding clarity improved.","fileCount":8,"zipByteSize":26459},{"version":"1.1.1","createdAt":"2026-06-10T01:28:37.681Z","changelog":"- Renamed skill from \"kamivision-recorder\" to \"kami-video-search\" for better alignment with features. - Added common RTSP URL templates for major camera brands to the documentation for easier camera setup. - Updated documentation and config guidance; clarified pre-recording setup steps and camera configuration scenarios. - Removed the obsolete skill card file (skill-card.md) and improved README/metadata clarity.","fileCount":8,"zipByteSize":26267},{"version":"1.1.0","createdAt":"2026-05-29T05:33:38.006Z","changelog":"## kami-video-search 1.1.0 Changelog - Updated documentation in README.md for improved clarity and instructions. - No changes made to code or functionality; update is documentation only.","fileCount":8,"zipByteSize":26016},{"version":"1.0.9","createdAt":"2026-05-29T03:28:52.430Z","changelog":"**Multi-camera support, improved setup and configuration flows.** - Added support for simultaneous multi-camera RTSP/RTMP recording and management. - Updated config format: cameras are now configured as an array with DEVICE_ID and STREAM_URL for each. - Enhanced start/stop/status/search commands now accept one or more cameras via `--device`; defaults to all configured cameras if omitted. - Interactive setup guides user through adding and confirming multiple cameras; improved clarity and error handling for config. - Legacy single-camera configs remain supported for backward compatibility. - Documentation (README.md, SKILL.md) updated to reflect new features and flows. - Removed deprecated skill-card.md file.","fileCount":8,"zipByteSize":26080},{"version":"1.0.8","createdAt":"2026-05-28T01:43:01.040Z","changelog":"- Removed the file skill-card.md from the project. - No changes to core functionality or user-facing features.","fileCount":8,"zipByteSize":22291},{"version":"1.0.7","createdAt":"2026-05-27T05:47:30.847Z","changelog":"**kamivision-recorder v1.0.7 Changelog** - Simplified and clarified setup process: new setup.sh script for automating virtual environment and dependency installation. - Greatly condensed and improved SKILL.md instructions; removed verbose/manual step processes in favor of a streamlined, user-friendly configuration flow. - Added clear hardware requirements in metadata. - All commands and configuration instructions updated for consistency with new file structure and workflow. - More concise parameter explanations for STREAM_URL and KAMI_API_KEY, with clear error and retry behavior. - Improved privacy and language guidance documentation.","fileCount":8,"zipByteSize":22346},{"version":"1.0.6","createdAt":"2026-05-13T08:06:04.079Z","changelog":"## Kami Video Search Skill 1.0.6 Changelog - Documentation updated in README.md and SKILL.md for improved clarity and setup details. - No code or feature changes; update focuses purely on clearer setup and usage instructions.","fileCount":6,"zipByteSize":29214},{"version":"1.0.5","createdAt":"2026-05-13T07:59:04.852Z","changelog":"- Greatly shortened and clarified the SKILL.md documentation for users. - Removed redundant and excessively long parameter explanations. - Kept setup instructions, trigger word lists, and major operational steps clear and actionable. - Focused on practical configuration and guidance, improving readability for new users. - No functional code changes; documentation only.","fileCount":6,"zipByteSize":27828}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s170wja1qf8kmkzj5brvhsj1r185a522:kami-video-search","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s170wja1qf8kmkzj5brvhsj1r185a522:kami-video-search` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/13681882136/kami-video-search before using production credentials."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-13681882136-kami-video-search/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-13681882136-kami-video-search/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-13681882136-kami-video-search/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-13681882136-kami-video-search/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-13681882136-kami-video-search/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-13681882136-kami-video-search/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-11T04:36:20.577Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-13681882136-kami-video-search/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-13681882136-kami-video-search/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-13681882136-kami-video-search/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-13681882136-kami-video-search/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T02:04:02.144Z","emptyReason":null},"readme":"Skill: Kami Video Search\n\nOwner: 13681882136\n\nSummary: RTSP/RTMP multi-camera stream recording with AI-powered video search. Start/stop recording, check status, search clips by natural language, list recent event...\n\nTags: latest:1.1.2\n\nVersion history:\n\nv1.1.2 | 2026-06-10T06:31:04.546Z | auto\n\n- Corrected the skill name from \"kamivision-recorder\" in metadata.\n- Updated RTSP brand table instructions, now explicitly stating the table MUST be shown to the user during camera configuration.\n- No modifications to capabilities, feature set, or core logic—documentation and onboarding clarity improved.\n\nv1.1.1 | 2026-06-10T01:28:37.681Z | auto\n\n- Renamed skill from \"kamivision-recorder\" to \"kami-video-search\" for better alignment with features.\n- Added common RTSP URL templates for major camera brands to the documentation for easier camera setup.\n- Updated documentation and config guidance; clarified pre-recording setup steps and camera configuration scenarios.\n- Removed the obsolete skill card file (skill-card.md) and improved README/metadata clarity.\n\nv1.1.0 | 2026-05-29T05:33:38.006Z | auto\n\n## kami-video-search 1.1.0 Changelog\n\n- Updated documentation in README.md for improved clarity and instructions.\n- No changes made to code or functionality; update is documentation only.\n\nv1.0.9 | 2026-05-29T03:28:52.430Z | auto\n\n**Multi-camera support, improved setup and configuration flows.**\n\n- Added support for simultaneous multi-camera RTSP/RTMP recording and management.\n- Updated config format: cameras are now configured as an array with DEVICE_ID and STREAM_URL for each.\n- Enhanced start/stop/status/search commands now accept one or more cameras via `--device`; defaults to all configured cameras if omitted.\n- Interactive setup guides user through adding and confirming multiple cameras; improved clarity and error handling for config.\n- Legacy single-camera configs remain supported for backward compatibility.\n- Documentation (README.md, SKILL.md) updated to reflect new features and flows.\n- Removed deprecated skill-card.md file.\n\nv1.0.8 | 2026-05-28T01:43:01.040Z | auto\n\n- Removed the file skill-card.md from the project.\n- No changes to core functionality or user-facing features.\n\nv1.0.7 | 2026-05-27T05:47:30.847Z | auto\n\n**kamivision-recorder v1.0.7 Changelog**\n\n- Simplified and clarified setup process: new setup.sh script for automating virtual environment and dependency installation.\n- Greatly condensed and improved SKILL.md instructions; removed verbose/manual step processes in favor of a streamlined, user-friendly configuration flow.\n- Added clear hardware requirements in metadata.\n- All commands and configuration instructions updated for consistency with new file structure and workflow.\n- More concise parameter explanations for STREAM_URL and KAMI_API_KEY, with clear error and retry behavior.\n- Improved privacy and language guidance documentation.\n\nv1.0.6 | 2026-05-13T08:06:04.079Z | auto\n\n## Kami Video Search Skill 1.0.6 Changelog\n\n- Documentation updated in README.md and SKILL.md for improved clarity and setup details.\n- No code or feature changes; update focuses purely on clearer setup and usage instructions.\n\nv1.0.5 | 2026-05-13T07:59:04.852Z | auto\n\n- Greatly shortened and clarified the SKILL.md documentation for users.\n- Removed redundant and excessively long parameter explanations.\n- Kept setup instructions, trigger word lists, and major operational steps clear and actionable.\n- Focused on practical configuration and guidance, improving readability for new users.\n- No functional code changes; documentation only.\n\nv1.0.4 | 2026-05-13T07:56:08.361Z | auto\n\n- Skill renamed from \"kamivision-recorder\" to \"kamivision-recorder\" (no effective change; possible typo fix).\n- SKILL.md and README.md updated to remove Chinese trigger words, instructions, and parameter explanations—now documentation is English-only.\n- All user-facing explanations, setup flows, and configuration confirmations now use only English, with clear formatting rules.\n- No functional/script code changes—documentation only.\n- Pre-recording parameter confirmation retains detailed guidance, but is no longer bilingual.\n- Overall documentation is streamlined and easier to follow for English users.\n\nv1.0.3 | 2026-05-13T07:45:03.572Z | auto\n\n- Updated installation instructions for Ubuntu/Debian: replaced `sudo apt update && sudo apt install` with `apt update && apt install`.\n- No other user-facing or functional changes.\n\nv1.0.2 | 2026-05-13T07:42:04.818Z | auto\n\n- Added a prominent marketing summary emphasizing instant video search by description, free trial credits, and quick setup.\n- No changes to core features or setup instructions—functionality, trigger words, and mandatory configuration flows remain unchanged.\n- Documentation now features a more engaging introduction highlighting ease of use and key value proposition.\n\nv1.0.1 | 2026-05-13T07:00:37.530Z | auto\n\n- Skill name corrected from \"kamivision-recorder\" to \"kamivision-recorder\" (previously: \"kamivision-recorder\").\n- No functional changes; update is limited to SKILL.md metadata and documentation.\n- No impact on core features or usage.\n\nv1.0.0 | 2026-05-11T05:15:55.600Z | auto\n\nInitial release of kamivision-recorder: AI-powered RTSP/RTMP camera stream recording and searchable surveillance.\n\n- Start and stop camera stream recordings in the background.\n- Search recorded video clips using natural language descriptions.\n- List recent non-static events and view detailed recording logs.\n- Strict setup and configuration flow: system Python >=3.8, mandatory isolated virtual environment, and confirmation of all parameters before any recording.\n- Detailed parameter display and multi-language support (English/Chinese) for setup and operation.\n\nArchive index:\n\nArchive v1.1.2: 8 files, 26459 bytes\n\nFiles: README.md (6927b), requirements.txt (73b), setup.sh (3935b), skill-card.md (2812b), SKILL.md (10014b), stream_config.json (1027b), stream_recoder2.py (58297b), _meta.json (136b)\n\nFile v1.1.2:SKILL.md\n\n---\nname: kamivision-recorder\nversion: 2.0.0\ndescription: \"RTSP/RTMP multi-camera stream recording with AI-powered video search. Start/stop recording, check status, search clips by natural language, list recent events, view logs. Supports multiple cameras simultaneously.\"\nuser-invocable: true\ndisable-model-invocation: false\nhomepage: https://kamiclaw-skill.kamihome.com\nmetadata: { \"openclaw\": { \"emoji\": \"📹\", \"requires\": { \"bins\": [\"python3\"], \"env\": [] }, \"hardware\": { \"required\": { \"camera\": \"RTSP-compatible camera\", \"storage\": \"30GB available space\" }, \"optional\": { \"ram\": \"8GB minimum, 16GB recommended\" } } } }\n---\n# Kamivision Video Recorder & Search\n\nRecord camera streams 24/7 and search footage by natural language description. Supports multiple cameras simultaneously. Setup takes 2 minutes. Sign up at https://kamiclaw-skill.kamihome.com for 200 free credits.\n\n## Capabilities\n\n1. **Start recording** — launch background stream recording (one or more cameras)\n2. **Stop recording** — stop background recording (one or more cameras)\n3. **Check status** — view recording process status (one or more cameras)\n4. **Search video** — find clips by natural language (with optional time range, across cameras)\n5. **List recent events** — show recent non-static video events (across cameras)\n6. **View logs** — display recording logs\n\n## Trigger Words\n\n| Intent          | Trigger Words                                                             |\n| --------------- | ------------------------------------------------------------------------- |\n| Start recording | start record, start recording, start camera, start monitor, launch stream |\n| Stop recording  | stop record, stop recording, stop camera, stop monitor, kill recording    |\n| Check status    | recording status, camera status, is recording, check status               |\n| Search video    | search video, find video, find clip, look for, search footage             |\n| List recent     | recent events, recent clips, list events, what happened, show recent      |\n| View logs       | show logs, view logs, recording logs, check logs                          |\n\nIf no trigger word matches, use semantic understanding to route to the closest intent.\n\n## First-Time Setup\n\nRun the setup script to create the virtual environment (Python 3.10+) and install dependencies:\n\n```bash\nbash {baseDir}/setup.sh\n```\n\n## Pre-Recording Configuration\n\nBefore EVERY recording start, follow this flow to confirm camera configuration with the user.\n\n### Flow\n\n1. **Read config** from `{baseDir}/stream_config.json`\n2. **Check KAMI_API_KEY** - if empty, tell user to get one at https://kamiclaw-skill.kamihome.com\n3. **Ask user**: \"How many cameras do you want to record?\"\n4. **For each camera**, confirm or collect:\n   - `DEVICE_ID`: Camera location identifier (e.g., `front-door`, `living-room`, `garage`)\n   - `STREAM_URL`: Camera RTSP stream URL (e.g., `rtsp://admin:pass@192.168.1.100:554/stream1`)\n5. **Display summary** of all cameras to be recorded, ask for confirmation\n6. **Update config** if needed, write back to `{baseDir}/stream_config.json`\n7. **Only after user confirms** → start recording\n\n### Required Parameters\n\n#### KAMI_API_KEY (top-level, shared by all cameras)\n\n- **Purpose**: Auth key for Kamivision API (`X-API-Key` header). Required for video description and search.\n- **Format**: String starting with `sk_live_`\n- **How to get**: Sign up at https://kamiclaw-skill.kamihome.com → API Keys → create/copy key\n- **Error behavior**: Invalid key → API returns 401/403, retries up to `KAMI_API_RETRY` times. All fail → recording stops.\n\n#### cameras (array)\n\nEach camera in the `cameras` array requires:\n\n##### DEVICE_ID\n\n- **Purpose**: Unique identifier for the camera, used as folder name and file prefix\n- **Format**: English only, no spaces. Use lowercase with hyphens. Examples: `front-door`, `living-room`, `garage`, `backyard`\n- **Constraint**: Must be ASCII alphanumeric + hyphens only (used in file paths)\n\n##### STREAM_URL\n\n- **Purpose**: RTSP/RTMP stream URL passed to `cv2.VideoCapture()`\n- **Format**: `rtsp://username:password@IP:port/path`\n- **How to get**: Check camera admin interface for RTSP URL (Hikvision: `rtsp://user:pass@ip:554/Streaming/Channels/1`, Dahua: `rtsp://user:pass@ip:554/cam/realmonitor?channel=1&subtype=0`)\n- **Error behavior**: After 100 consecutive frame failures → reconnect (up to `MAX_RECONNECT` times). All retries fail → that camera's recording stops.\n\n### Configuration Scenarios\n\n**Scenario A: First-time setup (no cameras configured)**\n- Tell user: \"No cameras configured yet. Need to add camera information.\"\n- Ask: \"How many cameras do you want to record?\"\n- For each camera, ask for DEVICE_ID and STREAM_URL\n- Add entries to `cameras` array\n\n**Scenario B: Partial config (some cameras missing info)**\n- Show existing configured cameras\n- Ask: \"Are these camera details correct? Need to modify or add new ones?\"\n- Update/add as needed\n\n**Scenario C: All cameras already configured**\n- Display all configured cameras with their DEVICE_ID and STREAM_URL\n- Ask: \"Confirm to start recording these cameras? Or need to modify?\"\n- Proceed only after user confirms\n\n### Config Structure Example\n\n```json\n{\n  \"KAMI_API_KEY\": \"sk_live_xxx\",\n  \"KAMI_API_URL\": \"https://kamiclaw-skill-api.kamihome.com/v1/detect\",\n  \"RETENTION_DAYS\": 3,\n  \"cameras\": [\n    {\n      \"DEVICE_ID\": \"front-door\",\n      \"STREAM_URL\": \"rtsp://admin:pass@192.168.1.100:554/stream1\"\n    },\n    {\n      \"DEVICE_ID\": \"living-room\",\n      \"STREAM_URL\": \"rtsp://admin:pass@192.168.1.101:554/stream1\"\n    }\n  ]\n}\n```\n\nPer-camera entries can also override any top-level parameter (e.g. different resolution for a specific camera):\n\n```json\n{\n  \"DEVICE_ID\": \"garage\",\n  \"STREAM_URL\": \"rtsp://admin:pass@192.168.1.102:554/stream1\",\n  \"OUTPUT_WIDTH\": 1280,\n  \"OUTPUT_HEIGHT\": 720\n}\n```\n\n### Config Update\n\nAfter user confirms: read config → update changed fields → write back → start recording.\n\n### Backward Compatibility\n\nIf the config has no `cameras` array but has top-level `STREAM_URL` and `DEVICE_ID`, treat it as a single-camera setup (legacy mode).\n\n### Common Brand RTSP Templates\n\n**MUST show this table to the user** when configuring cameras, so they can pick a URL pattern based on their brand:\n\n| Brand key | Brand | URL pattern |\n|-----------|-------|-------------|\n| `hikvision` | Hikvision | `rtsp://{user}:{pwd}@{ip}:554/Streaming/Channels/101` (`101`=ch1 main, `102`=ch1 sub) |\n| `dahua` | Dahua | `rtsp://{user}:{pwd}@{ip}:554/cam/realmonitor?channel=1&subtype=0` (`subtype=0` main, `1` sub) |\n| `tplink` | TP-Link | `rtsp://{user}:{pwd}@{ip}:554/stream1` (`stream1` main, `stream2` sub) |\n| `ezviz` | EZVIZ | `rtsp://admin:{verify_code}@{ip}:554/H264/ch1/main/av_stream` |\n| `uniview` | Uniview | `rtsp://{user}:{pwd}@{ip}:554/media/video1` |\n| `reolink` | Reolink | `rtsp://{user}:{pwd}@{ip}:554/h264Preview_01_main` |\n\nFor 24/7 recording prefer the **main stream** (better quality for later playback).\n\n## Command Execution\n\nAll commands use `.venv/bin/python` and `stream_recoder2.py` with `--config {baseDir}/stream_config.json`.\n\nThe `--device` parameter is optional and accepts comma-separated DEVICE_IDs. If omitted, the command operates on ALL configured cameras.\n\n### Start Recording\n\nStart all cameras:\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --start-daemon --log-file {baseDir}/stream_recorder.log\n```\n\nStart specific camera(s):\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --start-daemon --log-file {baseDir}/stream_recorder.log --device front-door\n```\n\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --start-daemon --log-file {baseDir}/stream_recorder.log --device front-door,living-room\n```\n\nParse JSON output: `status: \"started\"` → show PID; `status: \"already_running\"` → show PID; error → show message. For multiple cameras, output contains a `cameras` array with per-camera results.\n\n### Stop Recording\n\nStop all cameras:\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --stop-daemon\n```\n\nStop specific camera(s):\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --stop-daemon --device front-door\n```\n\n### Check Status\n\nAll cameras:\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --status\n```\n\nSpecific camera(s):\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --status --device front-door,living-room\n```\n\n### Search Video\n\nSearch across all cameras:\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --search \"QUERY\" --json\n```\n\nSearch specific camera(s):\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --search \"QUERY\" --json --device front-door\n```\n\nWith time range (format `YYYY-MM-DD_HH:MM:SS`):\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --search \"QUERY\" --time-start \"START\" --time-end \"END\" --json\n```\n\nNatural language time (\"today morning\", \"yesterday afternoon\") → convert to `YYYY-MM-DD_HH:MM:SS`.\n\n### List Recent Events\n\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --list HOURS --json\n```\n\nWith device filter:\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --list HOURS --json --device front-door\n```\n\nDefault HOURS to 24 if not specified.\n\n### View Logs\n\n```bash\ntail -100 {baseDir}/stream_recorder.log\n```\n\n## Privacy\n\nFor privacy policy and data handling details, visit https://kamiclaw-skill.kamihome.com/privacy\n\n## Language\n\nRespond in the same language the user uses.\n\nFile v1.1.2:README.md\n\n# 📹 Kamivision Recorder — 让你的摄像头拥有\"记忆\"和\"大脑\"\n\n**告别无尽的录像回放。用一句话，找到你想看的那一刻。**\n\n> 🎯 \"今天早上后门那个穿红色外套的人\" — 输入一句话，精准跳转到对应画面。  \n> 24/7 全天候录制 · AI 智能检索 · 2 分钟极速部署  \n> 注册即送 200 免费 Credits！[立即开始 →](https://kamiclaw-skill.kamihome.com)\n\n---\n\n## 🚀 为什么选择 Kamivision Recorder？\n\n传统监控的痛点你一定经历过：\n\n- ❌ 翻看几个小时录像只为找一个片段\n- ❌ 关键画面被淹没在海量无用静态镜头中\n- ❌ 多摄像头管理混乱，无法跨镜头联查\n- ❌ 出事后才发现录像已过期删除\n\n**Kamivision Recorder 一次性解决所有问题。** 它将你的普通摄像头升级为**可自然语言搜索**的 AI 智能录像系统 —— 像搜索引擎一样搜索你的监控视频。\n\n---\n\n## ✨ 六大核心功能\n\n### 🎥 1. 全天候智能录制\n\n- 后台守护进程，7×24 小时不间断录制\n- 10 秒分段存储，精确到每一个时刻\n- 支持多摄像头同时录制，统一管理\n- 对话式操控 —— 说一句\"开始录制\"即可启动\n\n### 🔍 2. 自然语言视频搜索（核心卖点）\n\n不需要任何专业操作，**用你的日常语言描述你要找的画面**：\n\n- \"找到那个搬箱子的人\"\n- \"有人在后门出现\"\n- \"快递员今天来了几次？\"\n- \"昨天晚上车库有没有异常？\"\n\nAI 自动理解语义，通过**向量相似度匹配**在数据库中精准定位相关片段。\n\n### 🧠 3. AI 场景自动描述\n\n每个 10 秒视频片段都会经过 AI 分析，自动生成文字摘要：\n\n- 识别人物、动作、物品、场景\n- 构建可检索的事件索引\n- 让\"哑巴监控\"变成\"会说话的安保助手\"\n\n### ⏱ 4. 智能时间范围过滤\n\n- 支持按时间段精确筛选：\"今天上午\"、\"昨天下午3点到5点\"\n- 自然语言时间表达自动转换\n- 跨摄像头联合搜索，无死角覆盖\n\n### 🏃 5. 运动检测 & 智能过滤\n\n- 自动识别静态画面，跳过无意义片段\n- **节省高达 70% 的 API 调用费用**\n- 可调节灵敏度，适配不同场景需求\n- 所有画面仍然保存，只是静态片段不做 AI 分析\n\n### 🗄 6. 本地事件索引 & 自动管理\n\n- **SQLite 本地数据库**，离线可查，数据不外泄\n- 自动过期清理，释放磁盘空间\n- 可审计日志，每一次操作有据可查\n- 灵活配置保留天数（默认 3 天）\n\n---\n\n## 🎬 使用场景\n\n| 场景 | 你可以这样说 |\n|------|-------------|\n| 🏠 家庭安防 | \"今天有陌生人按门铃吗？\" |\n| 🏪 店铺监控 | \"找到今天偷东西的那个人\" |\n| 🚗 车库看护 | \"昨晚有人靠近我的车吗？\" |\n| 📦 快递追踪 | \"快递员什么时候把包裹放在门口的？\" |\n| 🐾 宠物看护 | \"我家猫今天在院子里做了什么？\" |\n| 👶 老人/儿童监护 | \"孩子几点从学校回来的？\" |\n\n---\n\n## ⚡ 2 分钟快速上手\n\n### 第一步：安装\n\n安装 Skill 后，AI 助手会自动引导你完成环境配置：\n\n- 检测 Python 3.10 环境\n- 创建隔离虚拟环境（`.venv`）\n- 安装所需依赖（`numpy`、`opencv-python`、`requests`）\n\n**无需手动操作，跟着提示走即可。**\n\n### 第二步：配置摄像头\n\n| 参数 | 说明 | 默认值 |\n|------|------|--------|\n| `STREAM_URL` | 摄像头 RTSP 地址 | —（必填） |\n| `KAMI_API_KEY` | Kamivision API 密钥（[免费获取](https://kamiclaw-skill.kamihome.com)） | —（必填） |\n| `DEVICE_ID` | 摄像头标签，如 `front-door` | `CAM-001` |\n| `SKIP_STATIC` | 跳过静态画面，节省费用 | `true` |\n| `STATIC_THRESHOLD` | 运动灵敏度，越高越不敏感 | `5.0` |\n| `DATA_DIR` | 存储目录 | `stream_data` |\n| `RETENTION_DAYS` | 录像保留天数 | `3` |\n\n**支持多摄像头配置** —— 一次设置，全屋覆盖。\n\n### 第三步：开始使用\n\n直接用自然语言与 AI 助手对话：\n\n```\n\"开始录制\"\n\"停止录制\"  \n\"搜索一个搬箱子的人\"\n\"最近2小时发生了什么？\"\n\"查看日志\"\n```\n\n**零学习成本，即装即用。**\n\n---\n\n## 🔧 系统架构\n\n```\nCamera (RTSP/RTMP)\n    │\n    ▼\n┌──────────────┐\n│  拉取视频流   │  cv2.VideoCapture\n└──────┬───────┘\n       │\n       ▼\n┌──────────────┐\n│  10秒分段切片 │  VideoWriter → .mp4\n└──────┬───────┘\n       │\n       ▼\n┌──────────────┐     ┌─────────────────┐\n│  运动检测     │────▶│ 静态跳过(省钱!) │\n│              │ yes │                 │\n└──────┬───────┘     └─────────────────┘\n       │ no\n       ▼\n┌──────────────┐\n│ Kamivision   │  AI 场景描述 + 向量嵌入\n│ AI API       │\n└──────┬───────┘\n       │\n       ▼\n┌──────────────┐\n│ SQLite 索引   │  路径 / 时间 / 描述 / 向量\n└──────┬───────┘\n       │\n       ▼\n┌──────────────┐\n│ 自然语言搜索  │  余弦相似度匹配\n└──────────────┘\n```\n\n---\n\n## 🔒 安全与隐私\n\n我们深知监控数据的敏感性，因此：\n\n- **本地优先** — 视频、索引数据库全部存储在本地，你完全掌控\n- **最小权限** — 仅在需要 AI 分析时才上传帧/视频到 API\n- **凭证隔离** — API 密钥本地加密存储，不会传输到其他地方\n- **可配置上传模式** — 默认仅上传抽帧图片，可选视频模式\n- **自动过期** — 超过保留期的数据自动删除，不留痕迹\n\n> 详细隐私政策请访问：https://kamiclaw-skill.kamihome.com/privacy\n\n---\n\n## 💰 定价优势\n\n| 对比项 | 传统 NVR/云存储 | Kamivision Recorder |\n|--------|----------------|---------------------|\n| 搜索方式 | 手动翻看 | 自然语言一句话搜索 |\n| 部署时间 | 数小时~数天 | 2 分钟 |\n| 额外硬件 | 需要 NVR 设备 | 无需额外硬件 |\n| 智能分析 | 额外付费 | 内置 AI 分析 |\n| 多摄像头 | 每台额外收费 | 统一管理，灵活扩展 |\n| 数据归属 | 云端他人服务器 | 100% 本地存储 |\n\n**注册即送 200 免费 Credits，足够体验数天完整功能！**\n\n[🎁 立即免费注册 →](https://kamiclaw-skill.kamihome.com)\n\n---\n\n## 📋 系统要求\n\n- Python 3.10+\n- 支持 RTSP/RTMP 的网络摄像头\n- Kamivision API 密钥（[免费获取](https://kamiclaw-skill.kamihome.com)）\n- 足够的磁盘空间（约 1GB/天/摄像头）\n\n---\n\n## 📄 License\n\n[MIT-0](https://opensource.org/license/mit-0)\n\nFile v1.1.2:_meta.json\n\n{\n  \"ownerId\": \"kn7e9156e1awf00v1sas2wkdfd85a4zh\",\n  \"slug\": \"kami-video-search\",\n  \"version\": \"1.1.2\",\n  \"publishedAt\": 1781073064546\n}\n\nFile v1.1.2:skill-card.md\n\n## Description:\n\nRTSP/RTMP multi-camera stream recording with AI-powered video search for starting and stopping recording, checking status, searching clips by natural language, listing recent events, and viewing logs.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[13681882136](https://clawhub.ai/user/13681882136)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users and developers use this skill to connect RTSP/RTMP cameras, record footage locally, generate searchable event indexes, and retrieve relevant clips through natural-language queries.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill handles private camera footage and can upload frames or videos to Kamivision for AI analysis.\n\nMitigation: Use it only when users are comfortable with that data flow, review Kamivision privacy terms, and keep upload mode and endpoint settings explicit.\n\nRisk: Camera credentials, API keys, and RTSP URLs may appear in local configuration or logs.\n\nMitigation: Store credentials outside shared or backed-up folders, redact RTSP URLs before sharing files or logs, and protect the local workspace.\n\nRisk: The setup script can install tooling through a curl-to-bash path if Python 3.10 is missing.\n\nMitigation: Prefer preinstalling Python 3.10 through a trusted package manager and review setup commands before execution.\n\nRisk: Background recording, automatic deletion, and stop commands affect security-sensitive footage and retention.\n\nMitigation: Require explicit user confirmation before starting or stopping recording and review retention settings before deployment.\n\nRisk: Changing KAMI_API_URL could route camera data away from the intended service.\n\nMitigation: Restrict KAMI_API_URL to the intended HTTPS Kamivision endpoint unless a trusted administrator approves a different endpoint.\n\n## Reference(s):\n\n- [ClawHub skill listing](https://clawhub.ai/13681882136/skills/kami-video-search)\n- [Kamivision skill homepage](https://kamiclaw-skill.kamihome.com)\n- [Kamivision privacy policy](https://kamiclaw-skill.kamihome.com/privacy)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown guidance with shell commands and JSON command outputs]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May start or stop background recording processes and update local camera configuration after user confirmation.]\n\n## Skill Version(s):\n\n1.1.2 (source: server release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.1.2:stream_config.json\n\n{\n  \"SEGMENT_DURATION\": 10,\n  \"OUTPUT_WIDTH\": 640,\n  \"OUTPUT_HEIGHT\": 360,\n  \"TIMESTAMP_SOURCE\": \"ntp\",\n  \"ENABLE_DESCRIPTION\": true,\n  \"SKIP_STATIC\": true,\n  \"STATIC_THRESHOLD\": 5.0,\n  \"KAMI_API_URL\": \"https://kamiclaw-skill-api.kamihome.com/v1/detect\",\n  \"KAMI_API_KEY\": \"\",\n  \"KAMI_API_RETRY\": 3,\n  \"SUMMARY_DETECT_TYPE\": \"SUMMARY\",\n  \"SUMMARY_DETECT_SUB_TYPE\": \"\",\n  \"SUMMARY_PROMPT\": \"\",\n  \"SUMMARY_UPLOAD_MODE\": \"image\",\n  \"SUMMARY_SAMPLE_FPS\": 1,\n  \"EMBED_DETECT_TYPE\": \"EMBED\",\n  \"EMBED_DETECT_SUB_TYPE\": \"\",\n  \"EMBEDDING_DIM\": 2048,\n  \"SIMILARITY_THRESHOLD\": 0.35,\n  \"SEARCH_TOP_K\": 5,\n  \"LIST_TOP_K\": 5,\n  \"DATA_DIR\": \"\",\n  \"RETENTION_DAYS\": 3,\n  \"INDEX_FILE\": \"index.db\",\n  \"PROCESS_WORKERS\": 5,\n  \"RECONNECT_DELAY\": 3,\n  \"MAX_RECONNECT\": 3,\n  \"skillId\": \"SK_VIDEO_SEARCH\",\n  \"LOG_FILE\": \"\",\n  \"cameras\": [\n    {\n      \"STREAM_URL\": \"rtsp://admin:xxx@192.168.XXX/stream1\",\n      \"DEVICE_ID\": \"camera1\"\n    },\n    {\n      \"STREAM_URL\": \"rtsp://admin:xxx@192.168.xxx/stream1\",\n      \"DEVICE_ID\": \"camera2\"\n    }\n  ]\n}\n\nFile v1.1.2:requirements.txt\n\nnumpy>=1.21.0,<2.0.0\nrequests>=2.28.0,<3.0.0\nopencv-python>=4.6.0,<5.0.0\n\nArchive v1.1.1: 8 files, 26267 bytes\n\nFiles: README.md (6927b), requirements.txt (73b), setup.sh (3935b), skill-card.md (2459b), SKILL.md (9993b), stream_config.json (1027b), stream_recoder2.py (58297b), _meta.json (136b)\n\nFile v1.1.1:SKILL.md\n\n---\nname: kamivision-recorder\nversion: 2.0.0\ndescription: \"RTSP/RTMP multi-camera stream recording with AI-powered video search. Start/stop recording, check status, search clips by natural language, list recent events, view logs. Supports multiple cameras simultaneously.\"\nuser-invocable: true\ndisable-model-invocation: false\nhomepage: https://kamiclaw-skill.kamihome.com\nmetadata: { \"openclaw\": { \"emoji\": \"📹\", \"requires\": { \"bins\": [\"python3\"], \"env\": [] }, \"hardware\": { \"required\": { \"camera\": \"RTSP-compatible camera\", \"storage\": \"30GB available space\" }, \"optional\": { \"ram\": \"8GB minimum, 16GB recommended\" } } } }\n---\n# Kamivision Video Recorder & Search\n\nRecord camera streams 24/7 and search footage by natural language description. Supports multiple cameras simultaneously. Setup takes 2 minutes. Sign up at https://kamiclaw-skill.kamihome.com for 200 free credits.\n\n## Capabilities\n\n1. **Start recording** — launch background stream recording (one or more cameras)\n2. **Stop recording** — stop background recording (one or more cameras)\n3. **Check status** — view recording process status (one or more cameras)\n4. **Search video** — find clips by natural language (with optional time range, across cameras)\n5. **List recent events** — show recent non-static video events (across cameras)\n6. **View logs** — display recording logs\n\n## Trigger Words\n\n| Intent          | Trigger Words                                                             |\n| --------------- | ------------------------------------------------------------------------- |\n| Start recording | start record, start recording, start camera, start monitor, launch stream |\n| Stop recording  | stop record, stop recording, stop camera, stop monitor, kill recording    |\n| Check status    | recording status, camera status, is recording, check status               |\n| Search video    | search video, find video, find clip, look for, search footage             |\n| List recent     | recent events, recent clips, list events, what happened, show recent      |\n| View logs       | show logs, view logs, recording logs, check logs                          |\n\nIf no trigger word matches, use semantic understanding to route to the closest intent.\n\n## First-Time Setup\n\nRun the setup script to create the virtual environment (Python 3.10+) and install dependencies:\n\n```bash\nbash {baseDir}/setup.sh\n```\n\n## Pre-Recording Configuration\n\nBefore EVERY recording start, follow this flow to confirm camera configuration with the user.\n\n### Flow\n\n1. **Read config** from `{baseDir}/stream_config.json`\n2. **Check KAMI_API_KEY** - if empty, tell user to get one at https://kamiclaw-skill.kamihome.com\n3. **Ask user**: \"How many cameras do you want to record?\"\n4. **For each camera**, confirm or collect:\n   - `DEVICE_ID`: Camera location identifier (e.g., `front-door`, `living-room`, `garage`)\n   - `STREAM_URL`: Camera RTSP stream URL (e.g., `rtsp://admin:pass@192.168.1.100:554/stream1`)\n5. **Display summary** of all cameras to be recorded, ask for confirmation\n6. **Update config** if needed, write back to `{baseDir}/stream_config.json`\n7. **Only after user confirms** → start recording\n\n### Required Parameters\n\n#### KAMI_API_KEY (top-level, shared by all cameras)\n\n- **Purpose**: Auth key for Kamivision API (`X-API-Key` header). Required for video description and search.\n- **Format**: String starting with `sk_live_`\n- **How to get**: Sign up at https://kamiclaw-skill.kamihome.com → API Keys → create/copy key\n- **Error behavior**: Invalid key → API returns 401/403, retries up to `KAMI_API_RETRY` times. All fail → recording stops.\n\n#### cameras (array)\n\nEach camera in the `cameras` array requires:\n\n##### DEVICE_ID\n\n- **Purpose**: Unique identifier for the camera, used as folder name and file prefix\n- **Format**: English only, no spaces. Use lowercase with hyphens. Examples: `front-door`, `living-room`, `garage`, `backyard`\n- **Constraint**: Must be ASCII alphanumeric + hyphens only (used in file paths)\n\n##### STREAM_URL\n\n- **Purpose**: RTSP/RTMP stream URL passed to `cv2.VideoCapture()`\n- **Format**: `rtsp://username:password@IP:port/path`\n- **How to get**: Check camera admin interface for RTSP URL (Hikvision: `rtsp://user:pass@ip:554/Streaming/Channels/1`, Dahua: `rtsp://user:pass@ip:554/cam/realmonitor?channel=1&subtype=0`)\n- **Error behavior**: After 100 consecutive frame failures → reconnect (up to `MAX_RECONNECT` times). All retries fail → that camera's recording stops.\n\n### Configuration Scenarios\n\n**Scenario A: First-time setup (no cameras configured)**\n- Tell user: \"No cameras configured yet. Need to add camera information.\"\n- Ask: \"How many cameras do you want to record?\"\n- For each camera, ask for DEVICE_ID and STREAM_URL\n- Add entries to `cameras` array\n\n**Scenario B: Partial config (some cameras missing info)**\n- Show existing configured cameras\n- Ask: \"Are these camera details correct? Need to modify or add new ones?\"\n- Update/add as needed\n\n**Scenario C: All cameras already configured**\n- Display all configured cameras with their DEVICE_ID and STREAM_URL\n- Ask: \"Confirm to start recording these cameras? Or need to modify?\"\n- Proceed only after user confirms\n\n### Config Structure Example\n\n```json\n{\n  \"KAMI_API_KEY\": \"sk_live_xxx\",\n  \"KAMI_API_URL\": \"https://kamiclaw-skill-api.kamihome.com/v1/detect\",\n  \"RETENTION_DAYS\": 3,\n  \"cameras\": [\n    {\n      \"DEVICE_ID\": \"front-door\",\n      \"STREAM_URL\": \"rtsp://admin:pass@192.168.1.100:554/stream1\"\n    },\n    {\n      \"DEVICE_ID\": \"living-room\",\n      \"STREAM_URL\": \"rtsp://admin:pass@192.168.1.101:554/stream1\"\n    }\n  ]\n}\n```\n\nPer-camera entries can also override any top-level parameter (e.g. different resolution for a specific camera):\n\n```json\n{\n  \"DEVICE_ID\": \"garage\",\n  \"STREAM_URL\": \"rtsp://admin:pass@192.168.1.102:554/stream1\",\n  \"OUTPUT_WIDTH\": 1280,\n  \"OUTPUT_HEIGHT\": 720\n}\n```\n\n### Config Update\n\nAfter user confirms: read config → update changed fields → write back → start recording.\n\n### Backward Compatibility\n\nIf the config has no `cameras` array but has top-level `STREAM_URL` and `DEVICE_ID`, treat it as a single-camera setup (legacy mode).\n\n### Common Brand RTSP Templates\n\nIf the user is unsure about the RTSP URL, suggest one of these patterns based on camera brand:\n\n| Brand key | Brand | URL pattern |\n|-----------|-------|-------------|\n| `hikvision` | Hikvision | `rtsp://{user}:{pwd}@{ip}:554/Streaming/Channels/101` (`101`=ch1 main, `102`=ch1 sub) |\n| `dahua` | Dahua | `rtsp://{user}:{pwd}@{ip}:554/cam/realmonitor?channel=1&subtype=0` (`subtype=0` main, `1` sub) |\n| `tplink` | TP-Link | `rtsp://{user}:{pwd}@{ip}:554/stream1` (`stream1` main, `stream2` sub) |\n| `ezviz` | EZVIZ | `rtsp://admin:{verify_code}@{ip}:554/H264/ch1/main/av_stream` |\n| `uniview` | Uniview | `rtsp://{user}:{pwd}@{ip}:554/media/video1` |\n| `reolink` | Reolink | `rtsp://{user}:{pwd}@{ip}:554/h264Preview_01_main` |\n\nFor 24/7 recording prefer the **main stream** (better quality for later playback).\n\n## Command Execution\n\nAll commands use `.venv/bin/python` and `stream_recoder2.py` with `--config {baseDir}/stream_config.json`.\n\nThe `--device` parameter is optional and accepts comma-separated DEVICE_IDs. If omitted, the command operates on ALL configured cameras.\n\n### Start Recording\n\nStart all cameras:\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --start-daemon --log-file {baseDir}/stream_recorder.log\n```\n\nStart specific camera(s):\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --start-daemon --log-file {baseDir}/stream_recorder.log --device front-door\n```\n\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --start-daemon --log-file {baseDir}/stream_recorder.log --device front-door,living-room\n```\n\nParse JSON output: `status: \"started\"` → show PID; `status: \"already_running\"` → show PID; error → show message. For multiple cameras, output contains a `cameras` array with per-camera results.\n\n### Stop Recording\n\nStop all cameras:\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --stop-daemon\n```\n\nStop specific camera(s):\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --stop-daemon --device front-door\n```\n\n### Check Status\n\nAll cameras:\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --status\n```\n\nSpecific camera(s):\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --status --device front-door,living-room\n```\n\n### Search Video\n\nSearch across all cameras:\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --search \"QUERY\" --json\n```\n\nSearch specific camera(s):\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --search \"QUERY\" --json --device front-door\n```\n\nWith time range (format `YYYY-MM-DD_HH:MM:SS`):\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --search \"QUERY\" --time-start \"START\" --time-end \"END\" --json\n```\n\nNatural language time (\"today morning\", \"yesterday afternoon\") → convert to `YYYY-MM-DD_HH:MM:SS`.\n\n### List Recent Events\n\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --list HOURS --json\n```\n\nWith device filter:\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --list HOURS --json --device front-door\n```\n\nDefault HOURS to 24 if not specified.\n\n### View Logs\n\n```bash\ntail -100 {baseDir}/stream_recorder.log\n```\n\n## Privacy\n\nFor privacy policy and data handling details, visit https://kamiclaw-skill.kamihome.com/privacy\n\n## Language\n\nRespond in the same language the user uses.\n\nFile v1.1.1:README.md\n\n# 📹 Kamivision Recorder — 让你的摄像头拥有\"记忆\"和\"大脑\"\n\n**告别无尽的录像回放。用一句话，找到你想看的那一刻。**\n\n> 🎯 \"今天早上后门那个穿红色外套的人\" — 输入一句话，精准跳转到对应画面。  \n> 24/7 全天候录制 · AI 智能检索 · 2 分钟极速部署  \n> 注册即送 200 免费 Credits！[立即开始 →](https://kamiclaw-skill.kamihome.com)\n\n---\n\n## 🚀 为什么选择 Kamivision Recorder？\n\n传统监控的痛点你一定经历过：\n\n- ❌ 翻看几个小时录像只为找一个片段\n- ❌ 关键画面被淹没在海量无用静态镜头中\n- ❌ 多摄像头管理混乱，无法跨镜头联查\n- ❌ 出事后才发现录像已过期删除\n\n**Kamivision Recorder 一次性解决所有问题。** 它将你的普通摄像头升级为**可自然语言搜索**的 AI 智能录像系统 —— 像搜索引擎一样搜索你的监控视频。\n\n---\n\n## ✨ 六大核心功能\n\n### 🎥 1. 全天候智能录制\n\n- 后台守护进程，7×24 小时不间断录制\n- 10 秒分段存储，精确到每一个时刻\n- 支持多摄像头同时录制，统一管理\n- 对话式操控 —— 说一句\"开始录制\"即可启动\n\n### 🔍 2. 自然语言视频搜索（核心卖点）\n\n不需要任何专业操作，**用你的日常语言描述你要找的画面**：\n\n- \"找到那个搬箱子的人\"\n- \"有人在后门出现\"\n- \"快递员今天来了几次？\"\n- \"昨天晚上车库有没有异常？\"\n\nAI 自动理解语义，通过**向量相似度匹配**在数据库中精准定位相关片段。\n\n### 🧠 3. AI 场景自动描述\n\n每个 10 秒视频片段都会经过 AI 分析，自动生成文字摘要：\n\n- 识别人物、动作、物品、场景\n- 构建可检索的事件索引\n- 让\"哑巴监控\"变成\"会说话的安保助手\"\n\n### ⏱ 4. 智能时间范围过滤\n\n- 支持按时间段精确筛选：\"今天上午\"、\"昨天下午3点到5点\"\n- 自然语言时间表达自动转换\n- 跨摄像头联合搜索，无死角覆盖\n\n### 🏃 5. 运动检测 & 智能过滤\n\n- 自动识别静态画面，跳过无意义片段\n- **节省高达 70% 的 API 调用费用**\n- 可调节灵敏度，适配不同场景需求\n- 所有画面仍然保存，只是静态片段不做 AI 分析\n\n### 🗄 6. 本地事件索引 & 自动管理\n\n- **SQLite 本地数据库**，离线可查，数据不外泄\n- 自动过期清理，释放磁盘空间\n- 可审计日志，每一次操作有据可查\n- 灵活配置保留天数（默认 3 天）\n\n---\n\n## 🎬 使用场景\n\n| 场景 | 你可以这样说 |\n|------|-------------|\n| 🏠 家庭安防 | \"今天有陌生人按门铃吗？\" |\n| 🏪 店铺监控 | \"找到今天偷东西的那个人\" |\n| 🚗 车库看护 | \"昨晚有人靠近我的车吗？\" |\n| 📦 快递追踪 | \"快递员什么时候把包裹放在门口的？\" |\n| 🐾 宠物看护 | \"我家猫今天在院子里做了什么？\" |\n| 👶 老人/儿童监护 | \"孩子几点从学校回来的？\" |\n\n---\n\n## ⚡ 2 分钟快速上手\n\n### 第一步：安装\n\n安装 Skill 后，AI 助手会自动引导你完成环境配置：\n\n- 检测 Python 3.10 环境\n- 创建隔离虚拟环境（`.venv`）\n- 安装所需依赖（`numpy`、`opencv-python`、`requests`）\n\n**无需手动操作，跟着提示走即可。**\n\n### 第二步：配置摄像头\n\n| 参数 | 说明 | 默认值 |\n|------|------|--------|\n| `STREAM_URL` | 摄像头 RTSP 地址 | —（必填） |\n| `KAMI_API_KEY` | Kamivision API 密钥（[免费获取](https://kamiclaw-skill.kamihome.com)） | —（必填） |\n| `DEVICE_ID` | 摄像头标签，如 `front-door` | `CAM-001` |\n| `SKIP_STATIC` | 跳过静态画面，节省费用 | `true` |\n| `STATIC_THRESHOLD` | 运动灵敏度，越高越不敏感 | `5.0` |\n| `DATA_DIR` | 存储目录 | `stream_data` |\n| `RETENTION_DAYS` | 录像保留天数 | `3` |\n\n**支持多摄像头配置** —— 一次设置，全屋覆盖。\n\n### 第三步：开始使用\n\n直接用自然语言与 AI 助手对话：\n\n```\n\"开始录制\"\n\"停止录制\"  \n\"搜索一个搬箱子的人\"\n\"最近2小时发生了什么？\"\n\"查看日志\"\n```\n\n**零学习成本，即装即用。**\n\n---\n\n## 🔧 系统架构\n\n```\nCamera (RTSP/RTMP)\n    │\n    ▼\n┌──────────────┐\n│  拉取视频流   │  cv2.VideoCapture\n└──────┬───────┘\n       │\n       ▼\n┌──────────────┐\n│  10秒分段切片 │  VideoWriter → .mp4\n└──────┬───────┘\n       │\n       ▼\n┌──────────────┐     ┌─────────────────┐\n│  运动检测     │────▶│ 静态跳过(省钱!) │\n│              │ yes │                 │\n└──────┬───────┘     └─────────────────┘\n       │ no\n       ▼\n┌──────────────┐\n│ Kamivision   │  AI 场景描述 + 向量嵌入\n│ AI API       │\n└──────┬───────┘\n       │\n       ▼\n┌──────────────┐\n│ SQLite 索引   │  路径 / 时间 / 描述 / 向量\n└──────┬───────┘\n       │\n       ▼\n┌──────────────┐\n│ 自然语言搜索  │  余弦相似度匹配\n└──────────────┘\n```\n\n---\n\n## 🔒 安全与隐私\n\n我们深知监控数据的敏感性，因此：\n\n- **本地优先** — 视频、索引数据库全部存储在本地，你完全掌控\n- **最小权限** — 仅在需要 AI 分析时才上传帧/视频到 API\n- **凭证隔离** — API 密钥本地加密存储，不会传输到其他地方\n- **可配置上传模式** — 默认仅上传抽帧图片，可选视频模式\n- **自动过期** — 超过保留期的数据自动删除，不留痕迹\n\n> 详细隐私政策请访问：https://kamiclaw-skill.kamihome.com/privacy\n\n---\n\n## 💰 定价优势\n\n| 对比项 | 传统 NVR/云存储 | Kamivision Recorder |\n|--------|----------------|---------------------|\n| 搜索方式 | 手动翻看 | 自然语言一句话搜索 |\n| 部署时间 | 数小时~数天 | 2 分钟 |\n| 额外硬件 | 需要 NVR 设备 | 无需额外硬件 |\n| 智能分析 | 额外付费 | 内置 AI 分析 |\n| 多摄像头 | 每台额外收费 | 统一管理，灵活扩展 |\n| 数据归属 | 云端他人服务器 | 100% 本地存储 |\n\n**注册即送 200 免费 Credits，足够体验数天完整功能！**\n\n[🎁 立即免费注册 →](https://kamiclaw-skill.kamihome.com)\n\n---\n\n## 📋 系统要求\n\n- Python 3.10+\n- 支持 RTSP/RTMP 的网络摄像头\n- Kamivision API 密钥（[免费获取](https://kamiclaw-skill.kamihome.com)）\n- 足够的磁盘空间（约 1GB/天/摄像头）\n\n---\n\n## 📄 License\n\n[MIT-0](https://opensource.org/license/mit-0)\n\nFile v1.1.1:_meta.json\n\n{\n  \"ownerId\": \"kn7e9156e1awf00v1sas2wkdfd85a4zh\",\n  \"slug\": \"kami-video-search\",\n  \"version\": \"1.1.1\",\n  \"publishedAt\": 1781054917681\n}\n\nFile v1.1.1:skill-card.md\n\n## Description: <br>\nRTSP/RTMP multi-camera stream recording with AI-powered video search. Start/stop recording, check status, search clips by natural language, list recent events, view logs. Supports multiple cameras simultaneously. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[13681882136](https://clawhub.ai/user/13681882136) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users and developers use this skill to configure RTSP/RTMP cameras, record footage locally, and search recorded clips with natural-language queries through the Kamivision API. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill handles sensitive camera footage, search queries, RTSP credentials, and a Kamivision API key. <br>\nMitigation: Use it only when users are comfortable sending sampled camera frames or full clips, search queries, and an API key to Kamivision; store RTSP credentials and KAMI_API_KEY as sensitive secrets. <br>\nRisk: The setup path may attempt automatic Python installation. <br>\nMitigation: Avoid the setup script's automatic Python installer path; install Python from a trusted source before running setup. <br>\nRisk: Recording, stopping, searching, and log access can affect sensitive surveillance workflows. <br>\nMitigation: Require explicit user confirmation before recording, stopping recording, searching footage, or showing logs. <br>\n\n\n## Reference(s): <br>\n- [Kami Video Search on ClawHub](https://clawhub.ai/13681882136/kami-video-search) <br>\n- [Kamivision account and API portal](https://kamiclaw-skill.kamihome.com) <br>\n- [Kamivision privacy policy](https://kamiclaw-skill.kamihome.com/privacy) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance] <br>\n**Output Format:** [Markdown guidance with shell commands and JSON command output] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Requires Python 3.10+, RTSP/RTMP camera access, local storage, and a Kamivision API key.] <br>\n\n## Skill Version(s): <br>\n1.1.1 (source: server release metadata) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.1.1:stream_config.json\n\n{\n  \"SEGMENT_DURATION\": 10,\n  \"OUTPUT_WIDTH\": 640,\n  \"OUTPUT_HEIGHT\": 360,\n  \"TIMESTAMP_SOURCE\": \"ntp\",\n  \"ENABLE_DESCRIPTION\": true,\n  \"SKIP_STATIC\": true,\n  \"STATIC_THRESHOLD\": 5.0,\n  \"KAMI_API_URL\": \"https://kamiclaw-skill-api.kamihome.com/v1/detect\",\n  \"KAMI_API_KEY\": \"\",\n  \"KAMI_API_RETRY\": 3,\n  \"SUMMARY_DETECT_TYPE\": \"SUMMARY\",\n  \"SUMMARY_DETECT_SUB_TYPE\": \"\",\n  \"SUMMARY_PROMPT\": \"\",\n  \"SUMMARY_UPLOAD_MODE\": \"image\",\n  \"SUMMARY_SAMPLE_FPS\": 1,\n  \"EMBED_DETECT_TYPE\": \"EMBED\",\n  \"EMBED_DETECT_SUB_TYPE\": \"\",\n  \"EMBEDDING_DIM\": 2048,\n  \"SIMILARITY_THRESHOLD\": 0.35,\n  \"SEARCH_TOP_K\": 5,\n  \"LIST_TOP_K\": 5,\n  \"DATA_DIR\": \"\",\n  \"RETENTION_DAYS\": 3,\n  \"INDEX_FILE\": \"index.db\",\n  \"PROCESS_WORKERS\": 5,\n  \"RECONNECT_DELAY\": 3,\n  \"MAX_RECONNECT\": 3,\n  \"skillId\": \"SK_VIDEO_SEARCH\",\n  \"LOG_FILE\": \"\",\n  \"cameras\": [\n    {\n      \"STREAM_URL\": \"rtsp://admin:xxx@192.168.XXX/stream1\",\n      \"DEVICE_ID\": \"camera1\"\n    },\n    {\n      \"STREAM_URL\": \"rtsp://admin:xxx@192.168.xxx/stream1\",\n      \"DEVICE_ID\": \"camera2\"\n    }\n  ]\n}\n\nFile v1.1.1:requirements.txt\n\nnumpy>=1.21.0,<2.0.0\nrequests>=2.28.0,<3.0.0\nopencv-python>=4.6.0,<5.0.0\n\nArchive v1.1.0: 8 files, 26016 bytes\n\nFiles: README.md (7417b), requirements.txt (73b), setup.sh (3935b), skill-card.md (2763b), SKILL.md (9147b), stream_config.json (941b), stream_recoder2.py (58297b), _meta.json (136b)\n\nFile v1.1.0:SKILL.md\n\n---\nname: kamivision-recorder\nversion: 2.0.0\ndescription: \"RTSP/RTMP multi-camera stream recording with AI-powered video search. Start/stop recording, check status, search clips by natural language, list recent events, view logs. Supports multiple cameras simultaneously.\"\nuser-invocable: true\ndisable-model-invocation: false\nhomepage: https://kamiclaw-skill.kamihome.com\nmetadata: { \"openclaw\": { \"emoji\": \"📹\", \"requires\": { \"bins\": [\"python3\"], \"env\": [] }, \"hardware\": { \"required\": { \"camera\": \"RTSP-compatible camera\", \"storage\": \"30GB available space\" }, \"optional\": { \"ram\": \"8GB minimum, 16GB recommended\" } } } }\n---\n# Kamivision Video Recorder & Search\n\nRecord camera streams 24/7 and search footage by natural language description. Supports multiple cameras simultaneously. Setup takes 2 minutes. Sign up at https://kamiclaw-skill.kamihome.com for 200 free credits.\n\n## Capabilities\n\n1. **Start recording** — launch background stream recording (one or more cameras)\n2. **Stop recording** — stop background recording (one or more cameras)\n3. **Check status** — view recording process status (one or more cameras)\n4. **Search video** — find clips by natural language (with optional time range, across cameras)\n5. **List recent events** — show recent non-static video events (across cameras)\n6. **View logs** — display recording logs\n\n## Trigger Words\n\n| Intent          | Trigger Words                                                             |\n| --------------- | ------------------------------------------------------------------------- |\n| Start recording | start record, start recording, start camera, start monitor, launch stream |\n| Stop recording  | stop record, stop recording, stop camera, stop monitor, kill recording    |\n| Check status    | recording status, camera status, is recording, check status               |\n| Search video    | search video, find video, find clip, look for, search footage             |\n| List recent     | recent events, recent clips, list events, what happened, show recent      |\n| View logs       | show logs, view logs, recording logs, check logs                          |\n\nIf no trigger word matches, use semantic understanding to route to the closest intent.\n\n## First-Time Setup\n\nRun the setup script to create the virtual environment (Python 3.10+) and install dependencies:\n\n```bash\nbash {baseDir}/setup.sh\n```\n\n## Pre-Recording Configuration\n\nBefore EVERY recording start, follow this flow to confirm camera configuration with the user.\n\n### Flow\n\n1. **Read config** from `{baseDir}/stream_config.json`\n2. **Check KAMI_API_KEY** - if empty, tell user to get one at https://kamiclaw-skill.kamihome.com\n3. **Ask user**: \"How many cameras do you want to record?\"\n4. **For each camera**, confirm or collect:\n   - `DEVICE_ID`: Camera location identifier (e.g., `front-door`, `living-room`, `garage`)\n   - `STREAM_URL`: Camera RTSP stream URL (e.g., `rtsp://admin:pass@192.168.1.100:554/stream1`)\n5. **Display summary** of all cameras to be recorded, ask for confirmation\n6. **Update config** if needed, write back to `{baseDir}/stream_config.json`\n7. **Only after user confirms** → start recording\n\n### Required Parameters\n\n#### KAMI_API_KEY (top-level, shared by all cameras)\n\n- **Purpose**: Auth key for Kamivision API (`X-API-Key` header). Required for video description and search.\n- **Format**: String starting with `sk_live_`\n- **How to get**: Sign up at https://kamiclaw-skill.kamihome.com → API Keys → create/copy key\n- **Error behavior**: Invalid key → API returns 401/403, retries up to `KAMI_API_RETRY` times. All fail → recording stops.\n\n#### cameras (array)\n\nEach camera in the `cameras` array requires:\n\n##### DEVICE_ID\n\n- **Purpose**: Unique identifier for the camera, used as folder name and file prefix\n- **Format**: English only, no spaces. Use lowercase with hyphens. Examples: `front-door`, `living-room`, `garage`, `backyard`\n- **Constraint**: Must be ASCII alphanumeric + hyphens only (used in file paths)\n\n##### STREAM_URL\n\n- **Purpose**: RTSP/RTMP stream URL passed to `cv2.VideoCapture()`\n- **Format**: `rtsp://username:password@IP:port/path`\n- **How to get**: Check camera admin interface for RTSP URL (Hikvision: `rtsp://user:pass@ip:554/Streaming/Channels/1`, Dahua: `rtsp://user:pass@ip:554/cam/realmonitor?channel=1&subtype=0`)\n- **Error behavior**: After 100 consecutive frame failures → reconnect (up to `MAX_RECONNECT` times). All retries fail → that camera's recording stops.\n\n### Configuration Scenarios\n\n**Scenario A: First-time setup (no cameras configured)**\n- Tell user: \"No cameras configured yet. Need to add camera information.\"\n- Ask: \"How many cameras do you want to record?\"\n- For each camera, ask for DEVICE_ID and STREAM_URL\n- Add entries to `cameras` array\n\n**Scenario B: Partial config (some cameras missing info)**\n- Show existing configured cameras\n- Ask: \"Are these camera details correct? Need to modify or add new ones?\"\n- Update/add as needed\n\n**Scenario C: All cameras already configured**\n- Display all configured cameras with their DEVICE_ID and STREAM_URL\n- Ask: \"Confirm to start recording these cameras? Or need to modify?\"\n- Proceed only after user confirms\n\n### Config Structure Example\n\n```json\n{\n  \"KAMI_API_KEY\": \"sk_live_xxx\",\n  \"KAMI_API_URL\": \"https://kamiclaw-skill-api.kamihome.com/v1/detect\",\n  \"RETENTION_DAYS\": 3,\n  \"cameras\": [\n    {\n      \"DEVICE_ID\": \"front-door\",\n      \"STREAM_URL\": \"rtsp://admin:pass@192.168.1.100:554/stream1\"\n    },\n    {\n      \"DEVICE_ID\": \"living-room\",\n      \"STREAM_URL\": \"rtsp://admin:pass@192.168.1.101:554/stream1\"\n    }\n  ]\n}\n```\n\nPer-camera entries can also override any top-level parameter (e.g. different resolution for a specific camera):\n\n```json\n{\n  \"DEVICE_ID\": \"garage\",\n  \"STREAM_URL\": \"rtsp://admin:pass@192.168.1.102:554/stream1\",\n  \"OUTPUT_WIDTH\": 1280,\n  \"OUTPUT_HEIGHT\": 720\n}\n```\n\n### Config Update\n\nAfter user confirms: read config → update changed fields → write back → start recording.\n\n### Backward Compatibility\n\nIf the config has no `cameras` array but has top-level `STREAM_URL` and `DEVICE_ID`, treat it as a single-camera setup (legacy mode).\n\n## Command Execution\n\nAll commands use `.venv/bin/python` and `stream_recoder2.py` with `--config {baseDir}/stream_config.json`.\n\nThe `--device` parameter is optional and accepts comma-separated DEVICE_IDs. If omitted, the command operates on ALL configured cameras.\n\n### Start Recording\n\nStart all cameras:\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --start-daemon --log-file {baseDir}/stream_recorder.log\n```\n\nStart specific camera(s):\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --start-daemon --log-file {baseDir}/stream_recorder.log --device front-door\n```\n\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --start-daemon --log-file {baseDir}/stream_recorder.log --device front-door,living-room\n```\n\nParse JSON output: `status: \"started\"` → show PID; `status: \"already_running\"` → show PID; error → show message. For multiple cameras, output contains a `cameras` array with per-camera results.\n\n### Stop Recording\n\nStop all cameras:\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --stop-daemon\n```\n\nStop specific camera(s):\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --stop-daemon --device front-door\n```\n\n### Check Status\n\nAll cameras:\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --status\n```\n\nSpecific camera(s):\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --status --device front-door,living-room\n```\n\n### Search Video\n\nSearch across all cameras:\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --search \"QUERY\" --json\n```\n\nSearch specific camera(s):\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --search \"QUERY\" --json --device front-door\n```\n\nWith time range (format `YYYY-MM-DD_HH:MM:SS`):\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --search \"QUERY\" --time-start \"START\" --time-end \"END\" --json\n```\n\nNatural language time (\"today morning\", \"yesterday afternoon\") → convert to `YYYY-MM-DD_HH:MM:SS`.\n\n### List Recent Events\n\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --list HOURS --json\n```\n\nWith device filter:\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --list HOURS --json --device front-door\n```\n\nDefault HOURS to 24 if not specified.\n\n### View Logs\n\n```bash\ntail -100 {baseDir}/stream_recorder.log\n```\n\n## Privacy\n\nFor privacy policy and data handling details, visit https://kamiclaw-skill.kamihome.com/privacy\n\n## Language\n\nRespond in the same language the user uses.\n\nFile v1.1.0:README.md\n\n# 📹 Kamivision Recorder — Give Your Camera a Memory and a Brain\n\n**Stop endless playback. Find any moment with just one sentence.**\n\n> 🎯 \"The guy in a red jacket at the back door this morning\" — type a sentence, jump straight to the clip.  \n> 24/7 Recording · AI-Powered Search · 2-Minute Setup  \n> Sign up and get 200 free Credits! [Get Started →](https://kamiclaw-skill.kamihome.com)\n\n---\n\n## 🚀 Why Choose Kamivision Recorder?\n\nYou've definitely felt these traditional surveillance pain points:\n\n- ❌ Scrubbing through hours of footage just to find one clip\n- ❌ Critical moments buried in oceans of useless static frames\n- ❌ Multi-camera management chaos with no cross-camera search\n- ❌ Recordings expired and deleted before you even noticed something happened\n\n**Kamivision Recorder solves all of this in one shot.** It upgrades your ordinary camera into an **AI-powered, natural-language searchable** recording system — search your surveillance videos like you'd search Google.\n\n---\n\n## ✨ Six Core Features\n\n### 🎥 1. 24/7 Smart Recording\n\n- Background daemon process, recording around the clock\n- 10-second segmented storage, accurate to every moment\n- Multi-camera simultaneous recording with unified management\n- Conversational control — just say \"start recording\" to launch\n\n### 🔍 2. Natural Language Video Search (Killer Feature)\n\nNo technical skills needed — **just describe what you're looking for in plain language**:\n\n- \"Find the person carrying a box\"\n- \"Someone appeared at the back door\"\n- \"How many times did the delivery guy come today?\"\n- \"Was there anything unusual in the garage last night?\"\n\nThe AI understands semantics and uses **vector similarity matching** to precisely locate relevant clips in the database.\n\n### 🧠 3. Automatic AI Scene Description\n\nEvery 10-second clip is analyzed by AI and gets an auto-generated text summary:\n\n- Recognizes people, actions, objects, and scenes\n- Builds a searchable event index\n- Turns your \"dumb camera\" into a \"talking security assistant\"\n\n### ⏱ 4. Smart Time-Range Filtering\n\n- Precise filtering by time: \"this morning\", \"yesterday between 3pm and 5pm\"\n- Natural language time expressions auto-converted\n- Cross-camera joint search — no blind spots\n\n### 🏃 5. Motion Detection & Smart Filtering\n\n- Automatically identifies static footage and skips meaningless clips\n- **Saves up to 70% on API costs**\n- Adjustable sensitivity for different environments\n- All footage is still saved — only static clips skip AI analysis\n\n### 🗄 6. Local Event Index & Auto-Management\n\n- **SQLite local database** — works offline, data stays with you\n- Automatic expiration cleanup to free up disk space\n- Auditable logs — every operation is traceable\n- Configurable retention period (default: 3 days)\n\n---\n\n## 🎬 Use Cases\n\n| Scenario | What You Can Say |\n|----------|------------------|\n| 🏠 Home Security | \"Did any strangers ring the doorbell today?\" |\n| 🏪 Retail Monitoring | \"Find the person who stole something today\" |\n| 🚗 Garage Watch | \"Did anyone approach my car last night?\" |\n| 📦 Package Tracking | \"When did the courier drop off the package?\" |\n| 🐾 Pet Monitoring | \"What did my cat do in the yard today?\" |\n| 👶 Family Care | \"What time did the kids get home from school?\" |\n\n---\n\n## ⚡ 2-Minute Quick Start\n\n### Step 1: Install\n\nAfter installing the Skill, the AI assistant will guide you through environment setup:\n\n- Detect Python 3.10 environment\n- Create isolated virtual environment (`.venv`)\n- Install dependencies (`numpy`, `opencv-python`, `requests`)\n\n**No manual operations needed — just follow the prompts.**\n\n### Step 2: Configure Cameras\n\n| Parameter | Description | Default |\n|-----------|-------------|---------|\n| `STREAM_URL` | Camera RTSP address | — (required) |\n| `KAMI_API_KEY` | Kamivision API key ([get free key](https://kamiclaw-skill.kamihome.com)) | — (required) |\n| `DEVICE_ID` | Camera label, e.g., `front-door` | `CAM-001` |\n| `SKIP_STATIC` | Skip static frames to save costs | `true` |\n| `STATIC_THRESHOLD` | Motion sensitivity (higher = less sensitive) | `5.0` |\n| `DATA_DIR` | Storage directory | `stream_data` |\n| `RETENTION_DAYS` | Days to keep recordings | `3` |\n\n**Multi-camera support** — set up once, cover the whole house.\n\n### Step 3: Start Using\n\nJust talk to the AI assistant in plain English:\n\n```\n\"Start recording\"\n\"Stop recording\"\n\"Search for a person carrying a box\"\n\"What happened in the last 2 hours?\"\n\"Show me the logs\"\n```\n\n**Zero learning curve, ready to use out of the box.**\n\n---\n\n## 🔧 System Architecture\n\n```\nCamera (RTSP/RTMP)\n    │\n    ▼\n┌──────────────┐\n│ Pull Stream  │  cv2.VideoCapture\n└──────┬───────┘\n       │\n       ▼\n┌──────────────┐\n│  Slice 10s   │  VideoWriter → .mp4\n└──────┬───────┘\n       │\n       ▼\n┌──────────────┐     ┌─────────────────┐\n│ Motion Check │────▶│ Skip (save $$$) │\n│              │ yes │                 │\n└──────┬───────┘     └─────────────────┘\n       │ no\n       ▼\n┌──────────────┐\n│ Kamivision   │  AI description + vector embedding\n│ AI API       │\n└──────┬───────┘\n       │\n       ▼\n┌──────────────┐\n│ SQLite Index │  path / time / description / vector\n└──────┬───────┘\n       │\n       ▼\n┌──────────────┐\n│ NL Search    │  cosine similarity matching\n└──────────────┘\n```\n\n---\n\n## 🔒 Security & Privacy\n\nWe understand how sensitive surveillance data is, so:\n\n- **Local-First** — Videos and index database stay on your machine, you're in full control\n- **Least Privilege** — Frames/videos only uploaded to API when AI analysis is needed\n- **Credential Isolation** — API keys stored locally, never leaked elsewhere\n- **Configurable Upload Mode** — Default uploads sampled frames only; video mode optional\n- **Auto Expiration** — Data beyond retention period auto-deleted, leaves no trace\n\n> Full privacy policy: https://kamiclaw-skill.kamihome.com/privacy\n\n---\n\n## 💰 Pricing Advantage\n\n| Comparison | Traditional NVR / Cloud Storage | Kamivision Recorder |\n|------------|--------------------------------|---------------------|\n| Search Method | Manual scrubbing | One-sentence natural language search |\n| Setup Time | Hours to days | 2 minutes |\n| Extra Hardware | NVR device required | No extra hardware |\n| AI Analysis | Pay extra | Built-in AI analysis |\n| Multi-Camera | Pay per camera | Unified management, flexible scaling |\n| Data Ownership | Vendor's cloud servers | 100% local storage |\n\n**Sign up and get 200 free Credits — enough for several days of full feature trial!**\n\n[🎁 Sign Up for Free Now →](https://kamiclaw-skill.kamihome.com)\n\n---\n\n## 📋 Requirements\n\n- Python 3.10+\n- RTSP/RTMP-compatible network camera\n- Kamivision API key ([get free key](https://kamiclaw-skill.kamihome.com))\n- Sufficient disk space (~1 GB/day per camera)\n\n---\n\n## 📄 License\n\n[MIT-0](https://opensource.org/license/mit-0)\n\nFile v1.1.0:_meta.json\n\n{\n  \"ownerId\": \"kn7e9156e1awf00v1sas2wkdfd85a4zh\",\n  \"slug\": \"kami-video-search\",\n  \"version\": \"1.1.0\",\n  \"publishedAt\": 1780032818006\n}\n\nFile v1.1.0:skill-card.md\n\n## Description: <br>\nRecords RTSP/RTMP camera streams and lets users start, stop, monitor, search, list recent events, and view logs for AI-indexed video clips across multiple cameras. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[13681882136](https://clawhub.ai/user/13681882136) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users and developers use this skill to configure RTSP/RTMP cameras, record footage locally, and search AI-generated clip descriptions with natural language across one or more cameras. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill handles private camera footage and can send footage or sampled frames to Kamivision for AI analysis. <br>\nMitigation: Install only when this data handling is acceptable, review Kamivision privacy terms, and avoid using the skill for cameras covering highly sensitive areas. <br>\nRisk: RTSP stream URLs may include embedded credentials that can appear in chat summaries, configuration, or logs. <br>\nMitigation: Use least-privilege camera credentials, avoid embedding reusable passwords where possible, redact URLs before sharing logs, and rotate credentials after exposure. <br>\nRisk: The setup path can install Python through an automatic curl-to-bash pyenv installer when Python 3.10 is missing. <br>\nMitigation: Review the setup script first and prefer installing Python 3.10 manually from a trusted package source before running setup. <br>\nRisk: Broad start, stop, status, and log commands can operate across all configured cameras. <br>\nMitigation: Confirm target cameras before execution and use explicit device-specific commands for routine operation. <br>\n\n\n## Reference(s): <br>\n- [ClawHub Skill Page](https://clawhub.ai/13681882136/kami-video-search) <br>\n- [Kamivision Homepage](https://kamiclaw-skill.kamihome.com) <br>\n- [Kamivision Privacy Policy](https://kamiclaw-skill.kamihome.com/privacy) <br>\n- [README](README.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Shell commands, Configuration, Guidance, JSON] <br>\n**Output Format:** [Markdown guidance with shell commands and JSON command results] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May include recording status, clip metadata, log excerpts, and local file paths.] <br>\n\n## Skill Version(s): <br>\n1.1.0 (source: server release metadata; artifact frontmatter lists 2.0.0) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.1.0:stream_config.json\n\n{\n  \"SEGMENT_DURATION\": 10,\n  \"OUTPUT_WIDTH\": 640,\n  \"OUTPUT_HEIGHT\": 360,\n  \"TIMESTAMP_SOURCE\": \"ntp\",\n  \"ENABLE_DESCRIPTION\": true,\n  \"SKIP_STATIC\": true,\n  \"STATIC_THRESHOLD\": 5.0,\n  \"KAMI_API_URL\": \"https://kamiclaw-skill-api.kamihome.com/v1/detect\",\n  \"KAMI_API_KEY\": \"\",\n  \"KAMI_API_RETRY\": 3,\n  \"SUMMARY_DETECT_TYPE\": \"SUMMARY\",\n  \"SUMMARY_DETECT_SUB_TYPE\": \"\",\n  \"SUMMARY_PROMPT\": \"\",\n  \"SUMMARY_UPLOAD_MODE\": \"image\",\n  \"SUMMARY_SAMPLE_FPS\": 1,\n  \"EMBED_DETECT_TYPE\": \"EMBED\",\n  \"EMBED_DETECT_SUB_TYPE\": \"\",\n  \"EMBEDDING_DIM\": 2048,\n  \"SIMILARITY_THRESHOLD\": 0.35,\n  \"SEARCH_TOP_K\": 5,\n  \"LIST_TOP_K\": 5,\n  \"DATA_DIR\": \"\",\n  \"RETENTION_DAYS\": 3,\n  \"INDEX_FILE\": \"index.db\",\n  \"PROCESS_WORKERS\": 5,\n  \"RECONNECT_DELAY\": 3,\n  \"MAX_RECONNECT\": 3,\n  \"skillId\": \"SK_VIDEO_SEARCH\",\n  \"LOG_FILE\": \"\",\n  \"cameras\": [\n    {\n      \"DEVICE_ID\": \"\",\n      \"STREAM_URL\": \"\"\n    },\n    {\n      \"DEVICE_ID\": \"\",\n      \"STREAM_URL\": \"\"\n    }\n  ]\n}\n\nFile v1.1.0:requirements.txt\n\nnumpy>=1.21.0,<2.0.0\nrequests>=2.28.0,<3.0.0\nopencv-python>=4.6.0,<5.0.0\n\nArchive v1.0.9: 8 files, 26080 bytes\n\nFiles: README.md (6927b), requirements.txt (73b), setup.sh (3935b), skill-card.md (2862b), SKILL.md (9147b), stream_config.json (941b), stream_recoder2.py (58297b), _meta.json (136b)\n\nFile v1.0.9:SKILL.md\n\n---\nname: kamivision-recorder\nversion: 2.0.0\ndescription: \"RTSP/RTMP multi-camera stream recording with AI-powered video search. Start/stop recording, check status, search clips by natural language, list recent events, view logs. Supports multiple cameras simultaneously.\"\nuser-invocable: true\ndisable-model-invocation: false\nhomepage: https://kamiclaw-skill.kamihome.com\nmetadata: { \"openclaw\": { \"emoji\": \"📹\", \"requires\": { \"bins\": [\"python3\"], \"env\": [] }, \"hardware\": { \"required\": { \"camera\": \"RTSP-compatible camera\", \"storage\": \"30GB available space\" }, \"optional\": { \"ram\": \"8GB minimum, 16GB recommended\" } } } }\n---\n# Kamivision Video Recorder & Search\n\nRecord camera streams 24/7 and search footage by natural language description. Supports multiple cameras simultaneously. Setup takes 2 minutes. Sign up at https://kamiclaw-skill.kamihome.com for 200 free credits.\n\n## Capabilities\n\n1. **Start recording** — launch background stream recording (one or more cameras)\n2. **Stop recording** — stop background recording (one or more cameras)\n3. **Check status** — view recording process status (one or more cameras)\n4. **Search video** — find clips by natural language (with optional time range, across cameras)\n5. **List recent events** — show recent non-static video events (across cameras)\n6. **View logs** — display recording logs\n\n## Trigger Words\n\n| Intent          | Trigger Words                                                             |\n| --------------- | ------------------------------------------------------------------------- |\n| Start recording | start record, start recording, start camera, start monitor, launch stream |\n| Stop recording  | stop record, stop recording, stop camera, stop monitor, kill recording    |\n| Check status    | recording status, camera status, is recording, check status               |\n| Search video    | search video, find video, find clip, look for, search footage             |\n| List recent     | recent events, recent clips, list events, what happened, show recent      |\n| View logs       | show logs, view logs, recording logs, check logs                          |\n\nIf no trigger word matches, use semantic understanding to route to the closest intent.\n\n## First-Time Setup\n\nRun the setup script to create the virtual environment (Python 3.10+) and install dependencies:\n\n```bash\nbash {baseDir}/setup.sh\n```\n\n## Pre-Recording Configuration\n\nBefore EVERY recording start, follow this flow to confirm camera configuration with the user.\n\n### Flow\n\n1. **Read config** from `{baseDir}/stream_config.json`\n2. **Check KAMI_API_KEY** - if empty, tell user to get one at https://kamiclaw-skill.kamihome.com\n3. **Ask user**: \"How many cameras do you want to record?\"\n4. **For each camera**, confirm or collect:\n   - `DEVICE_ID`: Camera location identifier (e.g., `front-door`, `living-room`, `garage`)\n   - `STREAM_URL`: Camera RTSP stream URL (e.g., `rtsp://admin:pass@192.168.1.100:554/stream1`)\n5. **Display summary** of all cameras to be recorded, ask for confirmation\n6. **Update config** if needed, write back to `{baseDir}/stream_config.json`\n7. **Only after user confirms** → start recording\n\n### Required Parameters\n\n#### KAMI_API_KEY (top-level, shared by all cameras)\n\n- **Purpose**: Auth key for Kamivision API (`X-API-Key` header). Required for video description and search.\n- **Format**: String starting with `sk_live_`\n- **How to get**: Sign up at https://kamiclaw-skill.kamihome.com → API Keys → create/copy key\n- **Error behavior**: Invalid key → API returns 401/403, retries up to `KAMI_API_RETRY` times. All fail → recording stops.\n\n#### cameras (array)\n\nEach camera in the `cameras` array requires:\n\n##### DEVICE_ID\n\n- **Purpose**: Unique identifier for the camera, used as folder name and file prefix\n- **Format**: English only, no spaces. Use lowercase with hyphens. Examples: `front-door`, `living-room`, `garage`, `backyard`\n- **Constraint**: Must be ASCII alphanumeric + hyphens only (used in file paths)\n\n##### STREAM_URL\n\n- **Purpose**: RTSP/RTMP stream URL passed to `cv2.VideoCapture()`\n- **Format**: `rtsp://username:password@IP:port/path`\n- **How to get**: Check camera admin interface for RTSP URL (Hikvision: `rtsp://user:pass@ip:554/Streaming/Channels/1`, Dahua: `rtsp://user:pass@ip:554/cam/realmonitor?channel=1&subtype=0`)\n- **Error behavior**: After 100 consecutive frame failures → reconnect (up to `MAX_RECONNECT` times). All retries fail → that camera's recording stops.\n\n### Configuration Scenarios\n\n**Scenario A: First-time setup (no cameras configured)**\n- Tell user: \"No cameras configured yet. Need to add camera information.\"\n- Ask: \"How many cameras do you want to record?\"\n- For each camera, ask for DEVICE_ID and STREAM_URL\n- Add entries to `cameras` array\n\n**Scenario B: Partial config (some cameras missing info)**\n- Show existing configured cameras\n- Ask: \"Are these camera details correct? Need to modify or add new ones?\"\n- Update/add as needed\n\n**Scenario C: All cameras already configured**\n- Display all configured cameras with their DEVICE_ID and STREAM_URL\n- Ask: \"Confirm to start recording these cameras? Or need to modify?\"\n- Proceed only after user confirms\n\n### Config Structure Example\n\n```json\n{\n  \"KAMI_API_KEY\": \"sk_live_xxx\",\n  \"KAMI_API_URL\": \"https://kamiclaw-skill-api.kamihome.com/v1/detect\",\n  \"RETENTION_DAYS\": 3,\n  \"cameras\": [\n    {\n      \"DEVICE_ID\": \"front-door\",\n      \"STREAM_URL\": \"rtsp://admin:pass@192.168.1.100:554/stream1\"\n    },\n    {\n      \"DEVICE_ID\": \"living-room\",\n      \"STREAM_URL\": \"rtsp://admin:pass@192.168.1.101:554/stream1\"\n    }\n  ]\n}\n```\n\nPer-camera entries can also override any top-level parameter (e.g. different resolution for a specific camera):\n\n```json\n{\n  \"DEVICE_ID\": \"garage\",\n  \"STREAM_URL\": \"rtsp://admin:pass@192.168.1.102:554/stream1\",\n  \"OUTPUT_WIDTH\": 1280,\n  \"OUTPUT_HEIGHT\": 720\n}\n```\n\n### Config Update\n\nAfter user confirms: read config → update changed fields → write back → start recording.\n\n### Backward Compatibility\n\nIf the config has no `cameras` array but has top-level `STREAM_URL` and `DEVICE_ID`, treat it as a single-camera setup (legacy mode).\n\n## Command Execution\n\nAll commands use `.venv/bin/python` and `stream_recoder2.py` with `--config {baseDir}/stream_config.json`.\n\nThe `--device` parameter is optional and accepts comma-separated DEVICE_IDs. If omitted, the command operates on ALL configured cameras.\n\n### Start Recording\n\nStart all cameras:\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --start-daemon --log-file {baseDir}/stream_recorder.log\n```\n\nStart specific camera(s):\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --start-daemon --log-file {baseDir}/stream_recorder.log --device front-door\n```\n\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --start-daemon --log-file {baseDir}/stream_recorder.log --device front-door,living-room\n```\n\nParse JSON output: `status: \"started\"` → show PID; `status: \"already_running\"` → show PID; error → show message. For multiple cameras, output contains a `cameras` array with per-camera results.\n\n### Stop Recording\n\nStop all cameras:\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --stop-daemon\n```\n\nStop specific camera(s):\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --stop-daemon --device front-door\n```\n\n### Check Status\n\nAll cameras:\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --status\n```\n\nSpecific camera(s):\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --status --device front-door,living-room\n```\n\n### Search Video\n\nSearch across all cameras:\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --search \"QUERY\" --json\n```\n\nSearch specific camera(s):\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --search \"QUERY\" --json --device front-door\n```\n\nWith time range (format `YYYY-MM-DD_HH:MM:SS`):\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --search \"QUERY\" --time-start \"START\" --time-end \"END\" --json\n```\n\nNatural language time (\"today morning\", \"yesterday afternoon\") → convert to `YYYY-MM-DD_HH:MM:SS`.\n\n### List Recent Events\n\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --list HOURS --json\n```\n\nWith device filter:\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --list HOURS --json --device front-door\n```\n\nDefault HOURS to 24 if not specified.\n\n### View Logs\n\n```bash\ntail -100 {baseDir}/stream_recorder.log\n```\n\n## Privacy\n\nFor privacy policy and data handling details, visit https://kamiclaw-skill.kamihome.com/privacy\n\n## Language\n\nRespond in the same language the user uses.\n\nFile v1.0.9:README.md\n\n# 📹 Kamivision Recorder — 让你的摄像头拥有\"记忆\"和\"大脑\"\n\n**告别无尽的录像回放。用一句话，找到你想看的那一刻。**\n\n> 🎯 \"今天早上后门那个穿红色外套的人\" — 输入一句话，精准跳转到对应画面。  \n> 24/7 全天候录制 · AI 智能检索 · 2 分钟极速部署  \n> 注册即送 200 免费 Credits！[立即开始 →](https://kamiclaw-skill.kamihome.com)\n\n---\n\n## 🚀 为什么选择 Kamivision Recorder？\n\n传统监控的痛点你一定经历过：\n\n- ❌ 翻看几个小时录像只为找一个片段\n- ❌ 关键画面被淹没在海量无用静态镜头中\n- ❌ 多摄像头管理混乱，无法跨镜头联查\n- ❌ 出事后才发现录像已过期删除\n\n**Kamivision Recorder 一次性解决所有问题。** 它将你的普通摄像头升级为**可自然语言搜索**的 AI 智能录像系统 —— 像搜索引擎一样搜索你的监控视频。\n\n---\n\n## ✨ 六大核心功能\n\n### 🎥 1. 全天候智能录制\n\n- 后台守护进程，7×24 小时不间断录制\n- 10 秒分段存储，精确到每一个时刻\n- 支持多摄像头同时录制，统一管理\n- 对话式操控 —— 说一句\"开始录制\"即可启动\n\n### 🔍 2. 自然语言视频搜索（核心卖点）\n\n不需要任何专业操作，**用你的日常语言描述你要找的画面**：\n\n- \"找到那个搬箱子的人\"\n- \"有人在后门出现\"\n- \"快递员今天来了几次？\"\n- \"昨天晚上车库有没有异常？\"\n\nAI 自动理解语义，通过**向量相似度匹配**在数据库中精准定位相关片段。\n\n### 🧠 3. AI 场景自动描述\n\n每个 10 秒视频片段都会经过 AI 分析，自动生成文字摘要：\n\n- 识别人物、动作、物品、场景\n- 构建可检索的事件索引\n- 让\"哑巴监控\"变成\"会说话的安保助手\"\n\n### ⏱ 4. 智能时间范围过滤\n\n- 支持按时间段精确筛选：\"今天上午\"、\"昨天下午3点到5点\"\n- 自然语言时间表达自动转换\n- 跨摄像头联合搜索，无死角覆盖\n\n### 🏃 5. 运动检测 & 智能过滤\n\n- 自动识别静态画面，跳过无意义片段\n- **节省高达 70% 的 API 调用费用**\n- 可调节灵敏度，适配不同场景需求\n- 所有画面仍然保存，只是静态片段不做 AI 分析\n\n### 🗄 6. 本地事件索引 & 自动管理\n\n- **SQLite 本地数据库**，离线可查，数据不外泄\n- 自动过期清理，释放磁盘空间\n- 可审计日志，每一次操作有据可查\n- 灵活配置保留天数（默认 3 天）\n\n---\n\n## 🎬 使用场景\n\n| 场景 | 你可以这样说 |\n|------|-------------|\n| 🏠 家庭安防 | \"今天有陌生人按门铃吗？\" |\n| 🏪 店铺监控 | \"找到今天偷东西的那个人\" |\n| 🚗 车库看护 | \"昨晚有人靠近我的车吗？\" |\n| 📦 快递追踪 | \"快递员什么时候把包裹放在门口的？\" |\n| 🐾 宠物看护 | \"我家猫今天在院子里做了什么？\" |\n| 👶 老人/儿童监护 | \"孩子几点从学校回来的？\" |\n\n---\n\n## ⚡ 2 分钟快速上手\n\n### 第一步：安装\n\n安装 Skill 后，AI 助手会自动引导你完成环境配置：\n\n- 检测 Python 3.10 环境\n- 创建隔离虚拟环境（`.venv`）\n- 安装所需依赖（`numpy`、`opencv-python`、`requests`）\n\n**无需手动操作，跟着提示走即可。**\n\n### 第二步：配置摄像头\n\n| 参数 | 说明 | 默认值 |\n|------|------|--------|\n| `STREAM_URL` | 摄像头 RTSP 地址 | —（必填） |\n| `KAMI_API_KEY` | Kamivision API 密钥（[免费获取](https://kamiclaw-skill.kamihome.com)） | —（必填） |\n| `DEVICE_ID` | 摄像头标签，如 `front-door` | `CAM-001` |\n| `SKIP_STATIC` | 跳过静态画面，节省费用 | `true` |\n| `STATIC_THRESHOLD` | 运动灵敏度，越高越不敏感 | `5.0` |\n| `DATA_DIR` | 存储目录 | `stream_data` |\n| `RETENTION_DAYS` | 录像保留天数 | `3` |\n\n**支持多摄像头配置** —— 一次设置，全屋覆盖。\n\n### 第三步：开始使用\n\n直接用自然语言与 AI 助手对话：\n\n```\n\"开始录制\"\n\"停止录制\"  \n\"搜索一个搬箱子的人\"\n\"最近2小时发生了什么？\"\n\"查看日志\"\n```\n\n**零学习成本，即装即用。**\n\n---\n\n## 🔧 系统架构\n\n```\nCamera (RTSP/RTMP)\n    │\n    ▼\n┌──────────────┐\n│  拉取视频流   │  cv2.VideoCapture\n└──────┬───────┘\n       │\n       ▼\n┌──────────────┐\n│  10秒分段切片 │  VideoWriter → .mp4\n└──────┬───────┘\n       │\n       ▼\n┌──────────────┐     ┌─────────────────┐\n│  运动检测     │────▶│ 静态跳过(省钱!) │\n│              │ yes │                 │\n└──────┬───────┘     └─────────────────┘\n       │ no\n       ▼\n┌──────────────┐\n│ Kamivision   │  AI 场景描述 + 向量嵌入\n│ AI API       │\n└──────┬───────┘\n       │\n       ▼\n┌──────────────┐\n│ SQLite 索引   │  路径 / 时间 / 描述 / 向量\n└──────┬───────┘\n       │\n       ▼\n┌──────────────┐\n│ 自然语言搜索  │  余弦相似度匹配\n└──────────────┘\n```\n\n---\n\n## 🔒 安全与隐私\n\n我们深知监控数据的敏感性，因此：\n\n- **本地优先** — 视频、索引数据库全部存储在本地，你完全掌控\n- **最小权限** — 仅在需要 AI 分析时才上传帧/视频到 API\n- **凭证隔离** — API 密钥本地加密存储，不会传输到其他地方\n- **可配置上传模式** — 默认仅上传抽帧图片，可选视频模式\n- **自动过期** — 超过保留期的数据自动删除，不留痕迹\n\n> 详细隐私政策请访问：https://kamiclaw-skill.kamihome.com/privacy\n\n---\n\n## 💰 定价优势\n\n| 对比项 | 传统 NVR/云存储 | Kamivision Recorder |\n|--------|----------------|---------------------|\n| 搜索方式 | 手动翻看 | 自然语言一句话搜索 |\n| 部署时间 | 数小时~数天 | 2 分钟 |\n| 额外硬件 | 需要 NVR 设备 | 无需额外硬件 |\n| 智能分析 | 额外付费 | 内置 AI 分析 |\n| 多摄像头 | 每台额外收费 | 统一管理，灵活扩展 |\n| 数据归属 | 云端他人服务器 | 100% 本地存储 |\n\n**注册即送 200 免费 Credits，足够体验数天完整功能！**\n\n[🎁 立即免费注册 →](https://kamiclaw-skill.kamihome.com)\n\n---\n\n## 📋 系统要求\n\n- Python 3.10+\n- 支持 RTSP/RTMP 的网络摄像头\n- Kamivision API 密钥（[免费获取](https://kamiclaw-skill.kamihome.com)）\n- 足够的磁盘空间（约 1GB/天/摄像头）\n\n---\n\n## 📄 License\n\n[MIT-0](https://opensource.org/license/mit-0)\n\nFile v1.0.9:_meta.json\n\n{\n  \"ownerId\": \"kn7e9156e1awf00v1sas2wkdfd85a4zh\",\n  \"slug\": \"kami-video-search\",\n  \"version\": \"1.0.9\",\n  \"publishedAt\": 1780025332430\n}\n\nFile v1.0.9:skill-card.md\n\n## Description: <br>\nRTSP/RTMP multi-camera stream recording with AI-powered video search for starting and stopping recordings, checking status, searching clips by natural language, listing recent events, and viewing logs. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[13681882136](https://clawhub.ai/user/13681882136) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users and developers use this skill to connect RTSP/RTMP cameras, record local video segments, index events with Kamivision analysis, and search recorded footage by natural language across one or more cameras. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Continuous surveillance recording can capture sensitive activity. <br>\nMitigation: Use the skill only with authorized cameras and confirm recording scope before starting background recording. <br>\nRisk: Camera footage, extracted frames, and search text may be sent to the Kamivision API for analysis. <br>\nMitigation: Avoid using sensitive cameras unless the user accepts remote analysis behavior or has verified a suitable local-only or opt-in mode. <br>\nRisk: Camera stream URLs and API keys are sensitive credentials. <br>\nMitigation: Avoid embedding passwords in RTSP URLs where possible, keep the API key local, and redact credentials from chat, logs, and shared configuration. <br>\nRisk: The setup script installs runtime dependencies and may install Python tooling if Python 3.10 is absent. <br>\nMitigation: Review the setup script before running it and prefer an isolated environment with known package sources. <br>\nRisk: Retention cleanup can automatically delete recorded footage. <br>\nMitigation: Set retention days deliberately and back up footage that must be preserved before cleanup runs. <br>\n\n\n## Reference(s): <br>\n- [ClawHub release page](https://clawhub.ai/13681882136/kami-video-search) <br>\n- [Kamivision homepage](https://kamiclaw-skill.kamihome.com) <br>\n- [Kamivision privacy policy](https://kamiclaw-skill.kamihome.com/privacy) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Guidance, Shell commands, Configuration, JSON, Text] <br>\n**Output Format:** [Markdown guidance with shell commands and JSON command results] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May create or update local configuration, logs, SQLite indexes, and recorded video segment files.] <br>\n\n## Skill Version(s): <br>\n1.0.9 (source: server release metadata; artifact frontmatter reports 2.0.0) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.9:stream_config.json\n\n{\n  \"SEGMENT_DURATION\": 10,\n  \"OUTPUT_WIDTH\": 640,\n  \"OUTPUT_HEIGHT\": 360,\n  \"TIMESTAMP_SOURCE\": \"ntp\",\n  \"ENABLE_DESCRIPTION\": true,\n  \"SKIP_STATIC\": true,\n  \"STATIC_THRESHOLD\": 5.0,\n  \"KAMI_API_URL\": \"https://kamiclaw-skill-api.kamihome.com/v1/detect\",\n  \"KAMI_API_KEY\": \"\",\n  \"KAMI_API_RETRY\": 3,\n  \"SUMMARY_DETECT_TYPE\": \"SUMMARY\",\n  \"SUMMARY_DETECT_SUB_TYPE\": \"\",\n  \"SUMMARY_PROMPT\": \"\",\n  \"SUMMARY_UPLOAD_MODE\": \"image\",\n  \"SUMMARY_SAMPLE_FPS\": 1,\n  \"EMBED_DETECT_TYPE\": \"EMBED\",\n  \"EMBED_DETECT_SUB_TYPE\": \"\",\n  \"EMBEDDING_DIM\": 2048,\n  \"SIMILARITY_THRESHOLD\": 0.35,\n  \"SEARCH_TOP_K\": 5,\n  \"LIST_TOP_K\": 5,\n  \"DATA_DIR\": \"\",\n  \"RETENTION_DAYS\": 3,\n  \"INDEX_FILE\": \"index.db\",\n  \"PROCESS_WORKERS\": 5,\n  \"RECONNECT_DELAY\": 3,\n  \"MAX_RECONNECT\": 3,\n  \"skillId\": \"SK_VIDEO_SEARCH\",\n  \"LOG_FILE\": \"\",\n  \"cameras\": [\n    {\n      \"DEVICE_ID\": \"\",\n      \"STREAM_URL\": \"\"\n    },\n    {\n      \"DEVICE_ID\": \"\",\n      \"STREAM_URL\": \"\"\n    }\n  ]\n}\n\nFile v1.0.9:requirements.txt\n\nnumpy>=1.21.0,<2.0.0\nrequests>=2.28.0,<3.0.0\nopencv-python>=4.6.0,<5.0.0\n\nArchive v1.0.8: 8 files, 22291 bytes\n\nFiles: README.md (6225b), requirements.txt (73b), setup.sh (3935b), skill-card.md (2868b), SKILL.md (5118b), stream_config.json (850b), stream_recoder2.py (50582b), _meta.json (136b)\n\nFile v1.0.8:SKILL.md\n\n---\nname: kamivision-recorder\nversion: 1.0.0\ndescription: \"RTSP/RTMP camera stream recording with AI-powered video search. Start/stop recording, check status, search clips by natural language, list recent events, view logs.\"\nuser-invocable: true\ndisable-model-invocation: false\nhomepage: https://kamiclaw-skill.kamihome.com\nmetadata: { \"openclaw\": { \"emoji\": \"📹\", \"requires\": { \"bins\": [\"python3\"], \"env\": [] }, \"hardware\": { \"required\": { \"camera\": \"RTSP-compatible camera\", \"storage\": \"30GB available space\" }, \"optional\": { \"ram\": \"8GB minimum, 16GB recommended\" } } } }\n---\n# Kamivision Video Recorder & Search\n\nRecord camera streams 24/7 and search footage by natural language description. Setup takes 2 minutes. Sign up at https://kamiclaw-skill.kamihome.com for 200 free credits.\n\n## Capabilities\n\n1. **Start recording** — launch background stream recording\n2. **Stop recording** — stop background recording\n3. **Check status** — view recording process status\n4. **Search video** — find clips by natural language (with optional time range)\n5. **List recent events** — show recent non-static video events\n6. **View logs** — display recording logs\n\n## Trigger Words\n\n| Intent          | Trigger Words                                                             |\n| --------------- | ------------------------------------------------------------------------- |\n| Start recording | start record, start recording, start camera, start monitor, launch stream |\n| Stop recording  | stop record, stop recording, stop camera, stop monitor, kill recording    |\n| Check status    | recording status, camera status, is recording, check status               |\n| Search video    | search video, find video, find clip, look for, search footage             |\n| List recent     | recent events, recent clips, list events, what happened, show recent      |\n| View logs       | show logs, view logs, recording logs, check logs                          |\n\nIf no trigger word matches, use semantic understanding to route to the closest intent.\n\n## First-Time Setup\n\nRun the setup script to create the virtual environment (Python 3.10+) and install dependencies:\n\n```bash\nbash {baseDir}/setup.sh\n```\n\n## Pre-Recording Configuration\n\nBefore EVERY recording start, confirm the Required Parameters with the user.\n\n### Flow\n\n1. Read config from `{baseDir}/stream_config.json`\n2. Display all Required Parameters with current values\n3. Ask user to confirm or update\n4. Only after confirmation → start recording\n\n### Required Parameters\n\n#### STREAM_URL\n\n- **Purpose**: RTSP/RTMP stream URL passed to `cv2.VideoCapture()`\n- **Format**: `rtsp://username:password@IP:port/path`\n- **How to get**: Check camera admin interface for RTSP URL (Hikvision: `rtsp://user:pass@ip:554/Streaming/Channels/1`, Dahua: `rtsp://user:pass@ip:554/cam/realmonitor?channel=1&subtype=0`)\n- **Error behavior**: After 100 consecutive frame failures → reconnect (up to `MAX_RECONNECT` times). All retries fail → recording stops.\n\n#### KAMI_API_KEY\n\n- **Purpose**: Auth key for Kamivision API (`X-API-Key` header). Required for video description and search.\n- **Format**: String starting with `sk_live_`\n- **How to get**: Sign up at https://kamiclaw-skill.kamihome.com → API Keys → create/copy key\n- **Error behavior**: Invalid key → API returns 401/403, retries up to `KAMI_API_RETRY` times. All fail → recording stops.\n\n### Config Update\n\nAfter user confirms: read config → update changed fields → write back → start recording.\n\n## Command Execution\n\nAll commands use `.venv/bin/python` and `stream_recoder2.py` with `--config {baseDir}/stream_config.json`.\n\n### Start Recording\n\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --start-daemon --log-file {baseDir}/stream_recorder.log\n```\n\nParse JSON output: `status: \"started\"` → show PID; `status: \"already_running\"` → show PID; error → show message.\n\n### Stop Recording\n\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --stop-daemon\n```\n\n### Check Status\n\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --status\n```\n\n### Search Video\n\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --search \"QUERY\" --json\n```\n\nWith time range (format `YYYY-MM-DD_HH:MM:SS`):\n\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --search \"QUERY\" --time-start \"START\" --time-end \"END\" --json\n```\n\nNatural language time (\"today morning\", \"yesterday afternoon\") → convert to `YYYY-MM-DD_HH:MM:SS`.\n\n### List Recent Events\n\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --list HOURS --json\n```\n\nDefault HOURS to 24 if not specified.\n\n### View Logs\n\n```bash\ntail -100 {baseDir}/stream_recorder.log\n```\n\n## Privacy\n\nFor privacy policy and data handling details, visit https://kamiclaw-skill.kamihome.com/privacy\n\n## Language\n\nRespond in the same language the user uses.\n\nFile v1.0.8:README.md\n\n# 📹 Kamivision Recorder\n\n**Intelligent camera stream recording with AI-powered natural language video search.**\n\n> **Stop scrubbing through hours of footage.** Just type what you saw — \"guy in a red jacket at the back door this morning\" — and jump straight to the clip. 24/7 recording, AI-powered search, 2-minute setup. Sign up and get 200 Credits for free! [Get started →](https://kamiclaw-skill.kamihome.com)\n\n---\n\n## What is this?\n\nTurn your camera into a searchable surveillance system. This tool records your RTSP/RTMP camera in short clips, uses AI to describe each clip, and lets you search footage with plain language.\n\n## Features\n\n- 🎥 Background recording — start/stop via chat, runs as a daemon process\n- 🔍 Natural language search — \"find the person in a red jacket\" or \"someone entered the door\"\n- ⏱ Time-range filtering — search within specific hours or days\n- 🧠 AI descriptions — each 10-second clip gets an automatic text summary\n- 🗑 Auto cleanup — old recordings are deleted after configurable retention days\n- 📊 Motion detection — optionally skip static footage to save API costs\n\n## How it works\n\n```\nCamera (RTSP)\n    │\n    ▼\n┌──────────────┐\n│  Pull Stream │  cv2.VideoCapture\n└──────┬───────┘\n       │\n       ▼\n┌──────────────┐\n│  Slice 10s   │  VideoWriter → .mp4 clips\n└──────┬───────┘\n       │\n       ▼\n┌──────────────┐     ┌─────────────────┐\n│ Static Check │────▶│ Skip (no API)   │\n│              │ yes │                 │\n└──────┬───────┘     └─────────────────┘\n       │ no\n       ▼\n┌──────────────┐\n│ Kamivision   │  POST /v1/detect\n│ AI API       │  → description + embedding\n└──────┬───────┘\n       │\n       ▼\n┌──────────────┐\n│ SQLite Index │  video_path, timestamp,\n│              │  description, embedding\n└──────┬───────┘\n       │\n       ▼\n┌──────────────┐\n│ Search/List  │  cosine similarity matching\n└──────────────┘\n```\n\n## Quick Start\n\n### 1. Install\n\nAfter installing the skill, the agent will guide you through first-time setup:\n\n- Check Python 3.8+\n- Create `.venv` virtual environment\n- Install dependencies (`numpy`, `opencv-python`, `requests`)\n\nJust follow the prompts.\n\n### 2. Configure\n\nBefore each recording, the agent will confirm these parameters with you:\n\n| Parameter            | Description                                                                                      | Default       |\n| -------------------- | ------------------------------------------------------------------------------------------------ | ------------- |\n| `STREAM_URL`         | Camera RTSP address, e.g. `rtsp://admin:pass@192.168.1.100:554/stream1`                         | — (required)  |\n| `KAMI_API_KEY`       | Kamivision API key ([get one here](https://kamiclaw-flow-ui.stg.kamicloud.net/pricing))          | — (required)  |\n| `DEVICE_ID`          | Camera label, e.g. `front-door`                                                                 | `CAM-001`     |\n| `SKIP_STATIC`        | Skip static frames to save API costs                                                             | `true`        |\n| `STATIC_THRESHOLD`   | Motion sensitivity, higher = less sensitive                                                      | `5.0`         |\n| `DATA_DIR`           | Storage directory                                                                                | `stream_data` |\n| `RETENTION_DAYS`     | Days to keep recordings, auto-deleted after expiry                                              | `3`           |\n\nNot sure what to fill in? Use the defaults and adjust later.\n\n### 3. Use\n\nJust talk to the agent in natural language:\n\n- \"Start recording\"\n- \"Stop recording\"\n- \"Search for a person carrying a box\"\n- \"What happened in the last 2 hours?\"\n- \"Show me the logs\"\n\nNo commands to remember — the agent handles everything.\n\n## Important Notes\n\n- All video clips are saved to disk regardless of motion. Static clips are saved but not searchable.\n- Timestamps use your system's local timezone automatically.\n- **Data sent to the API depends on `SUMMARY_UPLOAD_MODE`**: By default (`image` mode), only extracted frame snapshots are sent to the Kamivision API. If `SUMMARY_UPLOAD_MODE` is set to `video`, the entire video file is uploaded. Verify this setting before starting recording.\n- Disk space estimate: ~1 GB/day per camera with moderate motion.\n\n## Security & Privacy\n\n- **Credentials**: Use a dedicated camera account and API key with the least privileges possible. Never share `stream_config.json`, which contains your stream URL and API key. Rotate credentials if you uninstall or stop using the skill.\n- **Camera imagery**: Camera-derived images (or videos, if `SUMMARY_UPLOAD_MODE=video`) are sent to the external Kamivision API for AI analysis. Review the provider's privacy terms before use. Avoid pointing the skill at highly sensitive areas unless appropriate.\n- **Local data**: Descriptions and embeddings of camera clips are stored in a local SQLite database, creating a searchable record of recorded events. Store the data directory in a protected location and set an appropriate retention period.\n- **Background recording**: The skill runs as a long-lived daemon and will continue recording until explicitly stopped. Periodically check status, logs, and disk usage.\n- **Dependencies**: Third-party packages are installed from PyPI with version ranges. For sensitive deployments, consider pinning exact versions in `requirements.txt`. Always install in the isolated `.venv` as instructed.\n\n## Requirements\n\n- Python 3.8+\n- Network-accessible RTSP/RTMP camera\n- Kamivision API key\n- Sufficient disk space\n\n## License\n\n[MIT-0](https://opensource.org/license/mit-0)\n\nFile v1.0.8:_meta.json\n\n{\n  \"ownerId\": \"kn7e9156e1awf00v1sas2wkdfd85a4zh\",\n  \"slug\": \"kami-video-search\",\n  \"version\": \"1.0.8\",\n  \"publishedAt\": 1779932581040\n}\n\nFile v1.0.8:skill-card.md\n\n## Description: <br>\nRTSP/RTMP camera stream recording with AI-powered video search. Start/stop recording, check status, search clips by natural language, list recent events, view logs. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[13681882136](https://clawhub.ai/user/13681882136) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users and developers use this skill to record RTSP/RTMP camera streams, index short clips with AI-generated descriptions, and search recent footage with natural language queries. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill handles surveillance footage and may send camera-derived images, or video when configured, plus search queries to Kamivision. <br>\nMitigation: Review the provider privacy terms, avoid highly sensitive camera locations unless appropriate, and verify SUMMARY_UPLOAD_MODE before starting recording. <br>\nRisk: The skill requires sensitive camera credentials and a Kamivision API key. <br>\nMitigation: Use a dedicated low-privilege camera account and API key, protect stream_config.json, avoid echoing secrets in chat, and rotate credentials when access is no longer needed. <br>\nRisk: The recorder runs as a long-lived background process and stores searchable camera records on disk. <br>\nMitigation: Monitor daemon status, logs, disk usage, and retention settings; stop recording when it is not needed and store the data directory in a protected location. <br>\nRisk: The setup script can install Python tooling and dependencies from remote package sources. <br>\nMitigation: Review setup.sh before running it, install in the isolated virtual environment, and pin exact dependency versions for sensitive deployments. <br>\n\n\n## Reference(s): <br>\n- [ClawHub listing](https://clawhub.ai/13681882136/kami-video-search) <br>\n- [Kamivision service homepage](https://kamiclaw-skill.kamihome.com) <br>\n- [Kamivision privacy policy](https://kamiclaw-skill.kamihome.com/privacy) <br>\n- [README.md](README.md) <br>\n- [SKILL.md](SKILL.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, shell commands, configuration, JSON] <br>\n**Output Format:** [Markdown guidance with inline shell commands and JSON command results] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May include recording status, search results, recent-event summaries, and log excerpts.] <br>\n\n## Skill Version(s): <br>\n1.0.8 (source: ClawHub release metadata; artifact frontmatter says 1.0.0) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.8:stream_config.json\n\n{\n  \"STREAM_URL\": \"\",\n  \"DEVICE_ID\": \"CAM-001\",\n  \"SEGMENT_DURATION\": 10,\n  \"OUTPUT_WIDTH\": 640,\n  \"OUTPUT_HEIGHT\": 360,\n  \"TIMESTAMP_SOURCE\": \"ntp\",\n  \"ENABLE_DESCRIPTION\": true,\n  \"SKIP_STATIC\": true,\n  \"STATIC_THRESHOLD\": 5.0,\n  \"KAMI_API_URL\": \"https://kamiclaw-skill-api.kamihome.com/v1/detect\",\n  \"KAMI_API_KEY\": \"\",\n  \"KAMI_API_RETRY\": 3,\n  \"SUMMARY_DETECT_TYPE\": \"SUMMARY\",\n  \"SUMMARY_DETECT_SUB_TYPE\": \"\",\n  \"SUMMARY_PROMPT\": \"\",\n  \"SUMMARY_UPLOAD_MODE\": \"image\",\n  \"SUMMARY_SAMPLE_FPS\": 1,\n  \"EMBED_DETECT_TYPE\": \"EMBED\",\n  \"EMBED_DETECT_SUB_TYPE\": \"\",\n  \"EMBEDDING_DIM\": 2048,\n  \"SIMILARITY_THRESHOLD\": 0.35,\n  \"SEARCH_TOP_K\": 5,\n  \"LIST_TOP_K\": 5,\n  \"DATA_DIR\": \"\",\n  \"RETENTION_DAYS\": 3,\n  \"INDEX_FILE\": \"index.db\",\n  \"PROCESS_WORKERS\": 5,\n  \"RECONNECT_DELAY\": 3,\n  \"MAX_RECONNECT\": 3,\n  \"skillId\": \"SK_VIDEO_SEARCH\",\n  \"LOG_FILE\": \"\"\n}\n\nFile v1.0.8:requirements.txt\n\nnumpy>=1.21.0,<2.0.0\nrequests>=2.28.0,<3.0.0\nopencv-python>=4.6.0,<5.0.0\n\nArchive v1.0.7: 8 files, 22346 bytes\n\nFiles: README.md (6225b), requirements.txt (73b), setup.sh (3935b), skill-card.md (3062b), SKILL.md (5118b), stream_config.json (850b), stream_recoder2.py (50582b), _meta.json (136b)\n\nFile v1.0.7:SKILL.md\n\n---\nname: kamivision-recorder\nversion: 1.0.0\ndescription: \"RTSP/RTMP camera stream recording with AI-powered video search. Start/stop recording, check status, search clips by natural language, list recent events, view logs.\"\nuser-invocable: true\ndisable-model-invocation: false\nhomepage: https://kamiclaw-skill.kamihome.com\nmetadata: { \"openclaw\": { \"emoji\": \"📹\", \"requires\": { \"bins\": [\"python3\"], \"env\": [] }, \"hardware\": { \"required\": { \"camera\": \"RTSP-compatible camera\", \"storage\": \"30GB available space\" }, \"optional\": { \"ram\": \"8GB minimum, 16GB recommended\" } } } }\n---\n# Kamivision Video Recorder & Search\n\nRecord camera streams 24/7 and search footage by natural language description. Setup takes 2 minutes. Sign up at https://kamiclaw-skill.kamihome.com for 200 free credits.\n\n## Capabilities\n\n1. **Start recording** — launch background stream recording\n2. **Stop recording** — stop background recording\n3. **Check status** — view recording process status\n4. **Search video** — find clips by natural language (with optional time range)\n5. **List recent events** — show recent non-static video events\n6. **View logs** — display recording logs\n\n## Trigger Words\n\n| Intent          | Trigger Words                                                             |\n| --------------- | ------------------------------------------------------------------------- |\n| Start recording | start record, start recording, start camera, start monitor, launch stream |\n| Stop recording  | stop record, stop recording, stop camera, stop monitor, kill recording    |\n| Check status    | recording status, camera status, is recording, check status               |\n| Search video    | search video, find video, find clip, look for, search footage             |\n| List recent     | recent events, recent clips, list events, what happened, show recent      |\n| View logs       | show logs, view logs, recording logs, check logs                          |\n\nIf no trigger word matches, use semantic understanding to route to the closest intent.\n\n## First-Time Setup\n\nRun the setup script to create the virtual environment (Python 3.10+) and install dependencies:\n\n```bash\nbash {baseDir}/setup.sh\n```\n\n## Pre-Recording Configuration\n\nBefore EVERY recording start, confirm the Required Parameters with the user.\n\n### Flow\n\n1. Read config from `{baseDir}/stream_config.json`\n2. Display all Required Parameters with current values\n3. Ask user to confirm or update\n4. Only after confirmation → start recording\n\n### Required Parameters\n\n#### STREAM_URL\n\n- **Purpose**: RTSP/RTMP stream URL passed to `cv2.VideoCapture()`\n- **Format**: `rtsp://username:password@IP:port/path`\n- **How to get**: Check camera admin interface for RTSP URL (Hikvision: `rtsp://user:pass@ip:554/Streaming/Channels/1`, Dahua: `rtsp://user:pass@ip:554/cam/realmonitor?channel=1&subtype=0`)\n- **Error behavior**: After 100 consecutive frame failures → reconnect (up to `MAX_RECONNECT` times). All retries fail → recording stops.\n\n#### KAMI_API_KEY\n\n- **Purpose**: Auth key for Kamivision API (`X-API-Key` header). Required for video description and search.\n- **Format**: String starting with `sk_live_`\n- **How to get**: Sign up at https://kamiclaw-skill.kamihome.com → API Keys → create/copy key\n- **Error behavior**: Invalid key → API returns 401/403, retries up to `KAMI_API_RETRY` times. All fail → recording stops.\n\n### Config Update\n\nAfter user confirms: read config → update changed fields → write back → start recording.\n\n## Command Execution\n\nAll commands use `.venv/bin/python` and `stream_recoder2.py` with `--config {baseDir}/stream_config.json`.\n\n### Start Recording\n\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --start-daemon --log-file {baseDir}/stream_recorder.log\n```\n\nParse JSON output: `status: \"started\"` → show PID; `status: \"already_running\"` → show PID; error → show message.\n\n### Stop Recording\n\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --stop-daemon\n```\n\n### Check Status\n\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --status\n```\n\n### Search Video\n\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --search \"QUERY\" --json\n```\n\nWith time range (format `YYYY-MM-DD_HH:MM:SS`):\n\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --search \"QUERY\" --time-start \"START\" --time-end \"END\" --json\n```\n\nNatural language time (\"today morning\", \"yesterday afternoon\") → convert to `YYYY-MM-DD_HH:MM:SS`.\n\n### List Recent Events\n\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --list HOURS --json\n```\n\nDefault HOURS to 24 if not specified.\n\n### View Logs\n\n```bash\ntail -100 {baseDir}/stream_recorder.log\n```\n\n## Privacy\n\nFor privacy policy and data handling details, visit https://kamiclaw-skill.kamihome.com/privacy\n\n## Language\n\nRespond in the same language the user uses.\n\nFile v1.0.7:README.md\n\n# 📹 Kamivision Recorder\n\n**Intelligent camera stream recording with AI-powered natural language video search.**\n\n> **Stop scrubbing through hours of footage.** Just type what you saw — \"guy in a red jacket at the back door this morning\" — and jump straight to the clip. 24/7 recording, AI-powered search, 2-minute setup. Sign up and get 200 Credits for free! [Get started →](https://kamiclaw-skill.kamihome.com)\n\n---\n\n## What is this?\n\nTurn your camera into a searchable surveillance system. This tool records your RTSP/RTMP camera in short clips, uses AI to describe each clip, and lets you search footage with plain language.\n\n## Features\n\n- 🎥 Background recording — start/stop via chat, runs as a daemon process\n- 🔍 Natural language search — \"find the person in a red jacket\" or \"someone entered the door\"\n- ⏱ Time-range filtering — search within specific hours or days\n- 🧠 AI descriptions — each 10-second clip gets an automatic text summary\n- 🗑 Auto cleanup — old recordings are deleted after configurable retention days\n- 📊 Motion detection — optionally skip static footage to save API costs\n\n## How it works\n\n```\nCamera (RTSP)\n    │\n    ▼\n┌──────────────┐\n│  Pull Stream │  cv2.VideoCapture\n└──────┬───────┘\n       │\n       ▼\n┌──────────────┐\n│  Slice 10s   │  VideoWriter → .mp4 clips\n└──────┬───────┘\n       │\n       ▼\n┌──────────────┐     ┌─────────────────┐\n│ Static Check │────▶│ Skip (no API)   │\n│              │ yes │                 │\n└──────┬───────┘     └─────────────────┘\n       │ no\n       ▼\n┌──────────────┐\n│ Kamivision   │  POST /v1/detect\n│ AI API       │  → description + embedding\n└──────┬───────┘\n       │\n       ▼\n┌──────────────┐\n│ SQLite Index │  video_path, timestamp,\n│              │  description, embedding\n└──────┬───────┘\n       │\n       ▼\n┌──────────────┐\n│ Search/List  │  cosine similarity matching\n└──────────────┘\n```\n\n## Quick Start\n\n### 1. Install\n\nAfter installing the skill, the agent will guide you through first-time setup:\n\n- Check Python 3.8+\n- Create `.venv` virtual environment\n- Install dependencies (`numpy`, `opencv-python`, `requests`)\n\nJust follow the prompts.\n\n### 2. Configure\n\nBefore each recording, the agent will confirm these parameters with you:\n\n| Parameter            | Description                                                                                      | Default       |\n| -------------------- | ------------------------------------------------------------------------------------------------ | ------------- |\n| `STREAM_URL`         | Camera RTSP address, e.g. `rtsp://admin:pass@192.168.1.100:554/stream1`                         | — (required)  |\n| `KAMI_API_KEY`       | Kamivision API key ([get one here](https://kamiclaw-flow-ui.stg.kamicloud.net/pricing))          | — (required)  |\n| `DEVICE_ID`          | Camera label, e.g. `front-door`                                                                 | `CAM-001`     |\n| `SKIP_STATIC`        | Skip static frames to save API costs                                                             | `true`        |\n| `STATIC_THRESHOLD`   | Motion sensitivity, higher = less sensitive                                                      | `5.0`         |\n| `DATA_DIR`           | Storage directory                                                                                | `stream_data` |\n| `RETENTION_DAYS`     | Days to keep recordings, auto-deleted after expiry                                              | `3`           |\n\nNot sure what to fill in? Use the defaults and adjust later.\n\n### 3. Use\n\nJust talk to the agent in natural language:\n\n- \"Start recording\"\n- \"Stop recording\"\n- \"Search for a person carrying a box\"\n- \"What happened in the last 2 hours?\"\n- \"Show me the logs\"\n\nNo commands to remember — the agent handles everything.\n\n## Important Notes\n\n- All video clips are saved to disk regardless of motion. Static clips are saved but not searchable.\n- Timestamps use your system's local timezone automatically.\n- **Data sent to the API depends on `SUMMARY_UPLOAD_MODE`**: By default (`image` mode), only extracted frame snapshots are sent to the Kamivision API. If `SUMMARY_UPLOAD_MODE` is set to `video`, the entire video file is uploaded. Verify this setting before starting recording.\n- Disk space estimate: ~1 GB/day per camera with moderate motion.\n\n## Security & Privacy\n\n- **Credentials**: Use a dedicated camera account and API key with the least privileges possible. Never share `stream_config.json`, which contains your stream URL and API key. Rotate credentials if you uninstall or stop using the skill.\n- **Camera imagery**: Camera-derived images (or videos, if `SUMMARY_UPLOAD_MODE=video`) are sent to the external Kamivision API for AI analysis. Review the provider's privacy terms before use. Avoid pointing the skill at highly sensitive areas unless appropriate.\n- **Local data**: Descriptions and embeddings of camera clips are stored in a local SQLite database, creating a searchable record of recorded events. Store the data directory in a protected location and set an appropriate retention period.\n- **Background recording**: The skill runs as a long-lived daemon and will continue recording until explicitly stopped. Periodically check status, logs, and disk usage.\n- **Dependencies**: Third-party packages are installed from PyPI with version ranges. For sensitive deployments, consider pinning exact versions in `requirements.txt`. Always install in the isolated `.venv` as instructed.\n\n## Requirements\n\n- Python 3.8+\n- Network-accessible RTSP/RTMP camera\n- Kamivision API key\n- Sufficient disk space\n\n## License\n\n[MIT-0](https://opensource.org/license/mit-0)\n\nFile v1.0.7:_meta.json\n\n{\n  \"ownerId\": \"kn7e9156e1awf00v1sas2wkdfd85a4zh\",\n  \"slug\": \"kami-video-search\",\n  \"version\": \"1.0.7\",\n  \"publishedAt\": 1779860850847\n}\n\nFile v1.0.7:skill-card.md\n\n## Description: <br>\nRTSP/RTMP camera stream recording with AI-powered video search. Start/stop recording, check status, search clips by natural language, list recent events, view logs. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[13681882136](https://clawhub.ai/user/13681882136) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users and developers use this skill to operate RTSP/RTMP camera recording, manage the recorder process, and search captured clips with natural-language queries. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Camera-derived images, and possibly full video clips depending on SUMMARY_UPLOAD_MODE, can be sent to Kamivision for AI analysis. <br>\nMitigation: Review the provider privacy terms, verify SUMMARY_UPLOAD_MODE before recording, and avoid pointing cameras at highly sensitive areas unless appropriate. <br>\nRisk: The skill handles camera stream URLs and a Kamivision API key in stream_config.json. <br>\nMitigation: Use a dedicated low-privilege camera account and API key, protect stream_config.json, and rotate credentials if the skill is removed or no longer used. <br>\nRisk: Recording can run continuously as a background daemon and consume storage. <br>\nMitigation: Confirm start commands, check status and logs periodically, monitor disk usage, and set an appropriate RETENTION_DAYS value. <br>\nRisk: The setup script may install Python through a remote pyenv installer path when Python 3.10 is unavailable. <br>\nMitigation: Install Python dependencies manually or review setup.sh before running it in sensitive environments. <br>\nRisk: Broad natural-language requests can map to recorder actions. <br>\nMitigation: Confirm required parameters before starting recording and avoid ambiguous commands when controlling camera capture. <br>\n\n\n## Reference(s): <br>\n- [ClawHub Skill Page](https://clawhub.ai/13681882136/kami-video-search) <br>\n- [Publisher Profile](https://clawhub.ai/user/13681882136) <br>\n- [Kamivision Skill Homepage](https://kamiclaw-skill.kamihome.com) <br>\n- [Kamivision Privacy Policy](https://kamiclaw-skill.kamihome.com/privacy) <br>\n- [Kamivision API Key Signup](https://kamiclaw-flow-ui.stg.kamicloud.net/pricing) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance] <br>\n**Output Format:** [Markdown guidance with shell commands and JSON command results] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May start or stop a local daemon process, update stream_config.json, inspect logs, and return video search or recent-event results.] <br>\n\n## Skill Version(s): <br>\n1.0.7 (source: server release metadata) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.7:stream_config.json\n\n{\n  \"STREAM_URL\": \"\",\n  \"DEVICE_ID\": \"CAM-001\",\n  \"SEGMENT_DURATION\": 10,\n  \"OUTPUT_WIDTH\": 640,\n  \"OUTPUT_HEIGHT\": 360,\n  \"TIMESTAMP_SOURCE\": \"ntp\",\n  \"ENABLE_DESCRIPTION\": true,\n  \"SKIP_STATIC\": true,\n  \"STATIC_THRESHOLD\": 5.0,\n  \"KAMI_API_URL\": \"https://kamiclaw-skill-api.kamihome.com/v1/detect\",\n  \"KAMI_API_KEY\": \"\",\n  \"KAMI_API_RETRY\": 3,\n  \"SUMMARY_DETECT_TYPE\": \"SUMMARY\",\n  \"SUMMARY_DETECT_SUB_TYPE\": \"\",\n  \"SUMMARY_PROMPT\": \"\",\n  \"SUMMARY_UPLOAD_MODE\": \"image\",\n  \"SUMMARY_SAMPLE_FPS\": 1,\n  \"EMBED_DETECT_TYPE\": \"EMBED\",\n  \"EMBED_DETECT_SUB_TYPE\": \"\",\n  \"EMBEDDING_DIM\": 2048,\n  \"SIMILARITY_THRESHOLD\": 0.35,\n  \"SEARCH_TOP_K\": 5,\n  \"LIST_TOP_K\": 5,\n  \"DATA_DIR\": \"\",\n  \"RETENTION_DAYS\": 3,\n  \"INDEX_FILE\": \"index.db\",\n  \"PROCESS_WORKERS\": 5,\n  \"RECONNECT_DELAY\": 3,\n  \"MAX_RECONNECT\": 3,\n  \"skillId\": \"SK_VIDEO_SEARCH\",\n  \"LOG_FILE\": \"\"\n}\n\nFile v1.0.7:requirements.txt\n\nnumpy>=1.21.0,<2.0.0\nrequests>=2.28.0,<3.0.0\nopencv-python>=4.6.0,<5.0.0\n\nArchive v1.0.6: 6 files, 29214 bytes\n\nFiles: README.md (6225b), requirements.txt (73b), SKILL.md (29269b), stream_config.json (832b), stream_recoder2.py (49343b), _meta.json (136b)\n\nFile v1.0.6:SKILL.md\n\n---\nname: kamivision-recorder\ndescription: \"RTSP/RTMP camera stream recording with AI-powered video search. Start/stop background recording, check status, search video clips by natural language description, list recent events, and view logs. Triggers on: record, recording, camera, monitor, surveillance, stream, video search, clip search\"\nuser-invocable: true\ndisable-model-invocation: false\nhomepage: https://kamiclaw-skill.kamihome.com\nmetadata: { \"openclaw\": { \"emoji\": \"📹\", \"requires\": { \"bins\": [\"python3\"], \"env\": [] } } }\n---\n# Kamivision Video Recorder & Search\n\n**Turn your cameras into a smart memory bank.** No more scrubbing through hours of footage — just describe what you're looking for in plain language and instantly find it. Record 24/7, search by \"someone in a red jacket walked past the door this morning,\" and jump straight to the clip. Setup takes 2 minutes. Sign up now and get 200 Credits for free — start searching your footage today!\n\n## Capabilities\n\n1. **Start recording** — launch background stream recording\n2. **Stop recording** — stop background recording\n3. **Check status** — view recording process status\n4. **Search video** — find video clips by natural language description (with optional time range)\n5. **List recent events** — show recent non-static video events\n6. **View logs** — display recording logs for troubleshooting\n\n## Trigger Words (Intent Routing)\n\nMatch user intent using these trigger words first, then fall back to semantic understanding:\n\n| Intent          | Trigger Words (EN)                                                                         |\n| --------------- | ------------------------------------------------------------------------------------------ |\n| Start recording | start record, start recording, start camera, start monitor, start stream, launch recording |\n| Stop recording  | stop record, stop recording, stop camera, stop monitor, stop stream, kill recording        |\n| Check status    | recording status, camera status, monitor status, is recording, check status                |\n| Search video    | search video, find video, find clip, look for, search footage, video search                |\n| List recent     | recent events, recent clips, list events, what happened, show recent                       |\n| View logs       | show logs, view logs, recording logs, check logs                                           |\n\nIf no trigger word matches, use semantic understanding to route to the closest intent.\n\n## First-Time Setup Flow\n\n**IMPORTANT: On first use, you MUST complete the setup flow before any other operation.**\n\n**DO NOT use system Python directly. This skill requires its own isolated virtual environment (`.venv`) in the skill directory.**\n\n### Step 0: Setup Flow (Follow in Order)\n\n**Follow these steps in exact order. Do not skip ahead.**\n\n---\n\n#### Step 0.1: Check System Python (MUST be >= 3.8)\n\n**First, check if Python 3.8+ is installed on the system:**\n\n```bash\npython3 --version\n```\n\n**If Python 3.8+ is NOT found** (command fails or version is below 3.8):\n\nTell the user:\n\n> 🐍 Python 3.8 or higher is required but was not found on your system.\n>\n> **Install Python:**\n>\n> - **macOS**: `brew install python3` or download from https://www.python.org/downloads/\n> - **Ubuntu/Debian**: `apt update && apt install python3 python3-pip`\n> - **Windows**: Download from https://www.python.org/downloads/ and check \"Add to PATH\"\n>\n> After installing, run `python3 --version` again to confirm.\n\n**DO NOT proceed** until Python 3.8+ is confirmed.\n\n---\n\n#### Step 0.2: Check/Create Virtual Environment in Skill Directory\n\n**Once Python 3.8+ is confirmed, check if `.venv` exists in the skill directory:**\n\n```bash\nls -la {baseDir}/.venv/bin/python3\n```\n\n**If `.venv` does NOT exist:**\n\nTell the user:\n\n> 📦 This skill needs its own isolated Python environment. I'll guide you to create it.\n>\n> **Step 1: Create the virtual environment**\n>\n> ```bash\n> cd {baseDir}\n> python3 -m venv .venv\n> ```\n>\n> **Step 2: Verify it was created**\n>\n> ```bash\n> ls -la .venv/bin/\n> ```\n>\n> You should see: `python`, `python3`, `pip`, `pip3`, `activate`, etc.\n>\n> **Step 3: Activate and install dependencies**\n>\n> ```bash\n> source .venv/bin/activate\n> pip install -r requirements.txt\n> ```\n>\n> **Step 4: Verify installation**\n>\n> ```bash\n> .venv/bin/python -c \"import numpy; import requests; import cv2; print('All dependencies OK')\"\n> ```\n>\n> If this prints \"All dependencies OK\", setup is complete!\n\n**DO NOT proceed** until the user confirms `.venv` is created and dependencies are installed.\n\n**If `.venv` already exists:**\n\n1. Verify the Python version:\n\n```bash\n{baseDir}/.venv/bin/python3 --version\n```\n\n2. Verify dependencies are installed:\n\n```bash\n{baseDir}/.venv/bin/python -c \"import numpy; import requests; import cv2; print('All dependencies OK')\"\n```\n\n- If imports succeed, proceed to configuration.\n- If imports fail, tell the user:\n\n> ⚠️ Dependencies are missing or broken. Let's reinstall:\n>\n> ```bash\n> cd {baseDir}\n> source .venv/bin/activate\n> pip install -r requirements.txt\n> ```\n\n## Pre-Recording Configuration\n\n**⚠️ MANDATORY: Before EVERY recording start, you MUST confirm all Required Parameters with the user.**\n\n**DO NOT start recording without explicit user confirmation of these parameters.** This is a mandatory step every single time, even if the values haven't changed since the last recording.\n\n### Mandatory Confirmation Flow\n\n**⚠️ CRITICAL: Display FULL detailed explanations for EVERY parameter. Do NOT use shortened summaries.**\n\n1. **Read current config** from `{baseDir}/stream_config.json`\n2. **Display ALL Required Parameters** to the user with **COMPLETE detailed explanations** including:\n   - **Current value**\n   - **What it does**: Full explanation of the parameter's purpose and how it's used in the code\n   - **How to get it**: Step-by-step guidance on obtaining or choosing the right value\n   - **Format**: Expected format with examples\n   - **Range**: Valid values and constraints\n   - **Default**: If applicable\n   - **Impact of different values**: Detailed breakdown of how different values affect behavior, costs, storage, API usage, etc. Include scenarios and recommendations.\n   - **Error behavior**: What happens if configured incorrectly\n3. **Ask for explicit confirmation**:\n   - \"Please confirm if the above configuration is correct. See the detailed explanations above for each parameter. Let me know if you need to modify any parameters.\"\n4. **Wait for user response**:\n   - If user says \"yes\" → proceed to start recording\n   - If user provides new values → update config, then confirm again\n5. **Only after confirmation** → execute the start recording command\n\n**When displaying parameters, use this format for each:**\n\n**Language Rule:** Match the user's language. Use English labels and explanations.\n\n**Parameter display format:**\n\n```\n📹 STREAM_URL = <current_value>\n   What it does: <full explanation>\n   How to get it: <step-by-step guidance>\n   Format: <format with examples>\n   Range: <valid values>\n   Default: <default value if applicable>\n   Impact of different values: <detailed breakdown with scenarios>\n   Error behavior: <consequences>\n```\n\n**IMPORTANT:** Use the complete parameter explanations from the \"Required Parameters\" section below. Do NOT summarize or shorten them. The user needs full context to make informed decisions.\n\n### Required Parameters (MUST confirm every time with full explanations)\n\n**Language Rule:** Display parameter explanations in the same language the user uses. Use English labels (What it does, Format, Range, Default, Error behavior) and English explanations.\n\n---\n\n### English Version (for English-speaking users)\n\n1. **STREAM_URL** (Camera stream address)\n\n   - What it does: The RTSP/RTMP stream URL of your camera. The code passes this directly to `cv2.VideoCapture(STREAM_URL)` to open the video stream. It supports RTSP, RTMP, and HTTP protocols.\n   - How to get it:\n     - Check your camera's admin web interface (usually at `http://camera-ip/`)\n     - Look for \"RTSP URL\" or \"Stream URL\" in camera settings\n     - Common formats: Hikvision `rtsp://user:pass@ip:554/Streaming/Channels/1`, Dahua `rtsp://user:pass@ip:554/cam/realmonitor?channel=1&subtype=0`\n     - Contact your camera manufacturer's support if unsure\n   - Format: `rtsp://username:password@IP:port/path` (e.g., `rtsp://admin:password@192.168.1.100:554/stream1`)\n   - Range: Any valid stream URL. Validate: MUST start with `rtsp://`. Reject any other format and ask user to correct it.\n   - Impact of different values:\n     - Correct URL with valid credentials → Smooth recording, stable frames\n     - Wrong IP/port → Connection timeout, recording fails after reconnection attempts\n     - Wrong credentials → Authentication failure, no video stream\n     - Unreachable camera (offline/network issue) → Same as wrong URL, recording stops\n   - Error behavior: If the URL is wrong or unreachable, `cv2.VideoCapture` will fail to open. After 100 consecutive frame read failures, the code treats it as a stream disconnection and attempts reconnection (up to `MAX_RECONNECT` times, default 3). If all reconnections fail, recording stops entirely.\n2. **KAMI_API_KEY** (Kamivision API key)\n\n   - What it does: Authentication key sent in the `X-API-Key` HTTP header when calling the Kamivision `https://kamiclaw-skill-api.kamihome.com/v1/detect` API for video description generation and text embedding. Without it, all API calls will return authentication errors, and no descriptions or embeddings will be generated — video search will not work.\n   - How to get it:\n     - Visit https://kamiclaw-skill.kamihome.com, first registration offers 200 Credits of free credit limit.\n     - Sign up / log in to your Kamivision account\n     - Navigate to API Keys section\n     - Create a new key or copy existing one (starts with `sk_live_`)\n     - Keep this key secret — do not share publicly\n   - Format: String starting with `sk_live_` (e.g., `sk_live_xxxxxxxxxxxxxxxx`)\n   - Impact of different values:\n     - Valid key → API calls succeed, video descriptions generated, search works\n     - Invalid/expired key → API returns 401/403, no descriptions generated, recording continues but search won't work\n     - Empty key → Same as invalid, all API calls fail immediately\n     - Rate limit exceeded → API returns 429, code retries per `KAMI_API_RETRY`, may lose some descriptions\n   - Error behavior: If empty or invalid, the API returns a non-200 code. The code retries up to `KAMI_API_RETRY` times (default 3). After all retries fail, a `RuntimeError` is raised, the worker thread sends `SIGTERM` to the process, and recording stops.\n3. **DEVICE_ID** (Camera identifier)\n\n   - What it does: A label for this camera. Used in three places: (1) video file naming pattern `{DEVICE_ID}_{date}_{time}_{index}.mp4`, (2) storage directory structure `{DATA_DIR}/{DEVICE_ID}/{date}/{hour}/`, (3) the `device_id` field in the SQLite index database.\n   - How to get it:\n     - Choose a meaningful name for this camera location (e.g., `front-door`, `living-room`, `warehouse-1`)\n     - If you have multiple cameras, use unique IDs for each (e.g., `CAM-001`, `CAM-002`)\n     - Use existing camera name from your NVR/DVR system for consistency\n   - Default: `CAM-001`\n   - Range: Any string that is valid as a file/directory name. Avoid special characters like `/`, `\\`, `:`, `*`, `?`, `\"`, `<`, `>`, `|`.\n   - Impact of different values:\n     - Descriptive name (e.g., `front-door`) → Easy to identify videos, organized file structure\n     - Generic name (e.g., `CAM-001`) → Works fine, but less identifiable when managing multiple cameras\n     - Changing DEVICE_ID later → Creates new subdirectory; old videos remain under old DEVICE_ID folder (manual migration needed if you want to consolidate)\n     - Special characters in name → File/directory creation fails, recording cannot start\n   - Error behavior: If it contains invalid filesystem characters, `mkdir` or file creation will fail with an `OSError`, and recording cannot start.\n4. **SKIP_STATIC** (Skip static frames)\n\n   - What it does: Controls whether the AI description API is called for static (no-motion) video segments. **Regardless of this setting, all video segments are always saved to disk.** When `true`, each segment is analyzed by `is_static_video()` — it samples frame pairs, converts to grayscale, and computes mean absolute pixel difference. If below `STATIC_THRESHOLD`, the segment is marked `is_static=True` in the database, and the API call is skipped (no description or embedding generated). This means static segments are still recorded on disk but are **invisible to search and list queries** — they have no description or embedding, so `search` cannot match them and `list_recent` explicitly filters them out (`not rec.get(\"is_static\", False)`).\n   - Default: `true` (recommended)\n   - Range: `true` or `false` (boolean)\n   - Impact of different values:\n     - `true` (recommended for most cases):\n       - ✅ Saves API costs — only sends clips with actual motion to Kamivision\n       - ✅ Faster search — fewer indexed entries, queries are quicker\n       - ⚠️ Video files are still saved to disk — no disk space savings on video storage\n       - ⚠️ Static segments are unsearchable — they exist on disk but cannot be found via search or list commands\n       - ⚠️ May miss subtle events — very slight movements might be classified as static and become unsearchable\n       - Best for: 24/7 recording, low-traffic areas, cost-conscious setups\n     - `false` (describe everything):\n       - ✅ Every segment gets a description and embedding — all clips are searchable\n       - ✅ Complete searchable timeline — no gaps in search results\n       - ❌ Higher API costs — every segment calls Kamivision API (including boring static footage)\n       - ❌ Larger database — more index entries, slightly slower search\n       - ⚠️ Disk usage is the same — video files are saved regardless\n       - Best for: High-security areas, short-term recording, unlimited API budget\n   - Error behavior: If set to a non-boolean value, Python's truthy evaluation applies — any non-empty string or non-zero number is treated as `true`. Setting to `false` means every segment will be sent to the API, which increases API usage and database size (but not video disk usage).\n5. **STATIC_THRESHOLD** (Motion sensitivity)\n\n   - What it does: The threshold used by `is_static_video()` to decide if a video segment is \"static\". The function computes `np.mean(np.abs(frame1 - frame2))` for sampled grayscale frame pairs (pixel values 0–255). If the average of all pair differences is below this threshold, the segment is considered static.\n   - Default: `5.0`\n   - Range: `0.0` – `255.0` (theoretical). Practical range: `1.0` – `20.0`.\n   - Only effective when: `SKIP_STATIC` is `true`\n   - Impact of different values:\n     - **Very low (0.0 – 1.0)**:\n       - Almost nothing is skipped — even completely still scenes pass through\n       - API calls: Maximum (nearly 100% of segments sent)\n       - Use case: Maximum sensitivity, don't miss anything (e.g., monitoring delicate equipment)\n       - Downside: High API costs, defeats the purpose of SKIP_STATIC\n     - **Low (1.0 – 5.0)**:\n       - Catches subtle changes — lighting shifts, leaves swaying, small animals\n       - API calls: High (70-90% of segments sent)\n       - Use case: Outdoor scenes with wind, areas with frequent minor movements\n       - Downside: May still send many \"unimportant\" clips\n     - **Medium (5.0 – 15.0) — RECOMMENDED**:\n       - Normal motion detection — people walking, vehicles passing, doors opening\n       - API calls: Moderate (20-50% of segments sent, depends on location)\n       - Use case: Indoor rooms, entrances, hallways, parking lots\n       - Best balance: Catches meaningful events while skipping empty periods\n     - **High (15.0 – 50.0)**:\n       - Only significant motion — multiple people, fast vehicles, major activity\n       - API calls: Low (5-20% of segments sent)\n       - Use case: Very busy areas where you only care about major events\n       - Downside: May miss single-person entries or slow movements\n     - **Very high (> 50.0)**:\n       - Only extreme motion — crowds, chaos, rapid movement\n       - API calls: Minimal (< 5% of segments sent)\n       - Use case: Almost never recommended — you'll miss most events\n       - Downside: Essentially records only when there's intense activity\n   - Tuning tips:\n     - Start with `5.0`, monitor for a day, check what got skipped\n     - If too many false positives (static clips sent): increase by 2-3\n     - If missing important events: decrease by 2-3\n     - Different locations need different values — test and adjust\n   - Error behavior: No validation in code. A negative value means nothing is ever static (all segments processed). An extremely high value (e.g., 200) means almost everything is skipped. Non-numeric values will cause a `TypeError` crash in `np.mean()` comparison.\n6. **DATA_DIR** (Storage directory)\n\n   - What it does: Root directory for all recorded data. The code creates a hierarchical structure: `{DATA_DIR}/{DEVICE_ID}/{YYYYMMDD}/{HH}/` for video files, and `{DATA_DIR}/{DEVICE_ID}/index.db` for the SQLite index. Directories are created automatically via `Path.mkdir(parents=True, exist_ok=True)`.\n   - How to get it:\n     - Choose a directory with sufficient disk space\n     - For Linux/Mac: `/home/youruser/video_data` or `/mnt/storage/videos`\n     - For Windows: `D:\\video_data` or `C:\\Users\\YourName\\video_data`\n     - Use external drive or NAS for long-term storage\n     - Ensure the user running the recorder has write permissions\n   - Default: `./video_data` (relative to working directory)\n   - Range: Any valid filesystem path (absolute or relative). Ensure the path is writable and has sufficient disk space. Each 10-second clip at 640×360 is roughly 200KB–1MB.\n   - Impact of different values:\n     - **Local disk (fast SSD)**:\n       - ✅ Fast write speeds, reliable recording\n       - ✅ Quick search and playback\n       - ⚠️ Limited capacity (check free space: `df -h`)\n       - Estimate: 1 hour ≈ 72-360 clips ≈ 15-360 MB (depends on motion)\n     - **External HDD / NAS**:\n       - ✅ Large capacity for long-term storage\n       - ⚠️ Slower write speeds — ensure stable network for NAS\n       - ⚠️ Network issues can interrupt recording\n       - Best for: Archive storage, multi-camera setups\n     - **Small partition (< 10 GB free)**:\n       - ⚠️ Will fill up quickly — monitor disk space\n       - With `RETENTION_DAYS=3`: Should auto-clean, but verify regularly\n       - Risk: If disk fills, recording produces corrupted files\n     - **Changing DATA_DIR later**:\n       - Old videos stay in old directory (manual migration needed)\n       - New recordings go to new directory\n       - Index database is per DEVICE_ID, so search only sees new videos\n   - Disk space estimation:\n     - Per 10-second clip: ~200KB (static) to ~1MB (high motion)\n     - Per hour: ~72 clips × average size\n     - Example: 50% motion, 500KB avg → 72 × 500KB ≈ 36 MB/hour\n     - Per day: ~864 MB (continuous recording, moderate motion)\n     - With SKIP_STATIC=true: Can reduce by 50-80% in low-traffic areas\n   - Error behavior: If the path is not writable (permission denied), `Path.mkdir()` or `cv2.VideoWriter()` raises `OSError`/`PermissionError` and recording fails. If disk space runs out, `cv2.VideoWriter.write()` silently produces corrupted files (0 bytes), which are then skipped by the processing queue.\n7. **RETENTION_DAYS** (Data retention period)\n\n   - What it does: Controls automatic cleanup of old recordings. A background thread runs `index.purge_expired(RETENTION_DAYS)` every hour. It queries the SQLite database for records where `created_at < (now - RETENTION_DAYS)`, deletes the corresponding video files from disk, removes the database records, and cleans up empty directories. After purging, it runs `VACUUM` to reclaim database file space.\n   - Default: `3` (days)\n   - Range: Integer `>= 0`. Set to `0` to disable auto-cleanup (keep forever). No upper limit, but very large values effectively disable cleanup.\n   - Impact of different values:\n     - **0 (disable cleanup)**:\n       - ✅ Keep everything forever — complete archive\n       - ❌ Disk space grows indefinitely — will eventually fill up\n       - ❌ Database grows larger — search may slow down over time\n       - Use case: Short-term testing, external backup system handles cleanup\n       - ⚠️ WARNING: Monitor disk space manually!\n     - **1-2 days**:\n       - ✅ Minimal disk usage — aggressive cleanup\n       - ❌ May lose important footage if you don't check daily\n       - ❌ Not enough time to review and export important clips\n       - Use case: High-motion areas, limited disk space, daily review habit\n     - **3-7 days — RECOMMENDED**:\n       - ✅ Balanced approach — enough time to review and export\n       - ✅ Reasonable disk usage for most setups\n       - ✅ Weekly review cycle works well\n       - Use case: Most home/office security setups\n       - Estimate: 7 days × ~1 GB/day ≈ 7 GB per camera (moderate motion, SKIP_STATIC=true)\n     - **8-30 days**:\n       - ✅ Extended review window — don't miss old events\n       - ❌ Higher disk usage — ensure adequate capacity\n       - ❌ Larger database — slightly slower search\n       - Use case: Compliance requirements, incident investigation, low-motion areas\n     - **> 30 days**:\n       - ✅ Long-term archive on local disk\n       - ❌ Significant disk space required\n       - ❌ Consider external storage or cloud backup instead\n       - Use case: Legal/compliance requirements, very low motion areas\n   - Disk space planning examples (per camera, SKIP_STATIC=true, moderate motion):\n     - RETENTION_DAYS=3: ~3 GB\n     - RETENTION_DAYS=7: ~7 GB\n     - RETENTION_DAYS=14: ~14 GB\n     - RETENTION_DAYS=30: ~30 GB\n     - Multiply by number of cameras for total estimate\n   - Manual override: You can manually delete old videos anytime by removing files from `{DATA_DIR}/{DEVICE_ID}/` — the database will auto-cleanup orphaned entries on next scan\n   - Error behavior: Negative values behave the same as `0` (no cleanup) because the cutoff time would be in the future. Non-integer values are used directly in `timedelta(days=...)` — floats work (e.g., `0.5` = 12 hours), but strings cause a `TypeError` crash.\n8. **SUMMARY_UPLOAD_MODE** (API upload mode)\n\n   - What it does: Controls what data is sent to the Kamivision API for AI analysis. In `image` mode (default), only extracted frame snapshots are uploaded. In `video` mode, the entire video file is base64-encoded and uploaded. This directly affects privacy — `video` mode sends complete footage to the external API.\n   - Default: `image`\n   - Range: `\"image\"` or `\"video\"` (string)\n   - Impact of different values:\n     - `image` (recommended):\n       - ✅ Only frame snapshots leave your machine — minimal data exposure\n       - ✅ Smaller upload payload — faster API calls, lower bandwidth\n       - ⚠️ May produce less detailed descriptions than video mode\n     - `video`:\n       - ✅ More detailed AI descriptions — full video context available\n       - ❌ Entire video file is sent to the Kamivision API — significant privacy implications\n       - ❌ Larger upload payload — slower API calls, higher bandwidth usage\n       - ⚠️ Only use if you understand and accept that full footage leaves your machine\n   - Error behavior: If set to any value other than `\"video\"`, the code falls back to `image` mode. No crash risk.\n\n---\n\n### Configuration Update\n\n**IMPORTANT: Only update config and start recording AFTER explicit user confirmation.**\n\nAfter the user confirms the parameters (or provides updated values):\n\n1. Read the current config from `{baseDir}/stream_config.json`\n2. Update only the confirmed/changed fields\n3. Write the updated config back\n4. **Then** proceed to execute the start recording command\n\n**Never skip the confirmation step or assume previous values are still valid.**\n\n## Command Execution\n\n**All commands MUST use the virtual environment Python interpreter at `{baseDir}/.venv/bin/python`.**\n\nAll commands use the script at `{baseDir}/stream_recoder2.py` with config at `{baseDir}/stream_config.json`.\n\n### Start Recording\n\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --start-daemon --log-file {baseDir}/stream_recorder.log\n```\n\nAfter running, parse the JSON output:\n\n- If `status` is `\"started\"`: Tell user recording has started, show the PID\n- If `status` is `\"already_running\"`: Tell user recording is already running, show the PID\n- On error: Show the error message and ask user to check their STREAM_URL and network\n\n### Stop Recording\n\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --stop-daemon\n```\n\nParse the JSON output:\n\n- If `status` is `\"stopped\"`: Confirm recording has stopped\n- If `status` is `\"not_running\"`: Tell user there's no active recording to stop\n\n### Check Status\n\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --status\n```\n\nParse the JSON output and report the status to the user in a friendly way.\n\n### Search Video\n\nThe user may provide a search query in natural language, optionally with a time range.\n\n**Time range parsing:**\n\n- Natural language: \"today morning\", \"yesterday afternoon\", \"this morning 8 to 12\" → convert to `YYYY-MM-DD_HH:MM:SS` format\n- Fixed format: accept `YYYY-MM-DD_HH:MM:SS` or `YYYY-MM-DD HH:MM:SS` directly\n- If no time range specified, search all recorded footage\n\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --search \"QUERY_TEXT\" --json\n```\n\nWith time range:\n\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --search \"QUERY_TEXT\" --time-start \"YYYY-MM-DD_HH:MM:SS\" --time-end \"YYYY-MM-DD_HH:MM:SS\" --json\n```\n\nParse the JSON output and present results to the user:\n\n- Show the number of matches\n- For each result: time, description, score, and **full video file path**\n- If no results: tell the user no matching clips were found, suggest broadening the query or time range\n\n### List Recent Events\n\n```bash\n{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --list HOURS --json\n```\n\nDefault HOURS to 24 if user doesn't specify. Parse and present results showing time, description, and video path.\n\n### View Logs\n\n```bash\ntail -100 {baseDir}/stream_recorder.log\n```\n\nShow the last 100 lines of the log file. If the user asks for more, increase the line count. If the log file doesn't exist, tell the user recording hasn't been started yet.\n\n## Error Handling\n\n- **STREAM_URL connection failure**: Tell the user to check the camera address, network connectivity, and credentials. Do NOT retry automatically.\n- **Invalid API Key**: Tell the user \"Your Kamivision API key appears to be invalid. Please check it at https://kamiclaw-skill.kamihome.com\". Do NOT retry.\n- **Python not found**: Guide installation per Step 0 above.\n- **Virtual environment missing**: Create `.venv` per Step 0, then install dependencies.\n- **Dependency missing**: Re-run `{baseDir}/.venv/bin/pip install -r {baseDir}/requirements.txt`.\n- **Permission denied**: Suggest running with appropriate permissions or changing DATA_DIR to a writable location.\n\n## Security & Privacy\n\n- **Credentials**: The `stream_config.json` file contains the camera stream URL (which may include credentials) and the Kamivision API key. Use a dedicated camera account and API key with the least privileges. Never share this file. Rotate credentials if you uninstall or stop using the skill.\n- **Data sent to API**: By default (`SUMMARY_UPLOAD_MODE=image`), only extracted frame snapshots are sent to the Kamivision API. If `SUMMARY_UPLOAD_MODE=video`, the entire video file is uploaded. Always verify this setting before starting recording.\n- **Local data**: The SQLite index database stores descriptions and embeddings of camera clips, creating a searchable record of recorded events. Store the data directory in a protected location.\n- **Background recording**: The daemon continues recording until explicitly stopped. Periodically check status, logs, and disk usage.\n- **Dependencies**: Third-party packages are installed from PyPI with version ranges. For sensitive deployments, consider pinning exact versions. Always install in the isolated `.venv`.\n\n## Language\n\nRespond in the same language the user uses. If the user writes in Chinese, respond in Chinese. If in English, respond in English.\n\n**For parameter explanations during recording setup:**\n\n- Use English labels (What it does, Format, Range, Default, Error behavior) and English explanations.\n- **Do not mix languages** — if the user asks in English, show all explanations in English; if in Chinese, show all in Chinese.\n\nFile v1.0.6:README.md\n\n# 📹 Kamivision Recorder\n\n**Intelligent camera stream recording with AI-powered natural language video search.**\n\n> **Stop scrubbing through hours of footage.** Just type what you saw — \"guy in a red jacket at the back door this morning\" — and jump straight to the clip. 24/7 recording, AI-powered search, 2-minute setup. Sign up and get 200 Credits for free! [Get started →](https://kamiclaw-skill.kamihome.com)\n\n---\n\n## What is this?\n\nTurn your camera into a searchable surveillance system. This tool records your RTSP/RTMP camera in short clips, uses AI to describe each clip, and lets you search footage with plain language.\n\n## Features\n\n- 🎥 Background recording — start/stop via chat, runs as a daemon process\n- 🔍 Natural language search — \"find the person in a red jacket\" or \"someone entered the door\"\n- ⏱ Time-range filtering — search within specific hours or days\n- 🧠 AI descriptions — each 10-second clip gets an automatic text summary\n- 🗑 Auto cleanup — old recordings are deleted after configurable retention days\n- 📊 Motion detection — optionally skip static footage to save API costs\n\n## How it works\n\n```\nCamera (RTSP)\n    │\n    ▼\n┌──────────────┐\n│  Pull Stream │  cv2.VideoCapture\n└──────┬───────┘\n       │\n       ▼\n┌──────────────┐\n│  Slice 10s   │  VideoWriter → .mp4 clips\n└──────┬───────┘\n       │\n       ▼\n┌──────────────┐     ┌─────────────────┐\n│ Static Check │────▶│ Skip (no API)   │\n│              │ yes │                 │\n└──────┬───────┘     └─────────────────┘\n       │ no\n       ▼\n┌──────────────┐\n│ Kamivision   │  POST /v1/detect\n│ AI API       │  → description + embedding\n└──────┬───────┘\n       │\n       ▼\n┌──────────────┐\n│ SQLite Index │  video_path, timestamp,\n│              │  description, embedding\n└──────┬───────┘\n       │\n       ▼\n┌──────────────┐\n│ Search/List  │  cosine similarity matching\n└──────────────┘\n```\n\n## Quick Start\n\n### 1. Install\n\nAfter installing the skill, the agent will guide you through first-time setup:\n\n- Check Python 3.8+\n- Create `.venv` virtual environment\n- Install dependencies (`numpy`, `opencv-python`, `requests`)\n\nJust follow the prompts.\n\n### 2. Configure\n\nBefore each recording, the agent will confirm these parameters with you:\n\n| Parameter            | Description                                                                                      | Default       |\n| -------------------- | ------------------------------------------------------------------------------------------------ | ------------- |\n| `STREAM_URL`         | Camera RTSP address, e.g. `rtsp://admin:pass@192.168.1.100:554/stream1`                         | — (required)  |\n| `KAMI_API_KEY`       | Kamivision API key ([get one here](https://kamiclaw-flow-ui.stg.kamicloud.net/pricing))          | — (required)  |\n| `DEVICE_ID`          | Camera label, e.g. `front-door`                                                                 | `CAM-001`     |\n| `SKIP_STATIC`        | Skip static frames to save API costs                                                             | `true`        |\n| `STATIC_THRESHOLD`   | Motion sensitivity, higher = less sensitive                                                      | `5.0`         |\n| `DATA_DIR`           | Storage directory                                                                                | `stream_data` |\n| `RETENTION_DAYS`     | Days to keep recordings, auto-deleted after expiry                                              | `3`           |\n\nNot sure what to fill in? Use the defaults and adjust later.\n\n### 3. Use\n\nJust talk to the agent in natural language:\n\n- \"Start recording\"\n- \"Stop recording\"\n- \"Search for a person carrying a box\"\n- \"What happened in the last 2 hours?\"\n- \"Show me the logs\"\n\nNo commands to remember — the agent handles everything.\n\n## Important Notes\n\n- All video clips are saved to disk regardless of motion. Static clips are saved but not searchable.\n- Timestamps use your system's local timezone automatically.\n- **Data sent to the API depends on `SUMMARY_UPLOAD_MODE`**: By default (`image` mode), only extracted frame snapshots are sent to the Kamivision API. If `SUMMARY_UPLOAD_MODE` is set to `video`, the entire video file is uploaded. Verify this setting before starting recording.\n- Disk space estimate: ~1 GB/day per camera with moderate motion.\n\n## Security & Privacy\n\n- **Credentials**: Use a dedicated camera account and API key with the least privileges possible. Never share `stream_config.json`, which contains your stream URL and API key. Rotate credentials if you uninstall or stop using the skill.\n- **Camera imagery**: Camera-derived images (or videos, if `SUMMARY_UPLOAD_MODE=video`) are sent to the external Kamivision API for AI analysis. Review the provider's privacy terms before use. Avoid pointing the skill at highly sensitive areas unless appropriate.\n- **Local data**: Descriptions and embeddings of camera clips are stored in a local SQLite database, creating a searchable record of recorded events. Store the data directory in a protected location and set an appropriate retention period.\n- **Background recording**: The skill runs as a long-lived daemon and will continue recording until explicitly stopped. Periodically check status, logs, and disk usage.\n- **Dependencies**: Third-party packages are installed from PyPI with version ranges. For sensitive deployments, consider pinning exact versions in `requirements.txt`. Always install in the isolated `.venv` as instructed.\n\n## Requirements\n\n- Python 3.8+\n- Network-accessible RTSP/RTMP camera\n- Kamivision API key\n- Sufficient disk space\n\n## License\n\n[MIT-0](https://opensource.org/license/mit-0)\n\nFile v1.0.6:_meta.json\n\n{\n  \"ownerId\": \"kn7e9156e1awf00v1sas2wkdfd85a4zh\",\n  \"slug\": \"kami-video-search\",\n  \"version\": \"1.0.6\",\n  \"publishedAt\": 1778659564079\n}\n\nFile v1.0.6:stream_config.json\n\n{\n  \"STREAM_URL\": \"\",\n  \"DEVICE_ID\": \"CAM-001\",\n  \"SEGMENT_DURATION\": 10,\n  \"OUTPUT_WIDTH\": 640,\n  \"OUTPUT_HEIGHT\": 360,\n  \"TIMESTAMP_SOURCE\": \"ntp\",\n  \"ENABLE_DESCRIPTION\": true,\n  \"SKIP_STATIC\": true,\n  \"STATIC_THRESHOLD\": 5.0,\n  \"KAMI_API_URL\": \"https://kamiclaw-skill-api.kamihome.com/v1/detect\",\n  \"KAMI_API_KEY\": \"\",\n  \"KAMI_API_RETRY\": 3,\n  \"SUMMARY_DETECT_TYPE\": \"SUMMARY\",\n  \"SUMMARY_DETECT_SUB_TYPE\": \"\",\n  \"SUMMARY_PROMPT\": \"\",\n  \"SUMMARY_UPLOAD_MODE\": \"image\",\n  \"SUMMARY_SAMPLE_FPS\": 1,\n  \"EMBED_DETECT_TYPE\": \"EMBED\",\n  \"EMBED_DETECT_SUB_TYPE\": \"\",\n  \"EMBEDDING_DIM\": 2048,\n  \"SIMILARITY_THRESHOLD\": 0.35,\n  \"SEARCH_TOP_K\": 5,\n  \"LIST_TOP_K\": 5,\n  \"DATA_DIR\": \"\",\n  \"RETENTION_DAYS\": 3,\n  \"INDEX_FILE\": \"index.db\",\n  \"PROCESS_WORKERS\": 5,\n  \"RECONNECT_DELAY\": 3,\n  \"MAX_RECONNECT\": 3,\n  \"skillId\": \"SK_VIDEO_SEARCH\"\n}\n\nFile v1.0.6:requirements.txt\n\nnumpy>=1.20.0,<2.0.0\nrequests>=2.25.0,<3.0.0\nopencv-python>=4.5.0,<5.0.0\n\nArchive v1.0.5: 6 files, 27828 bytes\n\nFiles: README.md (4894b), requirements.txt (73b), SKILL.md (26991b), stream_config.json (832b), stream_recoder2.py (49343b), _meta.json (136b)\n\nFile v1.0.5:SKILL.md\n\n---\nname: kamivision-recorder\ndescription: \"RTSP/RTMP camera stream recording with AI-powered video search. Start/stop background recording, check status, search video clips by natural language description, list recent events, and view logs. Triggers on: record, recording, camera, monitor, surveillance, stream, video search, clip search\"\nuser-invocable: true\ndisable-model-invocation: false\nhomepage: https://kamiclaw-skill.kamihome.com\nmetadata: { \"openclaw\": { \"emoji\": \"📹\", \"requires\": { \"bins\": [\"python3\"], \"env\": [] } } }\n---\n# Kamivision Video Recorder & Search\n\n**Turn your cameras into a smart memory bank.** No more scrubbing through hours of footage — just describe what you're looking for in plain language and instantly find it. Record 24/7, search by \"someone in a red jacket walked past the door this morning,\" and jump straight to the clip. Setup takes 2 minutes. Sign up now and get 200 Credits for free — start searching your footage today!\n\n## Capabilities\n\n1. **Start recording** — launch background stream recording\n2. **Stop recording** — stop background recording\n3. **Check status** — view recording process status\n4. **Search video** — find video clips by natural language description (with optional time range)\n5. **List recent events** — show recent non-static video events\n6. **View logs** — display recording logs for troubleshooting\n\n## Trigger Words (Intent Routing)\n\nMatch user intent using these trigger words first, then fall back to semantic understanding:\n\n| Intent          | Trigger Words (EN)                                                                         |\n| --------------- | ------------------------------------------------------------------------------------------ |\n| Start recording | start record, start recording, start camera, start monitor, start stream, launch recording |\n| Stop recording  | stop record, stop recording, stop camera, stop monitor, stop stream, kill recording        |\n| Check status    | recording status, camera status, monitor status, is recording, check status                |\n| Search video    | search video, find video, find clip, look for, search footage, video search                |\n| List recent     | recent events, recent clips, list events, what happened, show recent                       |\n| View logs       | show logs, view logs, recording logs, check logs                                           |\n\nIf no trigger word matches, use semantic understanding to route to the closest intent.\n\n## First-Time Setup Flow\n\n**IMPORTANT: On first use, you MUST complete the setup flow before any other operation.**\n\n**DO NOT use system Python directly. This skill requires its own isolated virtual environment (`.venv`) in the skill directory.**\n\n### Step 0: Setup Flow (Follow in Order)\n\n**Follow these steps in exact order. Do not skip ahead.**\n\n---\n\n#### Step 0.1: Check System Python (MUST be >= 3.8)\n\n**First, check if Python 3.8+ is installed on the system:**\n\n```bash\npython3 --version\n```\n\n**If Python 3.8+ is NOT found** (command fails or version is below 3.8):\n\nTell the user:\n\n> 🐍 Python 3.8 or higher is required but was not found on your system.\n>\n> **Install Python:**\n>\n> - **macOS**: `brew install python3` or download from https://www.python.org/downloads/\n> - **Ubuntu/Debian**: `apt update && apt install python3 python3-pip`\n> - **Windows**: Download from https://www.python.org/downloads/ and check \"Add to PATH\"\n>\n> After installing, run `python3 --version` again to confirm.\n\n**DO NOT proceed** until Python 3.8+ is confirmed.\n\n---\n\n#### S\n\nArchive v1.0.4: 6 files, 27898 bytes\n\nFiles: README.md (4894b), requirements.txt (73b), SKILL.md (27210b), stream_config.json (832b), stream_recoder2.py (49343b), _meta.json (136b)\n\nArchive v1.0.3: 6 files, 35867 bytes\n\nFiles: README.md (6532b), requirements.txt (73b), SKILL.md (43223b), stream_config.json (832b), stream_recoder2.py (49343b), _meta.json (136b)","readmeExcerpt":"Skill: Kami Video Search Owner: 13681882136 Summary: RTSP/RTMP multi-camera stream recording with AI-powered video search. Start/stop recording, check status, search clips by natural language, list recent event... Tags: latest:1.1.2 Version history: v1.1.2 | 2026-06-10T06:31:04.546Z | auto - Corrected the skill name from \"kamivision-recorder\" in metadata. - Updated RTSP brand table instructions, now explicitly statin","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"bash {baseDir}/setup.sh"},{"language":"json","snippet":"{\n  \"KAMI_API_KEY\": \"sk_live_xxx\",\n  \"KAMI_API_URL\": \"https://kamiclaw-skill-api.kamihome.com/v1/detect\",\n  \"RETENTION_DAYS\": 3,\n  \"cameras\": [\n    {\n      \"DEVICE_ID\": \"front-door\",\n      \"STREAM_URL\": \"rtsp://admin:pass@192.168.1.100:554/stream1\"\n    },\n    {\n      \"DEVICE_ID\": \"living-room\",\n      \"STREAM_URL\": \"rtsp://admin:pass@192.168.1.101:554/stream1\"\n    }\n  ]\n}"},{"language":"json","snippet":"{\n  \"DEVICE_ID\": \"garage\",\n  \"STREAM_URL\": \"rtsp://admin:pass@192.168.1.102:554/stream1\",\n  \"OUTPUT_WIDTH\": 1280,\n  \"OUTPUT_HEIGHT\": 720\n}"},{"language":"bash","snippet":"{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --start-daemon --log-file {baseDir}/stream_recorder.log"},{"language":"bash","snippet":"{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --start-daemon --log-file {baseDir}/stream_recorder.log --device front-door"},{"language":"bash","snippet":"{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --start-daemon --log-file {baseDir}/stream_recorder.log --device front-door,living-room"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: kamivision-recorder\nversion: 2.0.0\ndescription: \"RTSP/RTMP multi-camera stream recording with AI-powered video search. Start/stop recording, check status, search clips by natural language, list recent events, view logs. Supports multiple cameras simultaneously.\"\nuser-invocable: true\ndisable-model-invocation: false\nhomepage: https://kamiclaw-skill.kamihome.com\nmetadata: { \"openclaw\": { \"emoji\": \"📹\", \"requires\": { \"bins\": [\"python3\"], \"env\": [] }, \"hardware\": { \"required\": { \"camera\": \"RTSP-compatible camera\", \"storage\": \"30GB available space\" }, \"optional\": { \"ram\": \"8GB minimum, 16GB recommended\" } } } }\n---\n# Kamivision Video Recorder & Search\n\nRecord camera streams 24/7 and search footage by natural language description. Supports multiple cameras simultaneously. Setup takes 2 minutes. Sign up at https://kamiclaw-skill.kamihome.com for 200 free credits.\n\n## Capabilities\n\n1. **Start recording** — launch background stream recording (one or more cameras)\n2. **Stop recording** — stop background recording (one or more cameras)\n3. **Check status** — view recording process status (one or more cameras)\n4. **Search video** — find clips by natural language (with optional time range, across cameras)\n5. **List recent events** — show recent non-static video events (across cameras)\n6. **View logs** — display recording logs\n\n## Trigger Words\n\n| Intent          | Trigger Words                                                             |\n| --------------- | ------------------------------------------------------------------------- |\n| Start recording | start record, start recording, start camera, start monitor, launch stream |\n| Stop recording  | stop record, stop recording, stop camera, stop monitor, kill recording    |\n| Check status    | recording status, camera status, is recording, check status               |\n| Search video    | search video, find video, find clip, look for, search footage             |\n| List recent     | recent events, recent clips, list events, what happened, show recent      |\n| View logs       | show logs, view logs, recording logs, check logs                          |\n\nIf no trigger word matches, use semantic understanding to route to the closest intent.\n\n## First-Time Setup\n\nRun the setup script to create the virtual environment (Python 3.10+) and install dependencies:\n\n```bash\nbash {baseDir}/setup.sh\n```\n\n## Pre-Recording Configuration\n\nBefore EVERY recording start, follow this flow to confirm camera configuration with the user.\n\n### Flow\n\n1. **Read config** from `{baseDir}/stream_config.json`\n2. **Check KAMI_API_KEY** - if empty, tell user to get one at https://kamiclaw-skill.kamihome.com\n3. **Ask user**: \"How many cameras do you want to record?\"\n4. **For each camera**, confirm or collect:\n   - `DEVICE_ID`: Camera location identifier (e.g., `front-door`, `living-room`, `garage`)\n   - `STREAM_URL`: Camera RTSP stream URL (e.g., `rtsp://admin:pass@192.168.1.100:554/stream1`)\n5. **Display summary** of all cameras to be re"},{"path":"README.md","content":"# 📹 Kamivision Recorder — 让你的摄像头拥有\"记忆\"和\"大脑\"\n\n**告别无尽的录像回放。用一句话，找到你想看的那一刻。**\n\n> 🎯 \"今天早上后门那个穿红色外套的人\" — 输入一句话，精准跳转到对应画面。  \n> 24/7 全天候录制 · AI 智能检索 · 2 分钟极速部署  \n> 注册即送 200 免费 Credits！[立即开始 →](https://kamiclaw-skill.kamihome.com)\n\n---\n\n## 🚀 为什么选择 Kamivision Recorder？\n\n传统监控的痛点你一定经历过：\n\n- ❌ 翻看几个小时录像只为找一个片段\n- ❌ 关键画面被淹没在海量无用静态镜头中\n- ❌ 多摄像头管理混乱，无法跨镜头联查\n- ❌ 出事后才发现录像已过期删除\n\n**Kamivision Recorder 一次性解决所有问题。** 它将你的普通摄像头升级为**可自然语言搜索**的 AI 智能录像系统 —— 像搜索引擎一样搜索你的监控视频。\n\n---\n\n## ✨ 六大核心功能\n\n### 🎥 1. 全天候智能录制\n\n- 后台守护进程，7×24 小时不间断录制\n- 10 秒分段存储，精确到每一个时刻\n- 支持多摄像头同时录制，统一管理\n- 对话式操控 —— 说一句\"开始录制\"即可启动\n\n### 🔍 2. 自然语言视频搜索（核心卖点）\n\n不需要任何专业操作，**用你的日常语言描述你要找的画面**：\n\n- \"找到那个搬箱子的人\"\n- \"有人在后门出现\"\n- \"快递员今天来了几次？\"\n- \"昨天晚上车库有没有异常？\"\n\nAI 自动理解语义，通过**向量相似度匹配**在数据库中精准定位相关片段。\n\n### 🧠 3. AI 场景自动描述\n\n每个 10 秒视频片段都会经过 AI 分析，自动生成文字摘要：\n\n- 识别人物、动作、物品、场景\n- 构建可检索的事件索引\n- 让\"哑巴监控\"变成\"会说话的安保助手\"\n\n### ⏱ 4. 智能时间范围过滤\n\n- 支持按时间段精确筛选：\"今天上午\"、\"昨天下午3点到5点\"\n- 自然语言时间表达自动转换\n- 跨摄像头联合搜索，无死角覆盖\n\n### 🏃 5. 运动检测 & 智能过滤\n\n- 自动识别静态画面，跳过无意义片段\n- **节省高达 70% 的 API 调用费用**\n- 可调节灵敏度，适配不同场景需求\n- 所有画面仍然保存，只是静态片段不做 AI 分析\n\n### 🗄 6. 本地事件索引 & 自动管理\n\n- **SQLite 本地数据库**，离线可查，数据不外泄\n- 自动过期清理，释放磁盘空间\n- 可审计日志，每一次操作有据可查\n- 灵活配置保留天数（默认 3 天）\n\n---\n\n## 🎬 使用场景\n\n| 场景 | 你可以这样说 |\n|------|-------------|\n| 🏠 家庭安防 | \"今天有陌生人按门铃吗？\" |\n| 🏪 店铺监控 | \"找到今天偷东西的那个人\" |\n| 🚗 车库看护 | \"昨晚有人靠近我的车吗？\" |\n| 📦 快递追踪 | \"快递员什么时候把包裹放在门口的？\" |\n| 🐾 宠物看护 | \"我家猫今天在院子里做了什么？\" |\n| 👶 老人/儿童监护 | \"孩子几点从学校回来的？\" |\n\n---\n\n## ⚡ 2 分钟快速上手\n\n### 第一步：安装\n\n安装 Skill 后，AI 助手会自动引导你完成环境配置：\n\n- 检测 Python 3.10 环境\n- 创建隔离虚拟环境（`.venv`）\n- 安装所需依赖（`numpy`、`opencv-python`、`requests`）\n\n**无需手动操作，跟着提示走即可。**\n\n### 第二步：配置摄像头\n\n| 参数 | 说明 | 默认值 |\n|------|------|--------|\n| `STREAM_URL` | 摄像头 RTSP 地址 | —（必填） |\n| `KAMI_API_KEY` | Kamivision API 密钥（[免费获取](https://kamiclaw-skill.kamihome.com)） | —（必填） |\n| `DEVICE_ID` | 摄像头标签，如 `front-door` | `CAM-001` |\n| `SKIP_STATIC` | 跳过静态画面，节省费用 | `true` |\n| `STATIC_THRESHOLD` | 运动灵敏度，越高越不敏感 | `5.0` |\n| `DATA_DIR` | 存储目录 | `stream_data` |\n| `RETENTION_DAYS` | 录像保留天数 | `3` |\n\n**支持多摄像头配置** —— 一次设置，全屋覆盖。\n\n### 第三步：开始使用\n\n直接用自然语言与 AI 助手对话：\n\n```\n\"开始录制\"\n\"停止录制\"  \n\"搜索一个搬箱子的人\"\n\"最近2小时发生了什么？\"\n\"查看日志\"\n```\n\n**零学习成本，即装即用。**\n\n---\n\n## 🔧 系统架构\n\n```\nCamera (RTSP/RTMP)\n    │\n    ▼\n┌──────────────┐\n│  拉取视频流   │  cv2.VideoCapture\n└──────┬───────┘\n       │\n       ▼\n┌──────────────┐\n│  10秒分段切片 │  VideoWriter → .mp4\n└──────┬───────┘\n       │\n       ▼\n┌──────────────┐     ┌─────────────────┐\n│  运动检测     │────▶│ 静态跳过(省钱!) │\n│              │ yes │                 │\n└──────┬───────┘     └─────────────────┘\n       │ no\n       ▼\n┌──────────────┐\n│ Kamivision   │  AI 场景描述 + 向量嵌入\n│ AI API       │\n└──────┬───────┘\n       │\n       ▼\n┌──────────────┐\n│ SQLite 索引   │  路径 / 时间 / 描述 / 向量\n└──────┬───────┘\n       │\n       ▼\n┌──────────────┐\n│ 自然语言搜索  │  余弦相似度匹配\n└──────────────┘\n```\n\n---\n\n## 🔒 安全与隐私\n\n我们深知监控数据的敏感性，因此：\n\n- **本地优先** — 视频、索引数据库全部存储在本地，你完全掌控\n- **最小权限** — 仅在需要 AI 分析时才上传帧/视频到 API\n- **凭证隔离** — API 密钥本地加密存储，不会传输到其他地方\n- **可配置上传模式** — 默认仅上传抽帧图片，可选视频模式\n- **自动过期** — 超过保留期的数据自动删除，不留痕迹\n\n> 详细隐私政策请访问：https://kamiclaw-skill.kamihome.com/privacy\n\n"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7e9156e1awf00v1sas2wkdfd85a4zh\",\n  \"slug\": \"kami-video-search\",\n  \"version\": \"1.1.2\",\n  \"publishedAt\": 1781073064546\n}"},{"path":"skill-card.md","content":"## Description:\n\nRTSP/RTMP multi-camera stream recording with AI-powered video search for starting and stopping recording, checking status, searching clips by natural language, listing recent events, and viewing logs.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[13681882136](https://clawhub.ai/user/13681882136)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users and developers use this skill to connect RTSP/RTMP cameras, record footage locally, generate searchable event indexes, and retrieve relevant clips through natural-language queries.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill handles private camera footage and can upload frames or videos to Kamivision for AI analysis.\n\nMitigation: Use it only when users are comfortable with that data flow, review Kamivision privacy terms, and keep upload mode and endpoint settings explicit.\n\nRisk: Camera credentials, API keys, and RTSP URLs may appear in local configuration or logs.\n\nMitigation: Store credentials outside shared or backed-up folders, redact RTSP URLs before sharing files or logs, and protect the local workspace.\n\nRisk: The setup script can install tooling through a curl-to-bash path if Python 3.10 is missing.\n\nMitigation: Prefer preinstalling Python 3.10 through a trusted package manager and review setup commands before execution.\n\nRisk: Background recording, automatic deletion, and stop commands affect security-sensitive footage and retention.\n\nMitigation: Require explicit user confirmation before starting or stopping recording and review retention settings before deployment.\n\nRisk: Changing KAMI_API_URL could route camera data away from the intended service.\n\nMitigation: Restrict KAMI_API_URL to the intended HTTPS Kamivision endpoint unless a trusted administrator approves a different endpoint.\n\n## Reference(s):\n\n- [ClawHub skill listing](https://clawhub.ai/13681882136/skills/kami-video-search)\n- [Kamivision skill homepage](https://kamiclaw-skill.kamihome.com)\n- [Kamivision privacy policy](https://kamiclaw-skill.kamihome.com/privacy)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown guidance with shell commands and JSON command outputs]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May start or stop background recording processes and update local camera configuration after user confirmation.]\n\n## Skill Version(s):\n\n1.1.2 (source: server release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment."},{"path":"stream_config.json","content":"{\n  \"SEGMENT_DURATION\": 10,\n  \"OUTPUT_WIDTH\": 640,\n  \"OUTPUT_HEIGHT\": 360,\n  \"TIMESTAMP_SOURCE\": \"ntp\",\n  \"ENABLE_DESCRIPTION\": true,\n  \"SKIP_STATIC\": true,\n  \"STATIC_THRESHOLD\": 5.0,\n  \"KAMI_API_URL\": \"https://kamiclaw-skill-api.kamihome.com/v1/detect\",\n  \"KAMI_API_KEY\": \"\",\n  \"KAMI_API_RETRY\": 3,\n  \"SUMMARY_DETECT_TYPE\": \"SUMMARY\",\n  \"SUMMARY_DETECT_SUB_TYPE\": \"\",\n  \"SUMMARY_PROMPT\": \"\",\n  \"SUMMARY_UPLOAD_MODE\": \"image\",\n  \"SUMMARY_SAMPLE_FPS\": 1,\n  \"EMBED_DETECT_TYPE\": \"EMBED\",\n  \"EMBED_DETECT_SUB_TYPE\": \"\",\n  \"EMBEDDING_DIM\": 2048,\n  \"SIMILARITY_THRESHOLD\": 0.35,\n  \"SEARCH_TOP_K\": 5,\n  \"LIST_TOP_K\": 5,\n  \"DATA_DIR\": \"\",\n  \"RETENTION_DAYS\": 3,\n  \"INDEX_FILE\": \"index.db\",\n  \"PROCESS_WORKERS\": 5,\n  \"RECONNECT_DELAY\": 3,\n  \"MAX_RECONNECT\": 3,\n  \"skillId\": \"SK_VIDEO_SEARCH\",\n  \"LOG_FILE\": \"\",\n  \"cameras\": [\n    {\n      \"STREAM_URL\": \"rtsp://admin:xxx@192.168.XXX/stream1\",\n      \"DEVICE_ID\": \"camera1\"\n    },\n    {\n      \"STREAM_URL\": \"rtsp://admin:xxx@192.168.xxx/stream1\",\n      \"DEVICE_ID\": \"camera2\"\n    }\n  ]\n}"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":1714,"uniquenessScore":43,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-11T02:04:02.144Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-11T02:04:02.144Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-11T04:36:20.582Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}