Skip to content

Latest commit

Β 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Vision-Language-Action Agent Framework

A multi-domain, LLM-driven web automation framework that converts natural language instructions into executable browser actions. Built on Playwright for browser control and Ollama (qwen3:8b) for on-device LLM inference, the system supports authenticated CRUD operations, cross-domain task chaining, memory persistence, and Human-in-the-Loop (HITL) escalation.


Architecture Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     USER / CLI / DEMO INTERFACE                     β”‚
β”‚         interactive_vla_demo.py  β”‚  composite_orchestrator_v3.py    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                      ORCHESTRATION LAYER                            β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚  Composite   β”‚  β”‚   Domain     β”‚  β”‚  HITL Escalation Engine   β”‚ β”‚
β”‚  β”‚  Decomposer  β”‚  β”‚   Router     β”‚  β”‚  (missing var / failed    β”‚ β”‚
β”‚  β”‚  (LLM plan)  β”‚  β”‚              β”‚  β”‚   extraction / step fail) β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚         β–Ό                 β–Ό                        β–Ό                β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚                   VLA UNIFIED AGENT (v1.3)                     β”‚ β”‚
β”‚  β”‚  Instruction β†’ DOM Extraction β†’ LLM Plan β†’ Action β†’ Verify    β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚       β–Ό                β–Ό                  β–Ό                         β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”              β”‚
β”‚  β”‚   LLM    β”‚   β”‚    DOM     β”‚   β”‚  Action Executor  β”‚              β”‚
β”‚  β”‚  Ollama  β”‚   β”‚ Extraction β”‚   β”‚   (Playwright)    β”‚              β”‚
β”‚  β”‚ qwen3:8b β”‚   β”‚ data-vla-idβ”‚   β”‚ click/type/scroll β”‚              β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                        SUPPORT LAYERS                               β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚  Memory    β”‚  β”‚  Extraction   β”‚  β”‚  CRUD Engines               β”‚ β”‚
β”‚  β”‚  Manager   β”‚  β”‚  Verifier +   β”‚  β”‚  Forum (Postmill)           β”‚ β”‚
β”‚  β”‚  (JSON)    β”‚  β”‚  Retry Logic  β”‚  β”‚  GitLab                     β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                    LOCAL ADVERSARIAL DOMAINS                         β”‚
β”‚           Store (port 8001)  β”‚  Booking (port 8002)                 β”‚
β”‚           Forum (port 9999)  β”‚  GitLab  (port 8023)                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Supported Domains

Domain URL Capabilities
Wikipedia https://en.wikipedia.org Search, navigate, extract facts
Google https://www.google.com Search queries
YouTube https://www.youtube.com Search + video playback
Store http://localhost:8001 Product purchase flow
Booking http://localhost:8002 Hotel reservation flow
Forum (Postmill) http://localhost:9999 Authenticated CRUD (Create/Edit/Reply/Delete)
GitLab http://localhost:8023 Authenticated CRUD (Project/Edit/Issue/Delete)
Composite Multi-domain Cross-domain task chaining

Features

  • PLANβ†’ACTION Scaffold β€” LLM generates structured plans before acting
  • DOM Injection (data-vla-id) β€” Stable element targeting via injected attributes
  • Memory Persistence β€” User profile stored in memory_store.json, auto-filled in forms
  • Variable Extraction β€” Extract facts from pages and chain across steps
  • Extraction Verification β€” Regex validators for year/name/URL types
  • Retry + Fallback β€” Single retry with infobox scan β†’ pattern scan β†’ LLM re-extraction
  • HITL Escalation β€” Human-in-the-loop when extraction fails or variables are missing
  • Authenticated CRUD β€” LLM-driven Loginβ†’Createβ†’Editβ†’Reply/Issue flows
  • Multi-Domain Chaining β€” Composite orchestrator decomposes instructions across domains
  • YouTube Playback β€” Detects watch intent, searches, and auto-plays videos
  • Input Grounding β€” Validates LLM-suggested actions against actual DOM state

CLI Usage

Unified Agent (single domain)

