Repository navigation
Description
Grok Bot's only headline feature with no open equivalent in this stack: watch the operator perform a workflow (browser demonstration), then persist it as something a teammate can run again.
Updated 2026-10-30. This issue predates the v0.2 rewrite and originally described compiling demonstrations into an OpenClaw
SKILL.md. OpenGrokBot has had its own core since v0.2 (a gateway, a web client, one container per teammate; the old recipe is kept in docs/openclaw-recipe), so the artifact is now native. The shape below reflects that; the direction is the one @bferanmi806-sketch laid out in the comments.
Proposed shape
- Record: the operator drives the teammate's own persistent Chromium through the computer panel (noVNC), exactly as today. The gateway already holds a Playwright/CDP connection to that browser; instrument it to capture semantic events (navigation, click, input, select) rather than pixels or raw DOM mutations. Input into password or otherwise secret fields is recorded as "a value was entered here", never the value itself.
- Compile: turn the trace into a small typed workflow (intent, steps with locators and expected page states), stored with the teammate the way memory and routines are. No generated JavaScript: the model writes the intent and step descriptions, the recorder supplies the mechanics.
- Replay with judgment: run the deterministic steps first; when a locator or page has drifted, hand that step to the agent with the recorded intent, let it continue, and offer to re-record the step afterwards.
- Routines run workflows: a workflow describes how; a routine (cron, webhook or watch) decides when. Approvals, standing rules and the action log apply to a replayed step exactly as to any other tool call.
Non-goals (v1): cross-app desktop recording, mobile, exporting workflows to other tools.
Prior art to evaluate: Playwright codegen (event capture, locator generation), rrweb (the event model, not the replay), WebArena-style trace formats, and the shared-skill playbooks already in <data>/skills/ as the human-readable half.
Suggested slices, each its own PR: recorder + trace format → deterministic workflow runner → agent fallback and routine integration. A short design note on the trace schema before the first slice would be ideal.
If you want this to exist, 👍 the issue or comment with your workflow — the first three concrete recorded-workflow examples will shape the trace format.
Maintainer note: design discussion welcome before any code; this issue is the roadmap anchor linked from the README.
Activity
bferanmi806-sketch commentedon Aug 16, 2026
I’d love to work on this. I traced the current v0.2 path from the computer panel through the Docker/noVNC browser, the gateway’s Playwright CDP connection, routines, and the agent tool loop before proposing an implementation.
One thing I wanted to confirm first: this issue predates the v0.2 self-built-core merge and still describes compiling demonstrations into an OpenClaw
SKILL.md. Currentmainno longer appears to have an OpenClaw skill runtime, so I think the record → compile → deterministic replay goal still fits, but the artifact probably wants to be native to OpenGrokBot now.My current direction would be:
I’d probably split it into recorder/trace foundation → deterministic workflow runner → agent/routine integration rather than land teach-mode as one large PR.
Does that match where you want #1 to go after the v0.2 rewrite? If so, I’m happy to take the first slice
wolfqing commentedon Oct 30, 2026
Thanks for the thorough read, and sorry for the long silence. Yes, your direction matches where #1 should go after the v0.2 rewrite: record against the bot's own persistent Chromium through the existing CDP context, compile into a small typed workflow rather than generated JS, never persist secret input, replay deterministically and hand off to the agent on drift, and keep workflows ("how") separate from routines ("when"). Splitting it into recorder/trace → deterministic runner → agent/routine integration is the right shape too.
I've refreshed the issue body to drop the OpenClaw
SKILL.mdframing. If you're still interested, the first slice (recorder + trace format) is yours; a short design note on the trace schema before code would be ideal.bferanmi806-sketch commentedon Oct 31, 2026
Trace schema v1
I propose keeping a recorded workflow as a versioned, typed JSON document, separate from routines. A workflow describes how to do something; a routine may later decide when to run it. The first slice records traces only and does not add replay or scheduling.
The recorder should attach to the teammate's existing persistent Chromium
Pagesupplied by the sharedBrowserSession; it must not launch a second browser or replace the logged-in context. A recording session explicitly starts and stops event capture on that page. Each action stores semantic locators in a resilient preference order (role/name, label, placeholder, test id, then CSS), without generating executable JavaScript.Redaction is enforced before serialization. Password and one-time-code fields, sensitive
autocompletevalues, and fields whose accessible/name metadata indicates a password, secret, token, or API key produce a redacted fill/select step with no input value. Navigation URLs lose user-info and fragments; query values are omitted by default so session tokens cannot leak through URLs. The trace never stores page text, screenshots, cookies, or other browser state.The format leaves room for later deterministic replay: locator candidates are tried in order, and a redacted step can ask the operator for a value at replay time. That runner and routine integration remain out of this first slice. If this shape fits, I’ll proceed with the recorder and schema validation/tests only.
wolfqing commentedon Nov 1, 2026
Thanks — this is a clear note, and the overall shape is right: one document per workflow with a version number, a recorder that attaches to the teammate's existing browser, redaction before anything is written, and no generated JS. Please go ahead with the recorder and schema slice. A few things I'd like folded in first:
1. Build on v0.4.0. A teammate's computer can now be local, not only Docker. Since your note, v0.4.0 added local computers: on macOS and Linux a teammate can get a browser on the host instead of a container. Both kinds share
BrowserSession(gateway/src/browser-page.ts), so attaching tosession.page()works for both. Two things differ for recording:showWindow()opens for sign-in. So recording on a local computer means showing that window first.showWindow()/hideWindow()close the browser and reopen it with or without a window (seerelaunchincomputer-local.ts), so thePageyou attached to is gone afterwards. The recorder needs to re-attach after a relaunch, or recording needs to stop cleanly when one happens.Please test both Docker and local computers.
2. A few more step types, or at least room for them.
navigate/click/fill/selectcover a lot, but real workflows quickly need:press(Enter to submit a search box is the common case)check/uncheckLeaving some of these out of v1 is fine, as long as the format can add them without a version bump. Maybe that means an optional
frame/pagereference on every step.3. Make the locator candidates an ordered list. "Tried in order" is really a property of the list, so
target: { candidates: Locator[] }(most stable first, each candidate one strategy) says it directly. A single object with optional fields leaves the order to whoever reads it.4. Leave room for intent now. The compile step will add each step's intent and the page state it expects, and the agent fallback depends on both. An optional
intent?: stringon every step (and on the trace) costs nothing now and avoids a v2 later.5. Literal values are still personal data. Redacting secrets is right, but a
fillwith an email address or a street address is still stored as is. Before saving, please show the operator what was captured (even a plain step list), so they can turn any value into a placeholder or drop a step. Recording query keys with their values removed, so a replay knows which parameters were there, also sounds good.6. Two small scope questions.
gateway/src/db.ts). Aworkflowstable next toroutineswould match that.Happy to review the PR as soon as it's ready.
docs(readme): describe local computers wherever the READMEs assumed D…
feat(gateway): record typed browser workflows (#11)
wolfqing commentedon Nov 16, 2026
Quick status update here since Slice 1 (#11) landed:
v1), recorder attached toBrowserSessionacross Docker and local browser relaunches, sensitive-input and URL query redaction, in-memory review draft API (drop steps / turn values into placeholders), and the SQLiteworkflowstable.BrowserSessionusing the ordered locator candidates, bind placeholder/redacted inputs at run time, and route outbound/state-changing steps through the existing approval gate and action log.intent, hand off to the agent when a locator or page state drifts, and allow routines to run a workflow.(Note if you pull fresh
main: the project has since been renamed toOpenSuperBotin v0.5.0 and added thedesktop/shell in v0.6.0, whilegateway/src/workflow-recorder.tsandgateway/src/workflows.tsremain in the same place.)@bferanmi806-sketch thanks again for the clean foundation in #11 — if you're up for taking the next slice (either the deterministic runner or the panel UI), let me know! A short note on placeholder binding and approval gating before code would be great.
bferanmi806-sketch commentedon Nov 16, 2026
Thanks for the update and for merging #11! I'd be happy to take the deterministic workflow runner next.
My approach would be to execute saved traces through the existing "BrowserSession", resolve locators in their recorded order, and bind placeholders or redacted inputs at runtime without persisting sensitive values.
I'd also reuse the existing approval gate and action log for state-changing actions, stopping execution cleanly when a step fails or approval is denied.
I'll keep this slice focused on the runner and its tests, leaving UI, agent fallback and routines for later.
One question before starting: should each replayed action follow the existing approval rules, or should workflows have their own approval mechanism? I'd lean towards reusing the existing rules.
wolfqing commentedon Nov 17, 2026
Definitely reuse the existing approval gate (
gateway/src/approvals.ts) and action log (gateway/src/actions.ts) rather than introducing a separate workflow-only approval store — the operator should have one approval card in the thread and one standing-rules list (bot_id+kind+target) in the computer panel.Two implementation details worth keeping in mind as you wire it up:
hold_for_approval({ action, detail, kind, target }), whereas deterministic steps don't invoke the LLM. Adding optional approval metadata on state-changing steps (e.g.approval?: { kind: ApprovalKind; target: string; action?: string }set during review/save, withrulesAllowedtrue only for operator-initiated runs without external/webhook payloads, matchingserver.ts) keeps the schema explicit without guessing DOM semantics. Note also that onlyRULEABLE_KINDS(email,message,post) match standing rules;purchase,booking, andotheralways ask./api/approvals/:id: TodaysettleApproval()ingateway/src/server.tsunconditionally starts a new LLM turn (startTurn(...)) once the operator approves or discards. For a deterministic workflow run paused at stepk, you'll wantsettleApprovalto check for a pending workflow continuation keyed byapprovalIdfirst — resuming from stepkonapprove(without persisting bound secret/placeholder values) or stopping cleanly ondiscard— and only fall back tostartTurnfor regular agent approvals.Note:
DELETE /api/bots/:botId/workflows/:workflowIdjust landed onmainalongside v0.6.1 as well. Feel free to open a PR whenever the runner + tests are ready!wolfqing commentedon Nov 19, 2026
Slice 2 (#34 — deterministic replay runner) has landed on
main:v1trace schema + isolated-world recorder + SQLiteworkflowstable (feat(gateway): record typed browser workflows #11), plus deterministic replay overBrowserSession.workflowPage(), runtime in-memory placeholder/redacted bindings, explicitstep.approvalgating through the existing approval cards and standing rules, unrecorded popup quarantine, 5s expected-URL polling, and presence / Thread Stop integration (feat(workflows): add deterministic replay runner #34).approvalannotations) before saving, and run/stop saved workflows.intent, hand off to the agent when a locator or expected URL drifts, and allow routines to trigger a saved workflow.Thanks @bferanmi806-sketch for landing both #11 and #34! Let me know if you'd like to take either the panel UI slice or the compile/drift/routine slice next.
bferanmi806-sketch commentedon Nov 19, 2026
Thanks for the invitation. I’ll take the computer-panel UI slice: start and stop recording, review and edit the captured draft (drop steps, turn values into placeholders, and set approval annotations), save it, and run or stop saved workflows.
I’ll build on the existing workflow APIs, keep the English and Chinese strings in sync, and add coverage for the recording, review, and run states. I’ll leave agent fallback and routine triggers for a later slice.
wolfqing commentedon Nov 21, 2026
Sounds great — the computer-panel UI slice is yours! Three small notes that should save some friction as you wire it up:
main(v0.7.0).v0.7.0just landedConnectors → AppsandConnectors → MCPsections inweb/src/components/ComputerPanel.tsxandweb/src/i18n/, so branching off currentmainwill avoid panel/i18n conflicts.GET /api/bots/:botId/computeronly returnsworkflowRecording: booleanandworkflowDraft: boolean. Including the pending draft ({ id, trace }whenworkflowDraftis present) and active run metadata (workflowRun: { runId, workflowId } | null— never runtimebindings) in that status response (or equivalent GET routes) will let the panel restore review/stop controls cleanly after a reload.kind === 'local'). On local computers the panel's CDP screencast is watch-only, while the operator interacts with the real browser window (POST /api/bots/:botId/computer/windowwith{ "shown": true }). Opening that window when recording starts on a local computer (or surfacing a one-click prompt right in the recording bar) will make local recording as straightforward as Docker's interactive noVNC view.Looking forward to reviewing the PR when it's ready!
wolfqing commentedon Nov 25, 2026
Slice 3 (#36 — computer-panel workflow controls) has landed on
main:v1trace schema & isolated-world recorder (feat(gateway): record typed browser workflows #11), deterministic replay runner with explicitstep.approvalgating & popup quarantine (feat(workflows): add deterministic replay runner #34), and fullComputerPanelUI in English and Chinese for recording, reviewing/editing drafts (placeholders, step drops, approval metadata), saving, deleting, and running/stopping workflows (feat(web): manage recorded workflows in computer panel #36).intent, hand off to the agent when a locator or expected URL drifts during replay, and allow routines to trigger a saved workflow.Huge thanks again @bferanmi806-sketch for shipping #11, #34, and #36! Let me know if you'd like to take the final agent-fallback & routine-trigger slice as well.
bferanmi806-sketch commentedon Nov 25, 2026
Thanks for merging #36 and for the invitation. I’m interested in the final slice. Would you be open to a PR for trace intent and agent fallback on locator or URL drift, followed by a separate PR for routine triggers?
wolfqing commentedon Nov 27, 2026
Splitting the final slice into those two PRs makes complete sense — go for it!
Three invariants worth keeping in mind for the first PR (intent + agent drift fallback) on top of current
main:target_not_foundorurl_mismatch). Security and environment stops (popup_opened,vault_denied,vault_domain_mismatch,cancelled,browser_unavailable) should still stop immediately and fail closed without invoking the model.k, pass the workflow/stepintent, step index, and safe locator/URL context — never serialize caller-suppliedbindings(placeholders / redacted inputs) or resolvedVaultcredentials into thread messages, action logs, or model context.workflowPage(), keep the caller'sorigin/rulesAllowedconstraints (andaction-guardrailchecks onmain) intact so a drifted step cannot bypass approval rules.Looking forward to the PR!
bferanmi806-sketch commentedon Nov 27, 2026
Thanks for confirming the split and for spelling out the safety rules. I’ll keep this first PR focused on saved intent and page-drift handoff, with popup, Vault, cancellation, and browser failures still stopping immediately. The fallback will use the pinned page and existing guardrails, and it won’t receive runtime bindings or Vault values. I’ll leave routine triggers for the separate follow-up.
wolfqing commentedon Nov 29, 2026
Page-drift handoff (#40) has landed on
main:target_not_found(locator timeout) andurl_mismatchnow hand off to a browser-only agent continuation on the workflow's pinned page with sanitized workflow title, workflow/stepintent, and locator/URL context, whilepopup_opened, Vault errors, cancellation, closed pages, and browser/action errors still fail closed immediately.bindingsand resolved Vault secrets stay out of prompts, URLs, native tool-call replay blocks, repeat-guard previews, persisted guardrail approvals, thread messages, and action logs (browser_fill_secret, screenshots, shell, and non-browser tools are disabled during handoff).allowStandingRules: falseandtainted: true, preserves deterministic computer action guardrails, and re-verifiesexpectedOriginon the pinned page before executing an approved browser action.That leaves the final slice — routine triggers running saved workflows — clear to build on top of current
mainwhenever you're ready, @bferanmi806-sketch!bferanmi806-sketch commentedon Nov 30, 2026
Thanks for merging #40 and for keeping the split clear. The page-drift handoff now on main gives the remaining work a clean boundary. I’m interested in taking the routine-trigger slice next. I have a few current commitments still open, so I’m leaving #1 unclaimed for now; once one clears, I’ll check that the slice is still available before starting.
wolfqing commentedon Dec 1, 2026
Sounds good — thanks again for all the great work across the workflow slices, and appreciate you keeping #1 open in the meantime! No rush at all; just drop a quick note here whenever your schedule clears up, @bferanmi806-sketch.