> 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, or webcam, run only the part of a video you ask for, watch live previews, auto-fix failures, investigate run errors, and draw detection zones.
* 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.
* 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.

### 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.

## 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), then publish them when ready. All edits are saved as drafts until you explicitly publish.

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-fe7368626d50bfa1cbdc6309c07567b2b9391c85%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-fe7368626d50bfa1cbdc6309c07567b2b9391c85%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-fe7368626d50bfa1cbdc6309c07567b2b9391c85%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-fe7368626d50bfa1cbdc6309c07567b2b9391c85%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>