.venv/bin/python vla_unified_agent_v1_3.py --instruction "Search for Alan Turing on Wikipedia." \
    --start-url "https://en.wikipedia.org"

Composite Orchestrator V1.1 (cross-domain)

.venv/bin/python composite_orchestrator_v1_1.py --instruction \
    "Find who created Python and search that person on Google."

Composite V2 (schema-safe + extraction verification)

.venv/bin/python composite_orchestrator_v2.py --scenarios composite_scenarios_v2.json

Composite V3 (HITL + full eval)

.venv/bin/python composite_orchestrator_v3.py --full-eval
.venv/bin/python composite_orchestrator_v3.py --instruction "Search for {{mystery_person}} on Google."

Interactive Demo (all domains)

.venv/bin/python interactive_vla_demo.py --interactive
.venv/bin/python interactive_vla_demo.py --full-demo

LLM CRUD Suite

.venv/bin/python llm_crud_v1/run_llm_crud_suite.py

Cross-Domain Evaluation

.venv/bin/python cross_domain_eval_v1_3.py

Directory Structure

safe-webarena-agent/
β”‚
β”œβ”€β”€ vla_unified_agent_v1_3.py         # Core VLA agent (DOMβ†’LLMβ†’Action loop)
β”œβ”€β”€ vla_unified_agent_v1_2.py         # Prior version (memory integration)
β”œβ”€β”€ vla_unified_agent_v1_1.py         # Prior version (grounding)
β”œβ”€β”€ vla_unified_agent.py              # Original unified agent
β”‚
β”œβ”€β”€ composite_orchestrator_v1.py      # Composite v1 (basic chaining)
β”œβ”€β”€ composite_orchestrator_v1_1.py    # Composite v1.1 (YouTube playback)
β”œβ”€β”€ composite_orchestrator_v1_2.py    # Composite v1.2 (enhanced decomposition)
β”œβ”€β”€ composite_orchestrator_v2.py      # Composite v2 (schema-safe, extraction verify)
β”œβ”€β”€ composite_orchestrator_v3.py      # Composite v3 (HITL + full eval suite)
β”‚
β”œβ”€β”€ interactive_vla_demo.py           # Unified demo entry point (--interactive / --full-demo)
β”‚
β”œβ”€β”€ memory_manager_v1.py              # Memory CRUD + regex extraction
β”œβ”€β”€ memory_store.json                 # Persistent user profile data
β”‚
β”œβ”€β”€ input_grounding_v1_3.py           # Input grounding / DOM validation
β”œβ”€β”€ wikipedia_support.py              # Wikipedia-specific helpers
β”œβ”€β”€ youtube_playback_extension_v1.py  # YouTube playback detection + execution
β”œβ”€β”€ type_support.py                   # Typing/input support utilities
β”‚
β”œβ”€β”€ cross_domain_eval_v1_3.py         # Cross-domain evaluation runner
β”œβ”€β”€ cross_domain_scenarios_v1_3.json  # Cross-domain test scenarios
β”‚
β”œβ”€β”€ composite_scenarios_v1.json       # Composite v1 scenario definitions
β”œβ”€β”€ composite_scenarios_v2.json       # Composite v2 scenario definitions
β”‚
β”œβ”€β”€ experiment_runner.py              # Phase 1 experiment runner (rule-based)
β”œβ”€β”€ experiment_runner_llm.py          # Phase 2 experiment runner (LLM)
β”œβ”€β”€ experiment_runner_llm_phase2.py   # Phase 2 refinement
β”œβ”€β”€ experiment_runner_llm_phase3.py   # Phase 3 (action verification)
β”œβ”€β”€ experiment_runner_llm_phase3b.py  # Phase 3b (relaxed verification)
β”‚
β”œβ”€β”€ llm_policy.py                     # LLM policy v1
β”œβ”€β”€ llm_policy_phase2.py              # LLM policy phase 2
β”œβ”€β”€ llm_policy_phase3.py              # LLM policy phase 3
β”œβ”€β”€ llm_policy_phase3b.py             # LLM policy phase 3b
β”‚
β”œβ”€β”€ llm_crud_v1/                      # LLM-driven CRUD operations
β”‚   β”œβ”€β”€ forum_crud_llm.py             # Forum CRUD (Postmill)
β”‚   β”œβ”€β”€ gitlab_crud_llm.py            # GitLab CRUD
β”‚   β”œβ”€β”€ llm_dom_agent.py              # DOM agent for CRUD
β”‚   β”œβ”€β”€ run_llm_crud_suite.py         # CRUD evaluation suite
β”‚   β”œβ”€β”€ reports/                      # CRUD reports
β”‚   └── runs/                         # CRUD run traces
β”‚
β”œβ”€β”€ auth_domain_crud_v1/              # Authenticated domain CRUD (earlier version)
β”‚   β”œβ”€β”€ forum_crud_agent.py
β”‚   β”œβ”€β”€ gitlab_crud_agent.py
β”‚   β”œβ”€β”€ crud_runner.py
β”‚   └── crud_scenarios.json
β”‚
β”œβ”€β”€ reports_*/                        # Per-version evaluation reports
β”‚   β”œβ”€β”€ reports_unified_v1_3/
β”‚   β”œβ”€β”€ reports_cross_domain_v1_3/
β”‚   β”œβ”€β”€ reports_composite_v1/
β”‚   β”œβ”€β”€ reports_composite_v2/
β”‚   β”œβ”€β”€ reports_composite_v3/
β”‚   β”œβ”€β”€ reports_memory_v1/
β”‚   └── reports_youtube_playback_v1/
β”‚
β”œβ”€β”€ runs/                             # Per-run execution traces + screenshots
β”‚
β”œβ”€β”€ third_party/webarena/             # WebArena benchmark reference code
β”‚
β”œβ”€β”€ README.md                         # This file
β”œβ”€β”€ SYSTEM_OVERVIEW_REPORT.md         # Technical system overview
└── ARCHITECTURE_BRIEF.md             # Architecture brief for teammates

