Manage Workflows

List, get, create, update, fork, and delete Roboflow Workflows from the Python SDK.

Roboflow Workflows are visual computer-vision pipelines. The SDK exposes list / get / create directly on Workspace; update, fork, and delete live in the low-level rfapi adapter.

List workflows

import roboflow

rf = roboflow.Roboflow(api_key="YOUR_API_KEY")
workspace = rf.workspace()

workflows = workspace.list_workflows()
for w in workflows:
    print(w["id"], w["name"], w["url"])

Get a workflow

workflow = workspace.get_workflow("slow-webhooks")
print(workflow["specification"])

The url argument is the workflow's slug (visible in the web app's URL bar) — not its Firestore id.

Create a workflow

workflow = workspace.create_workflow(
    name="My Workflow",
    definition={
        "version": "1.0",
        "inputs": [...],
        "steps": [...],
        "outputs": [...],
    },
)
print(workflow["id"], workflow["url"])

Pass definition=None to create an empty workflow shell that you'll edit in the web app afterwards.

The SDK accepts either a bare specification dict ({"version": ..., "steps": ...}) or a wrapped one ({"specification": {...}}); it normalizes the wrapping for you and strips a UTF-8 BOM if present.

Update a workflow

Workspace doesn't expose update directly — use the low-level adapter:

Fork a workflow

Copy a workflow from another workspace into your own. Useful for adopting a public template:

List workflow versions

Delete (soft-delete) a workflow

This moves the workflow to the workspace Trash where it remains for 30 days before permanent cleanup. Restore via Workspace.restore_from_trash("workflow", id) — see Delete and Restore.

Run a workflow

Workflow execution lives in the Inference SDK and the Workflows runtime, not the roboflow package. From Python:

REST and CLI equivalents

Last updated

Was this helpful?