Model Monitoring Inference Aggregator¶
Class: ModelMonitoringInferenceAggregatorBlockV1
Periodically aggregate and report a curated sample of inference predictions to Roboflow Model Monitoring by collecting predictions in memory, grouping by class, selecting the most confident prediction per class, and sending aggregated results at configurable intervals to enable efficient video processing monitoring, production analytics, and model performance tracking workflows with minimal performance overhead.
How This Block Works¶
This block aggregates predictions over time and sends representative samples to Roboflow Model Monitoring at regular intervals, reducing API calls and maintaining video processing performance. The block:
- Receives predictions and configuration:
- Takes predictions from any supported model type (object detection, instance segmentation, keypoint detection, or classification)
- Receives model ID for identification in Model Monitoring
- Accepts frequency parameter specifying reporting interval in seconds
- Receives execution mode flag (fire-and-forget)
- Validates Roboflow API key:
- Checks that a valid Roboflow API key is available (required for API access)
- Raises an error if API key is missing with instructions on how to retrieve one
- Collects predictions in memory:
- Stores predictions in an in-memory aggregator organized by model ID
- Accumulates predictions between reporting intervals
- Maintains state for the duration of the workflow execution session
- Checks reporting interval:
- Uses cache to track last report time based on unique aggregator key
- Calculates time elapsed since last report
- Compares elapsed time to configured frequency threshold
- Skips reporting if interval has not been reached (returns status message)
- Consolidates predictions when reporting:
- Formats all collected predictions for Model Monitoring
- Groups predictions by class name across all collected data
- For each class, sorts predictions by confidence (highest first)
- Selects the most confident prediction per class as representative sample
- Creates a curated set of predictions (one per class with highest confidence)
- Retrieves workspace information:
- Gets workspace ID from Roboflow API using the provided API key
- Uses caching (15-minute expiration) to avoid repeated API calls
- Caches workspace name using MD5 hash of API key as cache key
- Sends aggregated data to Model Monitoring:
- Constructs inference data payload with timestamp, source info, device ID, and server version
- Includes system information (if available) for monitoring context
- Sends aggregated predictions (one per class) to Roboflow Model Monitoring API
- Flushes in-memory aggregator after sending (starts fresh collection)
- Updates last report time in cache
- Executes synchronously or asynchronously:
- Asynchronous mode (fire_and_forget=True): Submits task to background thread pool or FastAPI background tasks, allowing workflow to continue without waiting for API call to complete
- Synchronous mode (fire_and_forget=False): Waits for API call to complete and returns immediate status, useful for debugging and error handling
- Returns status information:
- Outputs error_status indicating success (False) or failure (True)
- Outputs message with reporting status or error details
- Provides feedback on whether aggregation was sent or skipped
The block is optimized for video processing workflows where sending every prediction would create excessive API calls and impact performance. By aggregating predictions and selecting representative samples (most confident per class), the block provides meaningful monitoring data while minimizing overhead. The interval-based reporting ensures regular updates to Model Monitoring without constant API calls.
Common Use Cases¶
π Why Use This Block?¶
This block is a game-changer for projects relying on video processing in Workflows. With its aggregation process, it identifies the most confident predictions across classes and sends them at regular intervals in small messages to Roboflow backend - ensuring that video processing performance is impacted to the least extent.
Perfect for:
-
Monitoring production line performance in real-time π.
-
Debugging and validating your modelβs performance over time β±οΈ.
-
Providing actionable insights from inference workflows with minimal overhead π§.
π¨ Limitations¶
- The block is should not be relied on when running Workflow in
inferenceserver or via HTTP request to Roboflow hosted platform, as the internal state is not persisted in a memory that would be accessible for all requests to the server, causing aggregation to only have a scope of single request. We will solve that problem in future releases if proven to be serious limitation for clients.
Connecting to Other Blocks¶
This block receives predictions and outputs status information:
- After model blocks (Object Detection Model, Instance Segmentation Model, Classification Model, Keypoint Detection Model) to aggregate and report predictions to Model Monitoring (e.g., aggregate detection results, report classification outputs, monitor model predictions), enabling model-to-monitoring workflows
- After filtering or analytics blocks (DetectionsFilter, ContinueIf, OverlapFilter) to aggregate filtered or analyzed results for monitoring (e.g., aggregate filtered detections, report analytics results, monitor processed predictions), enabling analysis-to-monitoring workflows
- In video processing workflows to efficiently monitor video analysis with minimal performance impact (e.g., aggregate video frame detections, report video processing results, monitor video analysis performance), enabling video monitoring workflows
- After preprocessing or transformation blocks to monitor transformed predictions (e.g., aggregate transformed detections, report processed results, monitor transformation outputs), enabling transformation-to-monitoring workflows
- In production deployment workflows to track model performance in production environments (e.g., monitor production inference, track deployment performance, report production metrics), enabling production monitoring workflows
- As a sink block to send aggregated monitoring data without blocking workflow execution (e.g., background monitoring reporting, non-blocking analytics, efficient data collection), enabling sink-to-monitoring workflows
Requirements¶
This block requires a valid Roboflow API key configured in the environment or workflow configuration. The API key is required to authenticate with Roboflow API and access Model Monitoring features. Visit https://docs.roboflow.com/api-reference/authentication#retrieve-an-api-key to learn how to retrieve an API key. The block maintains in-memory state for aggregation, which means it works best for long-running workflows (like video processing with InferencePipeline). The block should not be relied upon when running workflows in inference server or via HTTP requests to Roboflow hosted platform, as the internal state is only accessible for single requests and aggregation scope is limited to single request execution. The block aggregates data for all video feeds connected to a single InferencePipeline process (cannot separate aggregations per video feed). The frequency parameter must be at least 1 second. For more information on Model Monitoring at Roboflow, see https://docs.roboflow.com/deploy/model-monitoring.
Type identifier¶
Use the following identifier in step "type" field: roboflow_core/model_monitoring_inference_aggregator@v1to add the block as
as step in your workflow.
Properties¶
| Name | Type | Description | Refs |
|---|---|---|---|
name |
str |
Enter a unique identifier for this step.. | β |
frequency |
int |
Reporting frequency in seconds. Specifies how often aggregated predictions are sent to Roboflow Model Monitoring. For example, if set to 5, the block collects predictions for 5 seconds, then sends the aggregated sample (one most confident prediction per class) to Model Monitoring. Must be at least 1 second. Lower values provide more frequent updates but increase API calls. Higher values reduce API calls but provide less frequent updates. Default: 5 seconds. Works well for video processing where you want regular but not excessive reporting.. | β |
unique_aggregator_key |
str |
Unique key used internally to track the aggregation session and cache last report time. This key must be unique for each instance of this block in your workflow. The key is used to create cache entries that track when the last report was sent, enabling interval-based reporting. This field is automatically generated and hidden in the UI.. | β |
fire_and_forget |
bool |
Execution mode flag. When True (default), the block runs asynchronously in the background, allowing the workflow to continue processing without waiting for the API call to complete. This provides faster workflow execution but errors are not immediately available. When False, the block runs synchronously and waits for the API call to complete, returning immediate status and error information. Use False for debugging and error handling, True for production workflows where performance is prioritized.. | β |
The Refs column marks possibility to parametrise the property with dynamic values available
in workflow runtime. See Bindings for more info.
Runtime compatibility¶
-
requires_internetβ air-gapped / offline deployments - This block depends on a service that is not reachable from fully offline / air-gapped deployments.
-
softβ runtimehosted_serverless,dedicated_deployment; executionremote; inputvideo - Aggregation buffers are stored in process memory while the reporting interval is tracked in cache. With remote step execution on stateless or multi-replica HTTP runtimes, predictions may be collected by different worker processes, so reports can under-collect or flush partial aggregation windows. Use local step execution in an InferencePipeline for stable video aggregation.
-
softβ inputimage - Block depends on temporal context from video or repeated-frame workflows. With a still image/photo, there is no meaningful history to track, compare, aggregate, or visualize, so the block provides little or no benefit.
Available Connections¶
Compatible Blocks
Check what blocks you can connect to Model Monitoring Inference Aggregator in version v1.
- inputs:
PLC Writer,Track Class Lock,Byte Tracker,Mask Edge Snap,Path Deviation,VLM As Detector,Object Detection Model,Roboflow Visual Search Classifier,Detections Stabilizer,Qwen3.5-VL,Webhook Sink,Semantic Segmentation Model,VLM As Classifier,Motion Detection,SAM 3 Interactive,Keypoint Detection Model,YOLO-World Model,OC-SORT Tracker,Slack Notification,MoonshotAI Kimi,PLC Reader,Stitch OCR Detections,Instance Segmentation Model,S3 Sink,Keypoint Detection Model,Email Notification,Velocity,BoT-SORT Tracker,Detection Event Log,Single-Label Classification Model,OPC UA Writer Sink,CSV Formatter,Path Deviation,Detection Offset,Qwen-VL,JSON Parser,Bounding Rectangle,Seg Preview,Google Gemini,Roboflow Custom Metadata,LMM For Classification,PP-OCR,SIFT Comparison,Object Detection Model,Local File Sink,Llama 3.2 Vision,SAM3 Video Tracker,Llama 3.2 Vision,Dynamic Zone,SAM2 Video Tracker,Google Vision OCR,Google Gemma API,Detections Filter,Google Gemma,Microsoft SQL Server Sink,Detections Transformation,Identify Changes,Twilio SMS/MMS Notification,OpenAI,Object Detection Model,Keypoint Detection Model,Clip Comparison,OpenAI,Qwen 3.6 API,Instance Segmentation Model,Single-Label Classification Model,Moondream2,Nearest Neighbor Detection Match,OpenAI,Byte Tracker,Instance Segmentation Model,OpenAI-Compatible LLM,Roboflow Visual Search,VLM As Detector,Multi-Label Classification Model,Frame Delay,Roboflow Dataset Upload,OpenAI,Anthropic Claude,Google Gemini,Detections Stitch,Event Writer,Stitch OCR Detections,CogVLM,Time in Zone,VLM As Classifier,Email Notification,Current Time,Template Matching,Mask Area Measurement,Perspective Correction,Detections List Roll-Up,Semantic Segmentation Model,Overlap Filter,Multi-Label Classification Model,Dynamic Crop,OpenRouter,Detections Consensus,OCR Model,Per-Class Confidence Filter,Time in Zone,Time in Zone,Roboflow Asset Library Attributes,Multi-Label Classification Model,LMM,Detections Combine,SIFT Comparison,SAM 3,ByteTrack Tracker,GLM-OCR,EasyOCR,Florence-2 Model,Google Gemini,Roboflow Dataset Upload,Segment Anything 2 Model,Qwen 3.5 API,MoonshotAI Kimi,SAM 3,Line Counter,Instance Segmentation Model,Detections Merge,Google Gemini,Detections Classes Replacement,Model Monitoring Inference Aggregator,Single-Label Classification Model,Roboflow Vision Events,Twilio SMS Notification,Cosmos 3,MQTT Writer,SAM 3,Anthropic Claude,SORT Tracker,Gaze Detection,Anthropic Claude,PTZ Tracking (ONVIF),Florence-2 Model,Identify Outliers,Byte Tracker - outputs:
PLC Writer,Image Blur,Path Deviation,Crop Visualization,Object Detection Model,Polygon Visualization,Roboflow Visual Search Classifier,Qwen3.5-VL,CLIP Embedding Model,Webhook Sink,Motion Detection,SAM 3 Interactive,Keypoint Detection Model,YOLO-World Model,Slack Notification,Label Visualization,MoonshotAI Kimi,Stitch OCR Detections,Label Visualization,Instance Segmentation Model,S3 Sink,Perception Encoder Embedding Model,Email Notification,Keypoint Detection Model,BoT-SORT Tracker,Pixel Color Count,Single-Label Classification Model,OPC UA Writer Sink,Ellipse Visualization,Path Deviation,Corner Visualization,Triangle Visualization,Qwen-VL,Distance Measurement,Camera Calibration,Google Gemini,Seg Preview,Polygon Zone Visualization,Roboflow Custom Metadata,LMM For Classification,SIFT Comparison,Trace Visualization,Object Detection Model,Color Visualization,Local File Sink,Llama 3.2 Vision,SAM3 Video Tracker,Llama 3.2 Vision,Dynamic Zone,Morphological Transformation,Google Vision OCR,Google Gemma API,Google Gemma,Microsoft SQL Server Sink,Polygon Visualization,Icon Visualization,Rich Label Visualization,Twilio SMS/MMS Notification,Keypoint Visualization,OpenAI,Object Detection Model,Keypoint Detection Model,OpenAI,Clip Comparison,Qwen 3.6 API,Instance Segmentation Model,Single-Label Classification Model,Mask Visualization,Moondream2,Nearest Neighbor Detection Match,OpenAI,OpenAI-Compatible LLM,Instance Segmentation Model,Roboflow Visual Search,Stability AI Outpainting,Blur Visualization,Multi-Label Classification Model,Bounding Box Visualization,Roboflow Dataset Upload,Reference Path Visualization,OpenAI,Anthropic Claude,Google Gemini,Detections Stitch,Event Writer,Cache Set,Stitch OCR Detections,CogVLM,Time in Zone,Email Notification,Current Time,Template Matching,Perspective Correction,Halo Visualization,Semantic Segmentation Model,Multi-Label Classification Model,Cache Get,OpenRouter,Dynamic Crop,Detections Consensus,Halo Visualization,Line Counter Visualization,Time in Zone,Time in Zone,Roboflow Asset Library Attributes,Multi-Label Classification Model,Size Measurement,LMM,Depth Estimation,SAM 3,Dot Visualization,GLM-OCR,Florence-2 Model,Background Color Visualization,Google Gemini,Roboflow Dataset Upload,Segment Anything 2 Model,Qwen 3.5 API,MoonshotAI Kimi,Stability AI Inpainting,Contrast Equalization,Morphological Transformation,Image Threshold,SAM 3,Line Counter,Stability AI Image Generation,Instance Segmentation Model,Circle Visualization,QR Code Generator,Google Gemini,Detections Classes Replacement,Roboflow Vision Events,Model Monitoring Inference Aggregator,Single-Label Classification Model,Heatmap Visualization,Twilio SMS Notification,Cosmos 3,Auto Rotate on Edges,MQTT Writer,SAM 3,Anthropic Claude,Image Preprocessing,Gaze Detection,Line Counter,Anthropic Claude,Text Display,Image Stack,PTZ Tracking (ONVIF),Model Comparison Visualization,Florence-2 Model,Classification Label Visualization,Pixelate Visualization
Input and Output Bindings¶
The available connections depend on its binding kinds. Check what binding kinds
Model Monitoring Inference Aggregator in version v1 has.
Bindings
-
input
predictions(Union[instance_segmentation_prediction,keypoint_detection_prediction,classification_prediction,object_detection_prediction]): Model predictions (object detection, instance segmentation, keypoint detection, or classification) to aggregate and report to Roboflow Model Monitoring. Predictions are collected in memory, grouped by class name, and the most confident prediction per class is selected as a representative sample. Predictions accumulate between reporting intervals based on the frequency setting. Supported prediction types: supervision Detections objects or classification prediction dictionaries..model_id(roboflow_model_id): Roboflow model ID (format: 'project/version') to associate with the predictions in Model Monitoring. This identifies which model generated the predictions being reported. The model ID is included in the monitoring data sent to Roboflow, allowing you to track performance per model in the Model Monitoring dashboard..frequency(string): Reporting frequency in seconds. Specifies how often aggregated predictions are sent to Roboflow Model Monitoring. For example, if set to 5, the block collects predictions for 5 seconds, then sends the aggregated sample (one most confident prediction per class) to Model Monitoring. Must be at least 1 second. Lower values provide more frequent updates but increase API calls. Higher values reduce API calls but provide less frequent updates. Default: 5 seconds. Works well for video processing where you want regular but not excessive reporting..fire_and_forget(boolean): Execution mode flag. When True (default), the block runs asynchronously in the background, allowing the workflow to continue processing without waiting for the API call to complete. This provides faster workflow execution but errors are not immediately available. When False, the block runs synchronously and waits for the API call to complete, returning immediate status and error information. Use False for debugging and error handling, True for production workflows where performance is prioritized..
-
output
Example JSON definition of step Model Monitoring Inference Aggregator in version v1
{
"name": "<your_step_name_here>",
"type": "roboflow_core/model_monitoring_inference_aggregator@v1",
"predictions": "$steps.object_detection.predictions",
"model_id": "my_project/3",
"frequency": 3,
"unique_aggregator_key": "session-1v73kdhfse",
"fire_and_forget": true
}