> For the complete documentation index, see [llms.txt](https://docs.roboflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roboflow.com/agents/roboflow-agent.md).

# Roboflow Agent

The in-app Roboflow Agent that builds, runs, and debugs Workflows and Rapid models, plus its HTTP chat API.

## About

Roboflow Agent has access to your [Workspace](/platform/workspaces/key-concepts.md) and can create, edit, run, and debug [Workflows](https://docs.roboflow.com/workflows). You can also use it to set up [Rapid](https://docs.roboflow.com/models/rapid/rapid) models. Access the Agent by clicking "Agent" in the left sidebar of your workspace.

<figure><img src="https://4160767428-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1YMZNIiZMBdlCHUDeZMP%2Fuploads%2Fgit-blob-e08163ee75bce9853bb94d3581efc5910405e091%2Frf-agent.png?alt=media" alt=""><figcaption></figcaption></figure>

### Capabilities

The Agent can work with:

* [Workflows](https://docs.roboflow.com/workflows): build from a plain description, run on images, RTSP streams, video, your browser webcam, or your phone camera, run only the part of a video you ask for, watch live previews, auto-fix failures, investigate run errors, and draw detection zones. To add a camera, pick "Webcam", "Network Streams", or "Phone" when the Agent asks. A webcam or phone stream stops when its browser session ends.
* Attached media: analyze images and MP4 or MOV videos you drop into the chat, and build and verify Workflows with them.
* Image generation: create 1 to 10 images from a text description when you have no photos yet. The Agent starts when you ask it to generate. Ask for a price first if you want an estimate. Each image is saved to your [Asset Library](/platform/workspaces/asset-library.md), and you pay only for the images that are saved. The Agent cannot use your own images as a reference.
* [Rapid](https://docs.roboflow.com/models/rapid/rapid) models: set up, manage, and diagnose training failures.
* [Workflow Evals](https://docs.roboflow.com/workflows/evaluate/workflow-evals): create an Eval, review and approve ground truth in the chat, run and compare Workflows, and explain the results. The Agent asks before it starts a Run that costs credits. It can save the best Workflow as an unpublished draft.
* Projects: [create projects](https://docs.roboflow.com/datasets/create-and-upload/create-a-project#create-a-project-from-the-agent), start [model training](https://docs.roboflow.com/models/train/train-a-model#train-from-the-agent), [rebalance splits](https://docs.roboflow.com/datasets/versions/dataset-versions/create-a-dataset-version#readjusting-train-validation-test-splits), and [merge projects](https://docs.roboflow.com/datasets/manage/merge-datasets).
* Universe datasets: find public datasets on [Universe](https://docs.roboflow.com/datasets/universe/universe/what-is-roboflow-universe), compare them, and [copy a whole dataset or a set number of images](https://docs.roboflow.com/datasets/universe/universe/fork-a-universe-dataset#roboflow-agent) into a project. You agree on sources, image counts, and class changes in the chat before the Agent copies anything.
* Datasets: [browse images by labeling stage](https://docs.roboflow.com/datasets/annotate/annotate/team-collaboration#browse-labeling-work-from-the-agent), [add workspace images to a model and start labeling them](https://docs.roboflow.com/datasets/annotate/annotate/team-collaboration#add-images-and-start-annotating), send a batch to review or back for edits, approve or reject images in Review (after you confirm the jobs and image count), accept images into the dataset, and return work to unassigned.
* [Batch Processing](https://docs.roboflow.com/deployment/roboflow-cloud/batch-processing): run a published Workflow over images in your Asset Library, set up a new job with you in the chat, list your jobs, and report the status of one.
* [Active Learning](https://docs.roboflow.com/deployment/monitoring-and-analytics/active-learning): turn collection on or off per project and edit its limits and conditions.
* [Vision Events](https://docs.roboflow.com/deployment/monitoring-and-analytics/vision-events): add blocks to Workflows, [answer questions about your event data](https://docs.roboflow.com/deployment/monitoring-and-analytics/vision-events/query-events), and schedule [Summary Reports](https://docs.roboflow.com/deployment/monitoring-and-analytics/vision-events/summary-reports).
* Usage: show your [Credit Usage Dashboard](/platform/billing-and-plans/credits/view-credit-usage.md) with filters matching your question.
* Edge devices: answer questions with read-only access to your [Deployment Manager](https://docs.roboflow.com/deployment/self-hosted/enterprise/deployment-manager) fleet, telemetry, logs, and streams.
* Tabs: organize open Workflows, models, projects, and usage views; drag to reorder; reopen closed items or create new ones from the "+" tab.

### Add Media

Drop files anywhere in the chat to give them to the Agent. You can also paste them, or click the paperclip in the chat box and pick "Attach Files" or "Attach Folder". On the home page, click "+" and pick "Attach Files". Folders expand into the files inside them. A zip file expands only when you drop it, up to 300 files. For a larger zip, use the [Upload Data page](https://docs.roboflow.com/datasets/create-and-upload/adding-data#upload-a-zip-file).

To take photos, interval frames, or an MP4 clip with your webcam, click the paperclip or "+" and pick "Use Camera". When the Agent asks for media, its request also has a "Use Camera" button. After you record a clip, click "Keep Video". Then click the add button (ex: "Add 3 to Message", "Add Video to Message") to attach the captures to your next message.

The upload starts when you send the message and runs in the background, so you can keep chatting. A card in the chat shows the progress and a "Cancel" button, and the upload also appears in the Background Tasks panel. Images and videos go to your [Asset Library](/platform/workspaces/asset-library.md).

Uploads with annotation files, or with images in two or more folders, wait for a destination instead of starting right away. The Agent sends them to a model or your Workspace, and asks first if your message leaves the destination open. In a model, folder names (ex: `train`, `valid`, `test`) set the splits. Files with no split from their folders or annotations default to 70% train, 20% validation, and 10% test.

### Cloud Streaming

Ask the Agent to connect a camera, select an existing source, and preview a Workflow draft with [Cloud Streaming](https://docs.roboflow.com/deployment/roboflow-cloud/cloud-streaming). Use "Network Streams" for a connector on the camera's network, or "Webcam" and "Phone" for a temporary browser session.

To keep an eligible camera preview running, explicitly ask to deploy it. Promotion preserves the current snapshot, runtime state, and sink settings without publishing or restarting. A temporary webcam or phone session cannot be promoted. To apply later edits, explicitly ask to update the deployment; publishing alone does not change the running job.

Name the Workflow or job when asking to stop it. Disconnecting a preview or closing chat does not stop a separate continuous deployment. Follow the [Agent quickstart](https://docs.roboflow.com/deployment/roboflow-cloud/cloud-streaming/quickstart#roboflow-agent) for the full journey and its billing and lifetime limits. These in-app actions are not standalone public SDK methods.

### Background Tasks

Long jobs the Agent starts keep running while you chat: model training, Universe dataset copies, auto-labeling, dataset version generation, project merges, class remaps, split rebalances, and Batch Processing jobs. A pill above the chat box counts the running ones. Click it, or click "Background Tasks" in the left menu, to open a panel that lists them under "Running" and "Finished". Click a task to open the page it created.

The Agent tells you in the chat when a task finishes, even if you closed the tab and came back later. Only jobs started from inside a conversation appear here. A training you start elsewhere in the app or through the API does not, and you track it in the Activity Center instead.

### Workspace LLM Keys

You can run the Agent on your own OpenAI or Azure OpenAI key, so your data does not go through Roboflow's LLM keys. This also covers the Workflow editor assistant, the custom block assistant, and the Agent API.

{% hint style="info" %}
Roboflow must turn this feature on for your Workspace. Contact your account team to request it. It is not available in the EU region.
{% endhint %}

1. In your Workspace settings, click "Third Party Keys".
2. Add your OpenAI API key, or your Azure OpenAI "Resource Name" and "Azure OpenAI API Key".
3. In "Workspace LLM Keys", pick a "Provider" and "Model". For Azure OpenAI, also enter the "Deployment Name" and "Model Behind This Deployment".
4. Click "Test Connection".
5. Turn on "Enforce Workspace LLM Keys", then click "Save".

When this is on, every request uses your key. If your key fails, the request stops with an error and never falls back to Roboflow's keys. Workflow OpenAI and Gemini blocks run on your Workspace keys, and AI features that cannot (ex: other LLM blocks) are turned off. Conversation traces are not recorded, and LLM cost is not charged as credits.

Image generation is turned off while "Enforce Workspace LLM Keys" is on.

Workflow OpenAI blocks and Auto Label use the "OpenAI API Key" under "Third Party Keys". To run them on your Azure OpenAI resource, enter your Azure key there and fill in "Azure OpenAI Endpoint" (ex: `https://my-resource.openai.azure.com`). In Azure, name each deployment after the model it runs (ex: `gpt-6-astra`). Without an OpenAI API key, the Agent cannot add OpenAI blocks to your Workflows.

{% hint style="info" %}
The Agent runs on the model you pick, so it can behave differently than it does on Roboflow's keys. Some tasks may work differently or give different results, depending on what that model supports.
{% endhint %}

## HTTP API

The Agent API lets you interact with the Roboflow AI agent through `api.roboflow.com`. You can send natural-language instructions to create or edit [Workflows](https://docs.roboflow.com/workflows/build/create-a-workflow). A Workflow the agent creates is live right away. An edit publishes right away when the Workflow is set to Auto-publish, and stays a draft until you publish it when the Workflow is Protected.

Authentication is via [API key](https://docs.roboflow.com/reference/platform/rest-api/authenticate-with-the-rest-api). If you use a [Scoped API Key](https://docs.roboflow.com/reference/authentication/authentication/scoped-api-keys) with folder restrictions, the agent will only be able to access Workflows and models within that folder scope, and it will not see projects that sit outside a folder. Asking the agent to list workspace models returns only the models the caller can already see.

### Chat

Send a message to the agent. Start a new conversation, or continue one by passing `conversation_id`.

{% openapi src="/files/AJ4ZFCHIBc3AWX3yfVQ3" path="/{workspace}/agent/chat" method="post" %}
[agent-api.yaml](https://4160767428-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1YMZNIiZMBdlCHUDeZMP%2Fuploads%2Fgit-blob-c0a8fd5007c2ed69b13d766f3c42b30ce62a46f4%2Fagent-api.yaml?alt=media)
{% endopenapi %}

### Publish a Workflow

Deploy the latest draft of a Workflow the agent created or edited.

{% openapi src="/files/AJ4ZFCHIBc3AWX3yfVQ3" path="/{workspace}/agent/workflows/{workflowUrl}/publish" method="post" %}
[agent-api.yaml](https://4160767428-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1YMZNIiZMBdlCHUDeZMP%2Fuploads%2Fgit-blob-c0a8fd5007c2ed69b13d766f3c42b30ce62a46f4%2Fagent-api.yaml?alt=media)
{% endopenapi %}

### List Conversations

{% openapi src="/files/AJ4ZFCHIBc3AWX3yfVQ3" path="/{workspace}/agent/conversations" method="get" %}
[agent-api.yaml](https://4160767428-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1YMZNIiZMBdlCHUDeZMP%2Fuploads%2Fgit-blob-c0a8fd5007c2ed69b13d766f3c42b30ce62a46f4%2Fagent-api.yaml?alt=media)
{% endopenapi %}

### Get a Conversation

{% openapi src="/files/AJ4ZFCHIBc3AWX3yfVQ3" path="/{workspace}/agent/conversations/{id}" method="get" %}
[agent-api.yaml](https://4160767428-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1YMZNIiZMBdlCHUDeZMP%2Fuploads%2Fgit-blob-c0a8fd5007c2ed69b13d766f3c42b30ce62a46f4%2Fagent-api.yaml?alt=media)
{% endopenapi %}

## MCP Server

Connect your AI agent to the [MCP Server](/agents/mcp-server.md) and it can hand work to Roboflow Agent with these tools:

<table data-search="false"><thead><tr><th width="290">Tool</th><th>Description</th></tr></thead><tbody><tr><td><code>agent_chat</code></td><td>Chat with the Roboflow AI agent.</td></tr><tr><td><code>agent_chat_result</code></td><td>Collect the result of a run that was still working.</td></tr><tr><td><code>agent_conversations_list</code></td><td>List agent conversations in the workspace.</td></tr><tr><td><code>agent_conversation_get</code></td><td>Get one conversation with its message history.</td></tr><tr><td><code>agent_workflow_publish</code></td><td>Publish the latest agent-edited draft of a Workflow.</td></tr></tbody></table>