Requirements

Dependency Version Purpose
Python 3.10+ Runtime
Ollama Latest Local LLM inference (qwen3:8b)
Playwright Latest Browser automation

Ports Used

Port Service
8001 Local Store (adversarial web app)
8002 Local Booking (adversarial web app)
8023 GitLab (self-hosted)
9999 Postmill Forum (self-hosted)
11434 Ollama API

Setup Instructions

1. Clone and create virtual environment

cd safe-webarena-agent
python3 -m venv .venv
source .venv/bin/activate

2. Install dependencies

pip install playwright
playwright install chromium
pip install requests

3. Start Ollama

ollama serve
ollama pull qwen3:8b

4. Start local services

# Store (port 8001)
cd local_store_v2 && python -m http.server 8001

# Booking (port 8002)
cd local_booking_v2 && python -m http.server 8002

# Forum and GitLab should already be running on their respective ports

5. Verify setup

# Check Ollama
curl http://localhost:11434/api/tags

# Check local services
curl -s http://localhost:8001/index.html | head -5
curl -s http://localhost:8002/step1_service.html | head -5

Demo Instructions

Quick Demo (3 minutes)

# Run the interactive demo β€” shows all domains
.venv/bin/python interactive_vla_demo.py --full-demo

Comprehensive Evaluation (10 minutes)

# Full 10-domain eval with HITL scenarios
.venv/bin/python composite_orchestrator_v3.py --full-eval

Interactive Session

# Free-form instruction mode
.venv/bin/python interactive_vla_demo.py --interactive
# Try: "Search for Alan Turing on Wikipedia."
# Try: "Create a new post on the forum."
# Try: "Buy one notebook."

CRUD Suite Only

.venv/bin/python llm_crud_v1/run_llm_crud_suite.py

Credentials

Service Username Password
Forum (Postmill) MarvelsGrantMan136 test1234
GitLab root Kite$7v_Mango!Q2-Quartz

Reports

All runs generate structured reports in reports_*/ directories and runs/ with:

  • JSON result summaries
  • Markdown reports with tables
  • Screenshots (when visual=True)
  • Execution traces with per-step timing

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages