# Kinds

In Workflows, some values can’t be set in advance and are only determined during execution. 
This is similar to writing a function where you don’t know the exact input values upfront — they’re only 
provided at runtime, either from user inputs or from other function outputs. 

To manage this, Workflows use *selectors*, which act like references, pointing to data without containing it directly. 

!!! example "selectors"

    Selectors might refer to a named input - for example input image - like `$inputs.image` 
    or predictions generated by a previous step - like `$steps.my_model.predictions`

In the Workflows ecosystem, users focus on data purpose (e.g., “image”) without worrying about its exact format. 
Meanwhile, developers building workflow blocks need precise data formats. **Kinds** serve both needs -
they simplify data handling for users while ensuring developers work with the correct data structure.


## What are the **Kinds**?

**Kinds** is Workflows type system with each **kind** defining:

* **name** - expressing **semantic meaning** of the underlying data - like `image` or `point`;

* **Python data representation** - the data type and format that blocks creators should expect when handling 
the data within blocks;

* optional **serialized data representation** - defining what is the format of the kind that 
external systems should use to integrate with Workflows ecosystem - when needed, custom kinds serializers
and deserializers are provided to ensure seamless translation; 

Using kinds streamlines compatibility: when a step outputs data of a certain *kind* and another step requires that 
same *kind*, the workflow engine assumes they’ll be compatible, reducing the need for compatibility checks and 
providing compile-time verification of Workflows definitions.


!!! Note

    As for now, `kinds` are such simplistic that do not support types polymorphism - and developers
    are asked to use unions of kinds to solve that problem. As defining extensive unions of kinds may be 
    problematic, this problem will probably be addressed in Execution Engine `v2`.

!!! Warning

    In `inference` release `0.18.0` we decided to make drastic move to heal the ecosystem 
    from the problem with ambiguous kinds names (`Batch[X]` vs `X` - see more 
    [here](https://github.com/roboflow/inference/issues/608)). 

    The change is breaking only if there is remote Workflow plugin depending on imports
    from `inference.core.workflows.execution_engine.entities.types` module, which is
    not the case to the best of our knowledge. We removed problematic kinds as if they
    never existed in the ecosystem and fixed all blocks from `roboflow_core` plugin.
    If there is anyone impacted by the change - here is the 
    [migration guide](https://github.com/roboflow/inference/releases/tag/v0.18.0).

    This warning **will be removed end of Q1 2025**.
 

!!! Warning

    Support for proper serialization and deserialization of any arbitrary *kind* was 
    introduced in Execution Engine `v1.3.0` (released with inference `0.26.0`). Workflows
    plugins created prior that change may be updated - see refreshed 
    [Blocks Bundling](/workflows/blocks_bundling.md) page.

    This warning **will be removed end of Q1 2025**.


## Kinds declared in Roboflow plugins
<!--- AUTOGENERATED_KINDS_LIST -->
* [`*`](../kinds/wildcard.md): Equivalent of any element
* [`ROBOFLOW_MANAGED_KEY`](../kinds/roboflow_managed_key.md): Roboflow-managed key or credential
* [`bar_code_detection`](../kinds/bar_code_detection.md): Prediction with barcode detection
* [`boolean`](../kinds/boolean.md): Boolean flag
* [`bytes`](../kinds/bytes.md): This kind represent bytes
* [`classification_prediction`](../kinds/classification_prediction.md): Predictions from classifier
* [`contours`](../kinds/contours.md): List of numpy arrays where each array represents contour points
* [`detection`](../kinds/detection.md): Single element of detections-based prediction (like `object_detection_prediction`)
* [`dictionary`](../kinds/dictionary.md): Dictionary
* [`embedding`](../kinds/embedding.md): A list of floating point numbers representing a vector embedding.
* [`float_zero_to_one`](../kinds/float_zero_to_one.md): `float` value in range `[0.0, 1.0]`
* [`float`](../kinds/float.md): Float value
* [`image_keypoints`](../kinds/image_keypoints.md): Image keypoints detected by classical Computer Vision method
* [`image_metadata`](../kinds/image_metadata.md): Dictionary with image metadata required by supervision
* [`image`](../kinds/image.md): Image in workflows
* [`inference_id`](../kinds/inference_id.md): Inference identifier
* [`instance_segmentation_prediction`](../kinds/instance_segmentation_prediction.md): Prediction with detected bounding boxes and segmentation masks in form of sv.Detections(...) object
* [`integer`](../kinds/integer.md): Integer value
* [`keypoint_detection_prediction`](../kinds/keypoint_detection_prediction.md): Prediction with detected bounding boxes and detected keypoints in form of sv.Detections(...) object
* [`language_model_output`](../kinds/language_model_output.md): LLM / VLM output
* [`list_of_values`](../kinds/list_of_values.md): List of values of any type
* [`numpy_array`](../kinds/numpy_array.md): Numpy array
* [`object_detection_prediction`](../kinds/object_detection_prediction.md): Prediction with detected bounding boxes in form of sv.Detections(...) object
* [`parent_id`](../kinds/parent_id.md): Identifier of parent for step output
* [`point`](../kinds/point.md): Single point in 2D
* [`prediction_type`](../kinds/prediction_type.md): String value with type of prediction
* [`qr_code_detection`](../kinds/qr_code_detection.md): Prediction with QR code detection
* [`rgb_color`](../kinds/rgb_color.md): RGB color
* [`roboflow_api_key`](../kinds/roboflow_api_key.md): Roboflow API key
* [`roboflow_model_id`](../kinds/roboflow_model_id.md): Roboflow model id
* [`roboflow_project`](../kinds/roboflow_project.md): Roboflow project name
* [`roboflow_solution`](../kinds/roboflow_solution.md): Roboflow Vision Events use case identifier
* [`secret`](../kinds/secret.md): Secret value
* [`semantic_segmentation_prediction`](../kinds/semantic_segmentation_prediction.md): Prediction with per-pixel class label and confidence for semantic segmentation
* [`serialised_payloads`](../kinds/serialised_payloads.md): Serialised element that is usually accepted by sink
* [`string`](../kinds/string.md): String value
* [`timestamp`](../kinds/timestamp.md): Timestamp object
* [`top_class`](../kinds/top_class.md): String value representing top class predicted by classification model
* [`video_metadata`](../kinds/video_metadata.md): Video image metadata
* [`zone`](../kinds/zone.md): Definition of polygon zone
<!--- AUTOGENERATED_KINDS_LIST -->

<style>
/* hide edit button for generated pages */
article > a.md-content__button.md-icon:first-child {
    display: none;
}
</style>