Helps automate browser flows.
apps/
├── frontend/ React + Vite client
└── backend/ Node.js + Express API
- Node.js 20 or newer
- npm 10 or newer
npm install
npm run devThe React app runs at http://localhost:5173 and proxies API requests to the
Node.js server at http://localhost:3000.
npm run dev— start the frontend and backend in watch modenpm run dev:frontend— start only the frontendnpm run dev:backend— start only the backendnpm run build— create production builds for both appsnpm run typecheck— type-check both appsnpm start— run the compiled backend
Copy apps/backend/.env.example to apps/backend/.env to override the default
backend configuration.
Set CHROME_PROFILE_PATH in the backend environment to the Chrome user-data
directory that Stagehand should reuse between workflow runs. The default is
apps/backend/data/chrome-profile. Do not run multiple browsers against the same
profile directory concurrently because Chrome locks profiles while they are open.
Projects are stored locally in apps/backend/data/webpilot.db by default. The
database and its tables are created automatically when the backend starts.
Large per-step captures are represented by metadata in step_artifacts. Each
artifact references a stable workflow step UUID and a local content path; captured
DOM/HTML should be stored as a compressed file rather than embedded in steps_json.
POST /api/projects— create a projectGET /api/projects— list projectsGET /api/projects/:id— load one projectPATCH /api/projects/:id— save the original prompt and generated stepsDELETE /api/projects/:id— delete one projectPOST /api/steps/generate— generate executable workflow steps from an original promptPOST /api/steps/execute/:projectId— execute a validated workflow in a headed local browserPOST /api/steps/stop/:projectId— stop the project's active browser sessionGET /api/projects/:projectId/steps/:stepId/artifacts— list artifact metadataPOST /api/projects/:projectId/steps/:stepId/artifacts— store compressed DOM/HTMLGET /api/projects/:projectId/steps/:stepId/artifacts/:artifactId— fetch metadata and contentDELETE /api/projects/:projectId/steps/:stepId/artifacts/:artifactId— delete an artifactPOST /api/projects/:projectId/steps/:stepId/locator-options— rank locator options from an artifactPOST /api/projects/:projectId/steps/:stepId/extraction-instruction— suggest a Stagehand extraction instruction
Create requests accept JSON with a required name, required originalPrompt,
and optional description:
{
"name": "Customer onboarding",
"description": "Automates the customer onboarding flow.",
"originalPrompt": "Create a browser flow that provisions a new customer account."
}