Back to portfolio

Learning web workflows
from demonstration

Experimental prototype

Abstract

Can a browser agent learn a workflow by watching someone do it? AIPath explores this through narrated screen recordings: visual observations and spoken explanations become reusable workflow context. Given that context and a new instruction, an agent can plan a related task and act in the browser. The prototype connects a recording interface, a workflow library, and an agent executor.

Demonstration

Screen recording + narration

video, audio

Reusable plan

Ordered steps with context

trace

Browser execution

The plan + a new instruction

trace, hint, url
Figure 1. A demonstration supplies the procedure. A new instruction supplies the next objective.

1 Method

A demonstration contains both a sequence of actions and the reason for taking them. AIPath keeps these together as a reproducible action plan (RAP), giving the browser agent a worked example to draw from.

1.1 Capture a worked example

The interface records the screen and microphone. In the Python pipeline, FFmpeg separates the audio and samples video frames so the workflow can be inspected as a sequence of observations.

1.2 Recover the workflow context

GPT-4o summarizes screenshots and identifies screen changes. Whisper transcribes the narration. The pipeline combines visual summaries, time intervals, and spoken context into a structured representation of the demonstration.

1.3 Adapt and execute

A saved trace, a new task hint, and a starting URL become the next run’s inputs. GPT-4 derives the objective and action context; a LaVague agent then uses Selenium to interact with the browser. The prompt allows the agent to adjust its steps to the new objective.

2 Implementation

The prototype is split between a web interface and a Python agent service. The original code is available in two repositories.[1][2]

Components and technologies in the original prototype
ComponentImplementation
Recorder & interfaceNext.js, React, TypeScript
Browser screen and microphone capture
Workflow librarySupabase
Workflow records and storage helpers
Video interpretationFFmpeg, GPT-4o, Whisper
Frames, visual summaries, and transcripts
Planning & executionGPT-4, LaVague, Selenium
Task context and browser interaction
APIPython, FastAPI
Workflow creation and execution endpoints

“Learning” here means retaining and reusing demonstration context. The inspected implementation calls pretrained models to interpret and execute the workflow.

3 Open questions

The broader idea was a reusable library of workflows and actions for web agents. A useful next evaluation would ask how well those plans transfer: to a new task, to a changed interface, or to a step that needs recovery.

The repositories preserve an experimental implementation from 2024. This note describes its approach and components; it does not report a measured success rate.

References & source

  1. [1]
  2. [2]
    Video processing & browser agentgithub.com/rahul7932/pear-backend