Write Vision Event Bundle
Write vision events as self-contained tarball bundles to a local directory.
Serialize vision events as self-contained tarball bundles on the local filesystem instead of sending them to the Roboflow Vision Events API. Designed for air-gapped and OT-network deployments where the inference server has no route to the cloud: a customer file-mover service transports the bundles out of the network, and an uploader later POSTs each bundle to Roboflow's POST /vision-events/bundle endpoint without unpacking it.
Bundle Format (version 1)
One tarball per event, written to target_directory:
event_<UTC timestamp>_<eventId>.tar.gz
├── payload.json # the event payload (versioned contract, camelCase)
└── images/<file_id>.jpg # image members, file_id is a uuid4payload.json has the same shape as the POST /vision-events request body, with these differences:
bundleFormatVersionidentifies the bundle contract version (currently1)images[].file/images[].inputFilereference tar member paths instead ofsourceId/inputSourceId(the cloud resolves them to source ids at ingest time)useCaseIdis only present when the optional Use Case field is set on this block; air-gapped deployments typically leave it unset so no cloud identifiers are stored in the OT network, and the uploader supplies it via theuseCaseIdquery parameter instead
Media members live under type-named directories (images/ today); future media types will use sibling directories, so consumers should ignore unknown top-level directories.
Atomic Writes
Bundles are written to a dot-prefixed temporary file in the target directory, fsynced, and atomically renamed to their final event_*.tar.gz name (the directory is fsynced after the rename). A file-mover service that matches event_*.tar.gz (or skips dotfiles) can never pick up a partially written bundle.
Rate Limiting
Video workflows can run many times per second, which by default would write a bundle for every frame. The block enforces a cooldown between consecutive events: at most one event per second is written by default. Events triggered during the cooldown period are dropped and the throttling_status output is set to True. Adjust cooldown_seconds to your needs, or set it to 0 to disable rate limiting entirely.
Requirements
Local Filesystem Access: This block requires write access to the local filesystem and is intended for self-hosted inference. Filesystem access can be controlled via environment variables:
Set
ALLOW_WORKFLOW_BLOCKS_ACCESSING_LOCAL_STORAGE=Falseto disable the block (it will raise an error)Set
WORKFLOW_BLOCKS_WRITE_DIRECTORYto an absolute path to restrict writes to a specific directory and its subdirectories only
No Roboflow API key is required: the block never talks to the network.
Event Types
quality_check: Manufacturing/inspection QA with pass/fail result and optional confidence
inventory_count: Inventory tracking with location, item count, and item type
safety_alert: Safety violations with alert type, severity (low/medium/high), and description
custom: User-defined events with a free-form value string
operator_feedback: Operator review/correction of previous events (correct/incorrect/inconclusive)
Type identifier
Use the following identifier in step "type" field: roboflow_core/vision_event_bundle@v1 to add the block as a step in your workflow.
Properties
Name
Type
Description
Refs
name
str
Enter a unique identifier for this step..
❌
target_directory
str
Directory path where event bundles will be written. Created automatically if it does not exist. If WORKFLOW_BLOCKS_WRITE_DIRECTORY is set, this path must be a subdirectory of the allowed directory..
✅
event_type
str
The type of vision event to create..
✅
solution
str
Optional use case to bake into the bundle as useCaseId. Leave unset in air-gapped deployments so no cloud identifiers are stored in the bundle - the uploader supplies the use case at upload time instead. A useCaseId query parameter passed to the ingest endpoint always overrides the bundled value..
✅
external_id
str
External identifier for correlation with other systems (max 1000 chars)..
✅
qc_result
str
Quality check result: pass or fail..
✅
location
str
Location identifier for inventory count..
✅
item_count
int
Number of items counted..
✅
item_type
str
Type of item being counted..
✅
alert_type
str
Alert type identifier (e.g. no_hardhat, spill_detected)..
✅
severity
str
Severity level for the safety alert..
✅
alert_description
str
Description of the safety alert..
✅
custom_value
str
Arbitrary value for custom events..
✅
related_event_id
str
The event ID of the event being reviewed..
✅
feedback
str
Operator feedback on the related event..
✅
custom_metadata
Dict[str, Union[bool, float, int, str]]
Flat key-value metadata to attach to the event. Keys must match pattern [a-zA-Z0-9_ -]+ (max 100 chars). String values max 1000 chars..
✅
fire_and_forget
bool
If True, the bundle is written asynchronously and the workflow continues without waiting. If False, the block waits for the write to finish..
✅
disable_sink
bool
If True, the block is disabled and no bundles are written..
✅
cooldown_seconds
Union[float, int]
Minimum number of seconds between consecutive event bundles written by this block. Events triggered during the cooldown period are dropped and the throttling_status output is set to True. Defaults to 1 second so high-frequency video workflows do not write a bundle per frame. Set to 0 to disable rate limiting for intentionally bursty use cases..
✅
The Refs column marks possibility to parametrise the property with dynamic values available in workflow runtime. See Bindings for more info.
Runtime compatibility
soft - runtime hosted_serverless, dedicated_deployment; execution remote : Cooldown / rate-limit timer is stored in process memory. With remote step execution on stateless or multi-replica HTTP runtimes each request gets a fresh worker, so cooldown does not throttle. Cooldown only behaves as documented with local step execution inside an InferencePipeline.
soft - runtime dedicated_deployment : Bundles are persisted on the deployment's volume but are not retrievable through the Roboflow API; this block is intended for self-hosted deployments with a file-mover process.
soft - runtime hosted_serverless : Container disk is ephemeral, so bundles are lost when the worker scales down; if there's more than one replica consuming workflow requests the result will be non deterministic.
Input and Output Bindings
The available connections depend on its binding kinds. Check what binding kinds Write Vision Event Bundle in version v1 has.
Last updated
Was this helpful?