alerts
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseVSS Alert Management
VSS 告警管理
The alerts profile is deployed in one of two modes at a time. The mode is chosen at and is static until you tear down and redeploy. Which mode is running determines which flow to use — this skill does not route per-request.
deploy -p alerts -m {verification,real-time}告警配置文件每次仅以两种模式之一部署。模式通过 选择,且在您拆除并重新部署前保持静态。当前运行的模式决定了要使用的流程——本技能不会按请求路由。
deploy -p alerts -m {verification,real-time}When to Use
使用场景
- Start or stop a real-time alert on a sensor ("Start real-time alert for boxes dropped on sensor warehouse_sample")
- List or query detected incidents / alerts
- Add a new camera to the alerts pipeline
- Customize the VLM-verifier prompts (CV mode)
- Check verdicts (confirmed / rejected / unverified)
- 在传感器上启动或停止实时告警("在传感器warehouse_sample上启动针对箱子掉落的实时告警")
- 列出或查询已检测到的事件/告警
- 向告警流水线添加新摄像头
- 自定义VLM验证器提示(CV模式)
- 查看判定结果(已确认/已驳回/未验证)
Deployment prerequisite
部署前提
This skill requires the VSS alerts profile running on the host at , in either or mode. Before any request:
$HOST_IPverificationreal-time-
Probe the stack:bash
# Either perception-alerts (CV mode) OR rtvi-vlm (VLM mode) must be present. curl -sf --max-time 5 "http://${HOST_IP}:8000/docs" >/dev/null \ && docker ps --format '{{.Names}}' \ | grep -qE '^(perception-alerts|rtvi-vlm)$' -
If the probe fails, ask the user:"The VSSprofile isn't running on
alerts. Which mode should I deploy —$HOST_IP(CV) orverification(VLM)?"real-time- Answer → hand off to the skill with
/deploy. Return here once it succeeds.-p alerts -m <mode> - If the user declines → stop. Do not run this skill against a missing stack.
(If your caller has granted explicit pre-authorization to deploy autonomously — e.g. the request says "pre-authorized to deploy prerequisites", or you are running in a non-interactive evaluation harness with that permission — skip the confirmation and invokedirectly. Default the mode to/deployunless the request specifies otherwise.)verification - Answer → hand off to the
-
If the probe passes, detect the mode per § Step 1 below.
本技能要求VSS alerts配置文件在主机上运行,模式为(CV)或(VLM)。处理任何请求前:
$HOST_IPverificationreal-time-
探测堆栈:bash
# 必须存在perception-alerts(CV模式)或rtvi-vlm(VLM模式)之一。 curl -sf --max-time 5 "http://${HOST_IP}:8000/docs" >/dev/null \ && docker ps --format '{{.Names}}' \ | grep -qE '^(perception-alerts|rtvi-vlm)$' -
如果探测失败,询问用户:"VSS配置文件未在
alerts上运行。我应该部署哪种模式——$HOST_IP(CV)还是verification(VLM)?"real-time- 用户答复后 → 移交至技能,参数为
/deploy。部署成功后返回此处。-p alerts -m <mode> - 如果用户拒绝 → 停止操作。不要在缺失堆栈的情况下运行本技能。
(如果调用者已授予自主部署的明确预授权——例如请求中提到"预授权部署前置条件",或您在具有该权限的非交互式评估环境中运行——则跳过确认步骤,直接调用。除非请求中指定其他模式,否则默认使用/deploy模式。)verification - 用户答复后 → 移交至
-
如果探测通过,按照下文§步骤1检测模式。
The Two Modes (Deploy-Time Choice)
两种模式(部署时选择)
| Mode | Deploy flag | Env ( | What runs | How alerts are created |
|---|---|---|---|---|
| CV (verification) | | | RT-CV (Grounding DINO) + Behavior Analytics + | Static: any RTSP flowing through VIOS is auto-processed; Behavior Analytics emits candidates; VLM verifies each clip per |
| VLM (real-time) | | | | Dynamic: user asks the VSS Agent to start monitoring a sensor with a natural-language detection prompt |
Mode is static. Switching requires + with the other flag — see the skill. Never assume both flows are available at once.
deploy downdeploy up-mdeploy| 模式 | 部署标识 | 环境变量( | 运行组件 | 告警创建方式 |
|---|---|---|---|---|
| CV(验证模式) | | | RT-CV(Grounding DINO)+ 行为分析 + | 静态:所有流经VIOS的RTSP流会被自动处理;行为分析模块生成候选告警;VLM根据 |
| VLM(实时模式) | | | | 动态:用户通过自然语言检测提示请求VSS Agent开始监控传感器 |
模式是静态的。切换模式需要执行 + 并使用另一个标识——请查看技能。切勿假设两种流程可同时使用。
deploy downdeploy up-mdeployStep 1 — Detect the Currently Deployed Mode
步骤1 — 检测当前部署的模式
Before running any alert workflow, check which mode is live. Use container names as the signal:
bash
undefined在运行任何告警工作流前,检查当前运行的模式。使用容器名称作为判断信号:
bash
undefinedVLM real-time mode
VLM实时模式
docker ps --format '{{.Names}}' | grep -qx rtvi-vlm && echo "mode=VLM"
docker ps --format '{{.Names}}' | grep -qx rtvi-vlm && echo "mode=VLM"
CV verification mode (behavior analytics is CV-only; alert-bridge is the VLM verifier)
CV验证模式(行为分析是CV模式专属;alert-bridge是VLM验证器)
docker ps --format '{{.Names}}' | grep -qx vss-behavior-analytics-alerts && echo "mode=CV"
Exactly one of these should match on a healthy alerts deployment. If neither matches, the alerts profile is not deployed — direct the user to the `deploy` skill.
Alternative signal (if `docker ps` isn't available in the current context): check the profile's `.env`:
```bash
grep -E '^MODE=' deployments/developer-workflow/dev-profile-alerts/.envdocker ps --format '{{.Names}}' | grep -qx vss-behavior-analytics-alerts && echo "mode=CV"
在健康的告警部署中,上述命令应恰好匹配其中一个。如果都不匹配,说明告警配置文件未部署——引导用户使用`deploy`技能。
备选判断信号(如果当前环境中无法使用`docker ps`):检查配置文件的`.env`文件:
```bash
grep -E '^MODE=' deployments/developer-workflow/dev-profile-alerts/.envMODE=2d_cv → CV mode
MODE=2d_cv → CV模式
MODE=2d_vlm → VLM real-time mode
MODE=2d_vlm → VLM实时模式
---
---Step 2 — Route by Deployed Mode
步骤2 — 根据部署模式路由
| Deployed mode | User asks about… | Action |
|---|---|---|
| CV | any alert request | Run Workflow A (CV) — onboard RTSP via |
| CV | specifically a VLM real-time alert ("start alert for boxes dropped…") | Redeployment required. Confirm with the user first, then point to the |
| VLM | any alert request | Run Workflow B (VLM) — call the VSS Agent with a detection prompt. |
| VLM | specifically a CV / behavior-analytics / PPE-rule alert | Redeployment required. Confirm, then point to |
Always confirm before triggering a redeploy. A mode switch stops all currently-running monitoring and restarts services.
| 已部署模式 | 用户询问内容 | 操作 |
|---|---|---|
| CV | 任何告警请求 | 运行工作流A(CV)——通过 |
| CV | 明确请求VLM实时告警("启动针对箱子掉落的告警…") | 需要重新部署。先与用户确认,然后引导至 |
| VLM | 任何告警请求 | 运行工作流B(VLM)——向VSS Agent发送检测提示。 |
| VLM | 明确请求CV/行为分析/PPE规则告警 | 需要重新部署。先确认,然后引导至 |
触发重新部署前务必确认。模式切换会停止所有当前运行的监控并重启服务。
Prereq for Either Mode: Sensor Must Be in VIOS
两种模式的共同前提:传感器必须已在VIOS中注册
Both modes require the camera to be registered in VIOS first.
- If the user hands you only an RTSP URL (or an IP camera) — defer to the skill to add it via
vios(seePOST /sensor/addskill Section 6). Record the returnedvios/ name.sensorId - If the user names an existing sensor — confirm it is listed by via the
GET /sensor/listskill before proceeding.vios - If the user asks to use a local/sample MP4 for a VLM real-time alert, do not upload the MP4 directly to VIOS storage (). VIOS file uploads create
PUT /storage/file/...entries whose stream URL is a local file path;sensor_filerequires a livertvi-vlmURL.rtsp://... - For a local/sample MP4 in VLM real-time mode, first add the video to NVStreamer (or another RTSP restreamer) and obtain its RTSP live URL, then add that RTSP URL to VIOS via with the desired sensor name. Only proceed once
POST /sensor/addshows a stream URL starting withGET /sensor/<sensorId>/streams.rtsp://
On a CV deployment, adding the RTSP is the entire onboarding step — the pipeline picks up the stream automatically once it is in VIOS. On a VLM deployment, adding the RTSP is a prerequisite to Workflow B.
两种模式都要求摄像头先在VIOS中注册。
- 如果用户仅提供RTSP URL(或IP摄像头)——移交至技能,通过
vios添加(查看POST /sensor/add技能第6节)。记录返回的vios/名称。sensorId - 如果用户指定现有传感器——在继续操作前,通过技能调用
vios确认该传感器已列出。GET /sensor/list - 如果用户要求为VLM实时告警使用本地/示例MP4文件,请不要直接将MP4上传至VIOS存储()。VIOS文件上传会创建
PUT /storage/file/...条目,其流URL为本地文件路径;sensor_file需要实时rtvi-vlmURL。rtsp://... - 对于VLM实时模式下的本地/示例MP4文件,先将视频添加至NVStreamer(或其他RTSP转流器)并获取其实时RTSP URL,然后通过将该RTSP URL添加至VIOS并设置所需的传感器名称。只有当
POST /sensor/add显示以GET /sensor/<sensorId>/streams开头的流URL时,才可继续操作。rtsp://
在CV部署中,添加RTSP流是完整的接入步骤——一旦流在VIOS中注册,流水线会自动处理该流。在VLM部署中,添加RTSP流是工作流B的前置条件。
The Agent /generate
Endpoint
/generateAgent /generate
端点
/generateAll VLM-flow actions and all query actions go through the VSS Agent's natural-language endpoint:
bash
AGENT="http://<AGENT_ENDPOINT>" # default http://localhost:8000 on the alerts profile
curl -s -X POST "$AGENT/generate" \
-H "Content-Type: application/json" \
-d '{"input_message": "<natural-language request>"}' | jq .Endpoint resolution: use the agent endpoint from the active VSS deployment context. If unavailable, ask the user. Do not discover via filesystem.
Availability check: .
curl -sf --connect-timeout 5 "$AGENT/docs"Do not call the microservice endpoints directly — always go through the agent. The agent internally dispatches to , , and .
rtvi-vlmrtvi_vlm_alertrtvi_prompt_genvideo_analytics_mcp.get_incidents所有VLM流程操作和查询操作均通过VSS Agent的自然语言端点执行:
bash
AGENT="http://<AGENT_ENDPOINT>" # 告警配置文件的默认地址为http://localhost:8000
curl -s -X POST "$AGENT/generate" \
-H "Content-Type: application/json" \
-d '{"input_message": "<自然语言请求>"}' | jq .端点解析:使用活动VSS部署上下文中的Agent端点。如果不可用,询问用户。不要通过文件系统发现。
可用性检查:。
curl -sf --connect-timeout 5 "$AGENT/docs"请勿直接调用微服务端点——始终通过Agent调用。Agent会内部调度至、和。
rtvi-vlmrtvi_vlm_alertrtvi_prompt_genvideo_analytics_mcp.get_incidentsWorkflow A — CV Mode (deployment is -m verification
/ MODE=2d_cv
)
-m verificationMODE=2d_cv工作流A — CV模式(部署参数为-m verification
/ MODE=2d_cv
)
-m verificationMODE=2d_cvOn a CV deployment, alerts are deployment-driven, not request-driven. There is no agent call to "create" an alert.
-
Onboard the camera — add the RTSP to VIOS via theskill (
vios). Once registered and online, the CV pipeline picks it up automatically.POST /sensor/add -
Confirm the sensor is online:bash
curl -s "http://<VST_ENDPOINT>/vst/api/v1/sensor/<sensorId>/status" | jq . -
Wait for alerts to land in Elasticsearch. Behavior Analytics emits candidates that match configured rules;calls the VLM to confirm/reject each candidate per
alert-bridge. Use Workflow C to query results.alert_type_config.json
If the user asks you to "start a real-time alert" on a CV deployment, that is a mode mismatch — see the routing table above.
在CV部署中,告警是部署驱动的,而非请求驱动的。没有Agent接口可用于"创建"告警。
-
接入摄像头——通过技能将RTSP流添加至VIOS(
vios)。注册并上线后,CV流水线会自动处理该流。POST /sensor/add -
确认传感器已上线:bash
curl -s "http://<VST_ENDPOINT>/vst/api/v1/sensor/<sensorId>/status" | jq . -
等待告警进入Elasticsearch。行为分析模块会生成符合配置规则的候选告警;会调用VLM根据
alert-bridge确认/驳回每个候选告警。使用工作流C查询结果。alert_type_config.json
如果用户要求在CV部署上"启动实时告警",这属于模式不匹配——请查看上述路由表。
Workflow B — VLM Mode (deployment is -m real-time
/ MODE=2d_vlm
)
-m real-timeMODE=2d_vlm工作流B — VLM模式(部署参数为-m real-time
/ MODE=2d_vlm
)
-m real-timeMODE=2d_vlmOn a VLM deployment, the user drives alert creation via natural-language requests to the VSS Agent. The agent calls to turn the description into a Yes/No detection question, then with to register the stream with and begin continuous monitoring.
rtvi_prompt_genrtvi_vlm_alertaction="start"rtvi-vlmBefore calling the agent, verify the target sensor is RTSP-backed:
bash
curl -s "http://<VST_ENDPOINT>/vst/api/v1/sensor/<sensorId>/streams" | jq .At least one stream for the sensor must have a URL beginning with .
If the stream URL is a local file path such as ,
the sensor was uploaded as a VIOS file and real-time alert start will fail.
For sample videos, add the video to NVStreamer first, register the returned
RTSP URL in VIOS, then start the alert against that RTSP-backed VIOS sensor.
rtsp:///home/vst/.../video.mp4Sample-video onboarding for real-time alerts:
-
Add the MP4 to NVStreamer and get the RTSP live URL for the new stream.
-
Register that RTSP URL in VIOS:bash
curl -s -X POST "http://<VST_ENDPOINT>/vst/api/v1/sensor/add" \ -H "Content-Type: application/json" \ -d '{ "sensorUrl": "rtsp://<nvstreamer-host>:<port>/<path>", "name": "warehouse_sample" }' | jq . -
Confirmreturns the RTSP URL, then call the VSS Agent as shown below.
GET /sensor/warehouse_sample/streams
Canonical sample request:
bash
curl -s -X POST "$AGENT/generate" \
-H "Content-Type: application/json" \
-d '{"input_message": "Start real-time alert for boxes dropped on sensor warehouse_sample"}' | jq .More examples:
bash
undefined在VLM部署中,用户通过向VSS Agent发送自然语言请求来创建告警。Agent会调用将描述转换为是/否检测问题,然后调用并设置,以在中注册流并开始持续监控。
rtvi_prompt_genrtvi_vlm_alertaction="start"rtvi-vlm调用Agent前,验证目标传感器是否基于RTSP:
bash
curl -s "http://<VST_ENDPOINT>/vst/api/v1/sensor/<sensorId>/streams" | jq .该传感器至少有一个流的URL必须以开头。如果流URL是本地文件路径(如),说明该传感器是作为VIOS文件上传的,启动实时告警会失败。对于示例视频,先将视频添加至NVStreamer,然后在VIOS中注册返回的RTSP URL,再针对该基于RTSP的VIOS传感器启动告警。
rtsp:///home/vst/.../video.mp4实时告警的示例视频接入流程:
-
将MP4添加至NVStreamer并获取新流的实时RTSP URL。
-
在VIOS中注册该RTSP URL:bash
curl -s -X POST "http://<VST_ENDPOINT>/vst/api/v1/sensor/add" \ -H "Content-Type: application/json" \ -d '{ "sensorUrl": "rtsp://<nvstreamer-host>:<port>/<path>", "name": "warehouse_sample" }' | jq . -
确认返回该RTSP URL,然后按如下方式调用VSS Agent。
GET /sensor/warehouse_sample/streams
标准示例请求:
bash
curl -s -X POST "$AGENT/generate" \
-H "Content-Type: application/json" \
-d '{"input_message": "Start real-time alert for boxes dropped on sensor warehouse_sample"}' | jq .更多示例:
bash
undefinedVehicle collisions on a street cam
街道摄像头的车辆碰撞检测
curl -s -X POST "$AGENT/generate" -H "Content-Type: application/json"
-d '{"input_message": "Start real-time alert for vehicle collisions on sensor Camera_02"}' | jq .
-d '{"input_message": "Start real-time alert for vehicle collisions on sensor Camera_02"}' | jq .
curl -s -X POST "$AGENT/generate" -H "Content-Type: application/json"
-d '{"input_message": "Start real-time alert for vehicle collisions on sensor Camera_02"}' | jq .
-d '{"input_message": "Start real-time alert for vehicle collisions on sensor Camera_02"}' | jq .
Forklift-pedestrian proximity
叉车与行人距离监测
curl -s -X POST "$AGENT/generate" -H "Content-Type: application/json"
-d '{"input_message": "Monitor Warehouse_Dock_3 for a forklift passing within 1 meter of a pedestrian"}' | jq .
-d '{"input_message": "Monitor Warehouse_Dock_3 for a forklift passing within 1 meter of a pedestrian"}' | jq .
curl -s -X POST "$AGENT/generate" -H "Content-Type: application/json"
-d '{"input_message": "Monitor Warehouse_Dock_3 for a forklift passing within 1 meter of a pedestrian"}' | jq .
-d '{"input_message": "Monitor Warehouse_Dock_3 for a forklift passing within 1 meter of a pedestrian"}' | jq .
Generic start (no specific target — uses default prompt)
通用启动(无特定目标——使用默认提示)
curl -s -X POST "$AGENT/generate" -H "Content-Type: application/json"
-d '{"input_message": "Start real-time alert for sensor warehouse_sample"}' | jq .
-d '{"input_message": "Start real-time alert for sensor warehouse_sample"}' | jq .
**What the agent does under the hood:**
1. `rtvi_prompt_gen` — converts "boxes dropped" → `prompt: "Detect for a box being dropped. Answer in Yes or No"`, `system_prompt: "You are a helpful assistant."`.
2. `rtvi_vlm_alert action="start"` — looks up the sensor in VIOS live streams, calls `POST /v1/streams/add` and `POST /v1/generate_captions_alerts` (`stream=true`) on `rtvi-vlm`. Returns `stream_id`.
**Alert semantics:** every chunk is captioned; a chunk whose VLM response contains **`"yes"` or `"true"`** (case-insensitive) triggers an incident published to the Kafka incident topic (`mdx-vlm-incidents` on the alerts profile). That is why prompts must force a Yes/No answer.
**Stop monitoring:**
```bash
curl -s -X POST "$AGENT/generate" -H "Content-Type: application/json" \
-d '{"input_message": "Stop real-time alert for sensor warehouse_sample"}' | jq .If the user asks you to flag a scenario that matches a CV (e.g. "ladder PPE violation") on a VLM deployment, that is a mode mismatch — see the routing table above.
alert_typecurl -s -X POST "$AGENT/generate" -H "Content-Type: application/json"
-d '{"input_message": "Start real-time alert for sensor warehouse_sample"}' | jq .
-d '{"input_message": "Start real-time alert for sensor warehouse_sample"}' | jq .
**Agent的底层操作**:
1. `rtvi_prompt_gen`——将"boxes dropped"转换为`prompt: "Detect for a box being dropped. Answer in Yes or No"`,`system_prompt: "You are a helpful assistant."`。
2. `rtvi_vlm_alert action="start"`——在VIOS实时流中查找传感器,调用`rtvi-vlm`的`POST /v1/streams/add`和`POST /v1/generate_captions_alerts`(`stream=true`)。返回`stream_id`。
**告警规则**:每个片段都会生成字幕;如果VLM响应包含**`"yes"`或`"true"`**(不区分大小写),则触发事件并发布至Kafka事件主题(告警配置文件中的`mdx-vlm-incidents`)。这就是为什么提示必须强制是/否回答的原因。
**停止监控**:
```bash
curl -s -X POST "$AGENT/generate" -H "Content-Type: application/json" \
-d '{"input_message": "Stop real-time alert for sensor warehouse_sample"}' | jq .如果用户要求标记与CV 匹配的场景(如"梯子PPE违规")而当前是VLM部署,这属于模式不匹配——请查看上述路由表。
alert_typeWorkflow C — Query / List Alerts (works on either mode)
工作流C — 查询/列出告警(两种模式均适用)
Both CV- and VLM-generated alerts land in Elasticsearch and are queryable via the agent's tool.
video_analytics_mcp.get_incidentsbash
curl -s -X POST "$AGENT/generate" -H "Content-Type: application/json" \
-d '{"input_message": "Show me recent alerts for sensor warehouse_sample"}' | jq .
curl -s -X POST "$AGENT/generate" -H "Content-Type: application/json" \
-d '{"input_message": "List confirmed alerts from the last hour"}' | jq .
curl -s -X POST "$AGENT/generate" -H "Content-Type: application/json" \
-d '{"input_message": "Were there any PPE violations today on Camera_02?"}' | jq .
curl -s -X POST "$AGENT/generate" -H "Content-Type: application/json" \
-d '{"input_message": "Show collision incidents from Camera_02 between 2026-04-23T00:00:00.000Z and 2026-04-23T23:59:59.000Z"}' | jq .For richer / non-natural-language filtering (sensor-level, time-series, counts): use the skill (VA-MCP on port 9901).
video-analyticsCV和VLM生成的告警都会存入Elasticsearch,可通过Agent的工具查询。
video_analytics_mcp.get_incidentsbash
curl -s -X POST "$AGENT/generate" -H "Content-Type: application/json" \
-d '{"input_message": "Show me recent alerts for sensor warehouse_sample"}' | jq .
curl -s -X POST "$AGENT/generate" -H "Content-Type: application/json" \
-d '{"input_message": "List confirmed alerts from the last hour"}' | jq .
curl -s -X POST "$AGENT/generate" -H "Content-Type: application/json" \
-d '{"input_message": "Were there any PPE violations today on Camera_02?"}' | jq .
curl -s -X POST "$AGENT/generate" -H "Content-Type: application/json" \
-d '{"input_message": "Show collision incidents from Camera_02 between 2026-04-23T00:00:00.000Z and 2026-04-23T23:59:59.000Z"}' | jq .如需更丰富的非自然语言过滤(传感器级别、时间序列、统计):使用**技能**(VA-MCP,端口9901)。
video-analyticsVerdict interpretation (CV mode only)
判定结果解读(仅CV模式)
Verified alerts carry an extended block:
info | Meaning |
|---|---|
| VLM determined the alert is real |
| VLM determined it is a false positive |
| Verification could not complete (error) |
Check (200 = success) and for the VLM's explanation. VLM-mode incidents are always "confirmed" at source (the trigger itself is a Yes/No VLM answer), so there is no separate verdict field.
verification_response_codereasoning已验证的告警包含扩展的块:
info | 含义 |
|---|---|
| VLM判定告警真实有效 |
| VLM判定为误报 |
| 验证未完成(错误) |
查看(200=成功)和字段获取VLM的解释。VLM模式的事件在源头上始终是"已确认"的(触发条件本身就是VLM的是/否回答),因此没有单独的判定结果字段。
verification_response_codereasoningCustomize CV Verifier Prompts (CV mode only)
自定义CV验证器提示(仅CV模式)
CV-path verifier prompts live in:
deployments/developer-workflow/dev-profile-alerts/vlm-as-verifier/configs/alert_type_config.jsonEach entry maps a CV (the field emitted by Behavior Analytics) to the VLM prompts used for verification:
alert_typecategoryjson
{
"version": "1.0",
"alerts": [
{
"alert_type": "FOV Count Violation",
"output_category": "Ladder PPE Violation",
"prompts": {
"system": "You are a helpful assistant.",
"user": "Is anyone on the ladder without a hardhat and safety vest? Answer yes or no.",
"enrichment": "Describe the PPE violation in detail..."
}
}
]
}- must match the
alert_typeemitted by Behavior Analytics.category - is the display name in Elasticsearch / UI.
output_category - (optional) triggers a second VLM call for a richer description; requires
enrichment.alert_agent.enrichment.enabled: true - Changes require a restart of the (vlm-as-verifier) container.
alert-bridge
VLM real-time prompts are not configured in a file — they are per-request, shaped by from the user's natural-language detection description.
rtvi_prompt_genCV流程的验证器提示位于:
deployments/developer-workflow/dev-profile-alerts/vlm-as-verifier/configs/alert_type_config.json每个条目将CV (行为分析模块输出的字段)映射至用于验证的VLM提示:
alert_typecategoryjson
{
"version": "1.0",
"alerts": [
{
"alert_type": "FOV Count Violation",
"output_category": "Ladder PPE Violation",
"prompts": {
"system": "You are a helpful assistant.",
"user": "Is anyone on the ladder without a hardhat and safety vest? Answer yes or no.",
"enrichment": "Describe the PPE violation in detail..."
}
}
]
}- ****必须与行为分析模块输出的
alert_type匹配。category - ****是Elasticsearch/UI中的显示名称。
output_category - (可选)会触发第二次VLM调用以生成更详细的描述;需要设置
enrichment。alert_agent.enrichment.enabled: true - 修改后需要重启(vlm-as-verifier)容器。
alert-bridge
VLM实时模式的提示不通过文件配置——它们是按请求生成的,由根据用户的自然语言检测描述生成。
rtvi_prompt_genCross-Skill Links
跨技能链接
| Task | Skill |
|---|---|
| Deploy, redeploy, or switch alert mode | |
| Add an RTSP / IP camera to VIOS | |
| List sensors, take a snapshot, download a clip | |
| Time-range incident / occupancy / PPE metrics from Elasticsearch | |
| Generate a detailed incident report from an alert | |
| 任务 | 技能 |
|---|---|
| 部署、重新部署或切换告警模式 | ** |
| 向VIOS添加RTSP/IP摄像头 | ** |
| 列出传感器、拍摄快照、下载片段 | ** |
| 从Elasticsearch获取时间范围内的事件/占用率/PPE指标 | ** |
| 根据告警生成详细事件报告 | ** |
Gotchas
注意事项
- Mode is static. Do not attempt to run the VLM flow on a CV deployment or vice versa — required services won't be running. Confirm with the user, then route to the skill for redeployment.
deploy - A mode switch tears down the current deployment. Any running VLM monitoring streams and any CV alert state not already in Elasticsearch will be lost.
- Don't call the microservice directly from this skill. Always go through
rtvi-vlm. The agent handles sensor→RTSP lookup, stream registration, and teardown.$AGENT/generate - Sensor must already be in VIOS for either mode. If the user hands you only an RTSP URL, use the skill first.
vios - VLM alert trigger is a /
"yes"token match on the VLM response (case-insensitive)."true"enforces the Yes/No pattern — don't hand-craft prompts that break it.rtvi_prompt_gen - Stopping a VLM alert is one agent call ("Stop real-time alert…"); the agent handles both the caption-stream and the stream-registration teardown.
- Prompt changes to need an
alert_type_config.jsonrestart.alert-bridgeis required for thealert_agent.enrichment.enabled: trueprompt to fire.enrichment
- 模式是静态的。不要尝试在CV部署上运行VLM流程,反之亦然——所需服务未运行。先与用户确认,然后引导至技能进行重新部署。
deploy - 模式切换会拆除当前部署。所有正在运行的VLM监控流以及未存入Elasticsearch的CV告警状态都会丢失。
- 请勿直接调用微服务。始终通过
rtvi-vlm调用。Agent会处理传感器→RTSP查找、流注册和拆除操作。$AGENT/generate - 传感器必须已在VIOS中注册才能使用任何模式。如果用户仅提供RTSP URL,先使用技能。
vios - VLM告警触发条件是VLM响应中匹配/
"yes"令牌(不区分大小写)。"true"会强制是/否模式——不要手动编写破坏该模式的提示。rtvi_prompt_gen - 停止VLM告警只需一次Agent调用("Stop real-time alert…");Agent会处理字幕流和流注册的拆除操作。
- 修改中的提示后需要重启
alert_type_config.json。使用alert-bridge提示需要设置enrichment。alert_agent.enrichment.enabled: true