# Vision Events

## Overview

Vision Events is a Roboflow datastore that can capture important events, like the detection of defect or a count of inventory, alongside visual information from your deployed computer vision model. This gives you a searchable, filterable history of everything your vision system observes in production.

## What is a Vision Event?

A Vision Event is a timestamped record created when a model processes an image. Each event can optionally capture:

* **Images**: The original images that was processed and associated output images
* **Predictions**: Object detections, classifications, instance segmentations, or keypoints returned by the model
* **Source metadata**: Which device, stream, or workflow generated the event
* **Custom metadata**: Key-value pairs you define for your domain (e.g. `line_number`, `shift`, `part_number`)

For programmatic access, see the [Vision Events API Reference](https://docs.roboflow.com/developer/rest-api/vision-events).

{% embed url="<https://www.youtube.com/watch?v=4HlYG1MacRk>" %}

## Key Concepts

### Use Cases

A **Use Case** groups events that share a common purpose and custom metadata structure. Events in the same Use Case typically send similar metadata fields so you can filter and query them consistently.

For example, a "Defect Detection" Use Case might always include `line_id`, `shift`, and `part_number` even if events come from multiple factories or camera locations. Create separate Use Cases when the metadata structure is fundamentally different (e.g. "PPE Compliance" tracks `zone` and `alert_type` instead).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.roboflow.com/deploy/vision-events.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
