Skip to main content

Workflow-Use

Semantic browser automation with deterministic workflow generation and variables.

Quick Start

1. Test Deterministic Workflow Generation (NEW!)

python examples/scripts/deterministic/run_complete_test.py

Generate workflows without LLM for step creation - 10-100x faster, guaranteed semantic steps.

2. Create Your Own Workflow

from workflow_use.healing.service import HealingService
from browser_use.llm import ChatBrowserUse

llm = ChatBrowserUse(model_name="bu-latest")
service = HealingService(llm=llm, use_deterministic_conversion=True)

workflow = await service.generate_workflow_from_prompt(
    prompt="Go to GitHub, search for browser-use, get star count",
    agent_llm=llm,
    extraction_llm=llm
)

3. Run a Workflow

cd /path/to/workflow-use/workflows
python cli.py run-workflow-no-ai my_workflow.json

# If the workflow has variables, the CLI will prompt you interactively:
# Enter value for repo_name (required, type: string): browser-use

Key Features

🚀 Deterministic Workflow Generation

  • Direct Action Mapping: input_text → input step (no LLM)
  • Guaranteed Semantic Steps: 0 agent steps (instant execution, $0/run)
  • 10-100x Faster: 5-10s vs 20-40s for LLM-based
  • 90% Cheaper: Minimal LLM usage

🎯 Semantic-Only Multi-Strategy Element Finding

  • No CSS/XPath: 100% semantic strategies (text, role, ARIA, placeholder, etc.)
  • 7 Fallback Strategies: text_exact → role_text → aria_label → placeholder → title → alt_text → text_fuzzy
  • Works WITH Browser-Use: Finds element index in DOM state, then uses browser-use's controller
  • Fast & Robust: Direct index lookup when strategies match, falls back to AI when needed
  • Human-Readable: Workflow YAML contains semantic strategies, not brittle selectors

🔄 Variables in Workflows

  • Reusable Workflows: Parameterize dynamic values
  • Semantic Targeting: Use {variable} in target_text
  • Auto-Extraction: LLM suggests variables automatically

📊 Real-time Progress Tracking (NEW!)

  • Step-by-Step Visibility: See each browser action as it's recorded
  • Status Updates: Track workflow processing phases in real-time
  • Cloud Integration Ready: Store progress in database for live UI updates
  • Debug Friendly: Know exactly where workflow generation fails
  • Zero Overhead: Optional callbacks, fully backward compatible
# Track workflow generation progress in real-time
workflow = await service.generate_workflow_from_prompt(
    prompt="Search for Python docs",
    agent_llm=llm,
    extraction_llm=llm,
    on_step_recorded=lambda s: print(f"Step {s['step_number']}: {s['description']}"),
    on_status_update=lambda msg: print(f"Status: {msg}"),
)

Documentation


Project Structure

workflows/
├── workflow_use/              # Main package
│   ├── healing/              # Workflow generation & healing
│   │   ├── deterministic_converter.py   # NEW: Deterministic conversion
│   │   ├── variable_extractor.py        # Auto variable detection
│   │   └── service.py                   # Main workflow generation
│   ├── workflow/             # Workflow execution
│   │   └── semantic_executor.py         # Semantic step execution
│   ├── controller/           # Workflow controller
│   ├── recorder/             # Workflow recording
│   ├── storage/              # Storage logic
│   ├── mcp/                  # MCP integration
│   ├── schema/               # Schema definitions
│   └── builder/              # Workflow builder
│
├── backend/                  # FastAPI backend service
│   ├── api.py               # API entry point
│   ├── routers.py           # API routes
│   └── service.py           # Business logic
│
├── examples/                 # Examples organized by feature
│   ├── scripts/
│   │   ├── deterministic/   # Deterministic workflow examples
│   │   │   ├── run_complete_test.py        # ⭐ Test deterministic generation
│   │   │   └── create_deterministic_workflow.py
│   │   ├── variables/       # Variable feature examples
│   │   ├── demos/           # Advanced demos
│   │   └── runner.py        # Generic workflow runner
│   ├── progress_tracking_example.py  # ⭐ NEW: Real-time progress tracking
│   └── workflows/           # Example workflow JSON files
│       ├── basic/           # Basic workflow examples
│       ├── form_filling/    # Form filling examples
│       ├── parameterized/   # Parameterized workflows
│       └── advanced/        # Advanced workflows
│
├── tests/                    # Test files
│   ├── test_button_click.py
│   └── test_recorded_workflow.py
│
├── docs/                     # Documentation
│   ├── DETERMINISTIC.md     # Deterministic workflows
│   └── VARIABLES.md         # Variables guide
│
├── data/                     # Runtime & test data
│   └── test_data/           # Test data (tracked in git)
│       ├── form-filling/
│       └── flight-test/
│
├── cli.py                   # CLI entry point
├── pyproject.toml          # Project configuration
└── README.md               # This file

Comparison: Deterministic vs LLM-Based

Feature Deterministic LLM-Based
Generation Speed ⚡ 5-10s 🐌 20-40s
Generation Cost 💰 $0.01-0.05 💸 $0.10-0.30
Agent Steps ✅ 0 guaranteed ❌ Variable
Deterministic ✅ Yes ❌ No
Execution Speed ⚡ Instant 🐌 5-45s
Execution Cost 💰 $0/run 💸 $0.03-0.30/run

Recommendation: Use deterministic for most workflows (search, click, input, navigate).


Testing

# Test deterministic generation
python examples/scripts/deterministic/run_complete_test.py

# Test variables
python examples/scripts/variables/create_workflow_with_variables.py

# Compare approaches
python examples/scripts/deterministic/test_deterministic_workflow.py

Next Steps

  1. ✅ Run examples/run_complete_test.py
  2. ✅ Review the generated workflow JSON
  3. ✅ Try creating your own workflow
  4. ✅ Add variables to make it reusable

Metadata

Release files for workflow-use 0.2.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for workflow-use 0.2.11
File Size Uploaded
workflow_use-0.2.11.tar.gz 156.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for workflow-use 0.2.11
File Interpreter ABI Platform
workflow_use-0.2.11-py3-none-any.whl Python 3 none any Details

Total release size: 338.0 kB

Release files / workflow_use-0.2.11.tar.gz

Download URL workflow_use-0.2.11.tar.gz
Size 156.4 kB
Tags Source
SHA-256 checksum
How to use checksums
43d6f9647905768be21f0909395fd65c374bd65001425c13a956de7660f3c5e7
BLAKE2b-256 checksum
How to use checksums
3fa56d677abe9955720087ab07a289a530b0cd03e5fd3e0a33bbd376ec419fd4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / workflow_use-0.2.11-py3-none-any.whl

Download URL workflow_use-0.2.11-py3-none-any.whl
Size 181.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3e805310450ac3d340733c26830274296b1e5ee4d2c6c1b699569e85e49f652b
BLAKE2b-256 checksum
How to use checksums
59573b99f6811e9b23c273935eaf6a99ee90e172261ce494a511ac33c1209c13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.2.11 This release

2 release files

0.2.10

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page