> ## Documentation Index
> Fetch the complete documentation index at: https://visionagents.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Roboflow

[Roboflow](https://roboflow.com) provides computer vision tools for object detection. The plugin offers both cloud-hosted inference (access to pre-trained models from [Roboflow Universe](https://universe.roboflow.com/)) and local RF-DETR models.

> [!NOTE]
>
> Vision Agents uses [Stream Video](https://getstream.io/video/) for real-time WebRTC transport by default. [External WebRTC transports](https://visionagents.ai/integrations/introduction-to-integrations.md#edge-transport) are supported as well. Most AI providers offer free tiers to get started.

## Installation

```sh theme={null}
uv add "vision-agents[roboflow]"
```

## Cloud Detection

Uses Roboflow's hosted API with pre-trained models.

```python theme={null}
from vision_agents.core import Agent, User
from vision_agents.plugins import roboflow, gemini, getstream

agent = Agent(
    edge=getstream.Edge(),
    agent_user=User(name="Assistant", id="agent"),
    instructions="You are a sports analyst.",
    llm=gemini.Realtime(fps=10),
    processors=[
        roboflow.RoboflowCloudDetectionProcessor(
            model_id="football-players-detection-3zvbc/20",
            classes=["player"],
            conf_threshold=0.5,
        )
    ],
)
```

> [!WARNING]
>
> Set `ROBOFLOW_API_KEY` in your environment or pass `api_key` directly.

| Name | Type | Default | Description |
| - | - | - | - |
| `model_id` | `str` | — | Roboflow Universe model ID |
| `classes` | `List[str]` | `None` | Classes to detect (or all if `None`) |
| `conf_threshold` | `float` | `0.5` | Confidence threshold |
| `fps` | `int` | `5` | Frame processing rate |
| `annotate` | `bool` | `True` | Draw bounding boxes |

## Local Detection

Runs RF-DETR models locally without API calls.

```python theme={null}
processor = roboflow.RoboflowLocalDetectionProcessor(
    model_id="rfdetr-base",
    classes=["person"],
    conf_threshold=0.5,
)
```

| Name | Type | Default | Description |
| - | - | - | - |
| `model_id` | `str` | `"rfdetr-seg-preview"` | RF-DETR model (`"rfdetr-nano"`, `"rfdetr-base"`, `"rfdetr-large"`) |
| `classes` | `List[str]` | `None` | Classes to detect |
| `conf_threshold` | `float` | `0.5` | Confidence threshold |

## Cloud vs Local

| | Cloud | Local |
| - | - | - |
| **Use when** | Access to Roboflow Universe models | Higher throughput, avoid rate limits |
| **Pros** | Thousands of pre-trained models, no GPU required | No API costs, lower latency, works offline |
| **Cons** | Requires API key, potential rate limits | Requires local compute, RF-DETR models only |

## Next Steps

> [card] [Build a Voice Agent](https://visionagents.ai/introduction/voice-agents.md)
>
> Get started with voice

> [card] [Build a Video Agent](https://visionagents.ai/introduction/video-agents.md)
>
> Add video processing


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.