Skip to content

Commit 6e28921

Browse files
authored
Record a task in a Bot's own browser: browser controls and the Recorder built in (#868)
1 parent f4083dd commit 6e28921

111 files changed

Lines changed: 11638 additions & 3766 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/ci.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,13 @@ jobs:
139139
# The headless run of the Web Bot Auth test is also the one that checks the user agent fix.
140140
- run: >-
141141
bun test tests/sign-in.test.ts tests/session-cookies.test.ts tests/follows-popup.test.ts
142-
tests/demonstration-live.test.ts tests/webrtc-proxy.test.ts tests/web-bot-auth-browser.test.ts
142+
tests/webrtc-proxy.test.ts tests/web-bot-auth-browser.test.ts
143143
tests/handoff-page-restore.test.ts tests/enter-text.test.ts tests/person-browser.test.ts tests/person-browser-computer.test.ts
144+
tests/bot-browser.test.ts tests/bot-browser-computer.test.ts
144145
tests/screencast-keys-browser.test.ts tests/browser-memory.test.ts
145146
working-directory: agent-computer
146147
env:
147148
OPENBOT_COMPUTER_BROWSER: '1'
148-
OPENBOT_DEMONSTRATION_LIVE: '1'
149149
COMPUTER_BROWSER_MODE: headless
150150
# Headed is the default for hosted computers, so it is tested as one: the computer starting its
151151
# own Xvfb, and the signing again with cross-site frames in processes of their own.

‎CHANGELOG.md‎

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,53 @@ not visit during a recording are never recorded, and nothing on the browser's ow
581581
settings) or the Recorder's own is. A tab that reloaded as you switched to it no longer loses the saves
582582
it sends.
583583

584+
### Record a task in a Bot's own browser, with nothing to install
585+
586+
A Bot's screen, opened larger from a conversation, is now a browser a person can work in: tabs, an
587+
address bar, back, forward and reload sit above the page. Take control and the bar is yours (typing an
588+
address, switching, opening and closing tabs, all from the keyboard too); while the Bot has control it
589+
shows where the Bot is, read only. The OpenBot Recorder is already in every Bot's browser, idle until
590+
someone records, so recording a task needs no extension and no Connect step.
591+
592+
- **Record replaces "Teach a browser workflow".** Name the task, press Record, do it, press Stop. The
593+
panel shows the name, the time and the step count, asks about narration before your first recording
594+
(the same choice as the Browser page), and after Stop says what was saved to your Learning space. The
595+
recording lands in Intelligence exactly as the Recorder sends from any browser, in your own Learning
596+
space, so every Bot you use learns from it, this one included.
597+
- **Only you are recorded, never the Bot.** Record works only while you hold control, and handing it
598+
back (or the Bot's request ending) stops the recording, with its last steps sent before the Recorder
599+
disconnects; the Bot acts again only once the recording has ended. Taking control now records who
600+
took it, so on a shared Bot only that person can use the bar or record, someone else's recording
601+
shows only that one is running, and nobody else sees its name, its step count or its microphone.
602+
- **Record needs a computer the Bot does not share.** Where every Bot runs on one computer (Helm's
603+
shared mode, or `AGENT_COMPUTER_URL` with no supervisor), Record is refused in every Bot's browser
604+
and the panel says why: your Recorder connection would sit in the Bot's profile, where any other
605+
Bot's shell could read it. The bar still works. The computer refuses it too. With a supervisor
606+
(laptop, Desktop) or a Sandbox, each Bot has its own computer and Record works.
607+
- **One connection per recording.** Record mints a Recorder connection for the person who pressed it
608+
and Stop revokes it; Settings, Browsers lists it as "<Bot>'s browser" while it lives, and says
609+
"recording now" for any browser that is recording.
610+
- While a recording runs in a Bot's browser, that Bot's network policy also lets the Recorder reach
611+
OpenBot and the Intelligence gateway, on their own ports only; the Bot's own policy returns when it
612+
ends.
613+
- **Removed: the old "Teach a browser workflow" panel and everything behind it** (its routes under
614+
`/api/demonstrations`, its instant skill draft, "Save and use with this Bot" and "Run on a schedule").
615+
Skills already saved from it stay, as ordinary skills; its recordings stay in the database, unread.
616+
- When you take control yourself, the line under the screen no longer repeats your own request back as
617+
if you had said it.
618+
- **What you type while you hold control stays yours.** After you hand back, the Bot reads a field you
619+
filled as "filled in by the person", never its value, in its page snapshot, its page text and its
620+
screenshots; a field you only tabbed through keeps the Bot's own value.
621+
- **A Bot's request for help shows in the conversation**, with its reason and Take control, and folds
622+
into one line once answered. After you hand back, the Bot is told what you did and carries on, saying
623+
what it does next; if it still stops without a word, the card says so and offers Carry on.
624+
- **Clear browser data.** One button beside reload, in a Bot's browser and in your own, asks "Clear this
625+
browser?" and wipes it: cookies, saved passwords, history, site storage and the screenshots kept of its
626+
pages. It starts fresh, signed out of everything; OpenBot's own Passwords stay. A Bot's browser can be
627+
cleared only by the person holding its control. Audited as `computer.browser_cleared`.
628+
- Leaving a conversation while you hold a Bot's control no longer leaves it blank: the Bot's reply after
629+
you hand back shows when you return, with no "A browser task is paused" notice.
630+
584631
### Your own browser, opened from OpenBot, with the Recorder already in it
585632

586633
Wherever OpenBot can run a browser for you, the sidebar has a **Browser** button below Connections. It
@@ -641,7 +688,7 @@ close it, and the reason is in the server's and the computer's logs.
641688
- A person's browser always runs the Recorder that came with its OpenBot, even in a profile that ran an
642689
earlier one, and keeps it pinned to the toolbar once.
643690
- A Recorder that is slow to answer is refused instead of taking down the computer and every browser
644-
on it. Typing on a live screen that records a demonstration reaches the page in the order typed.
691+
on it. Typing on a live screen reaches the page in the order typed.
645692
- Opening the Browser page twice in quick succession (reloading it while your browser is still
646693
opening, for one) opens your browser once, connected; before, both opens could be refused, most
647694
often the first after the Recorder was updated. When a browser cannot be opened, the server's and

‎agent-computer/Dockerfile‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@ RUN bun install --frozen-lockfile
5656

5757
COPY agent-computer/src ./src
5858
# index.ts imports ../../shared/file-download at runtime (shared/computer-control is type-only and
59-
# erased), demonstration.ts imports ../../shared/demonstration-rules, and the browser routes import
60-
# ../../shared/openbot-browser, so the files they need go where those paths resolve from /app/src.
59+
# erased), and the browser routes import ../../shared/openbot-browser and ../../shared/bot-browser,
60+
# so the files they need go where those paths resolve from /app/src.
6161
COPY shared/file-download.ts /shared/file-download.ts
62-
COPY shared/demonstration-rules.ts /shared/demonstration-rules.ts
63-
# The OpenBot Browser's contract, which the browser routes check requests against. It imports zod,
64-
# and a module resolves its imports from its own directory upward, which from /shared never reaches
65-
# /app/node_modules: so /shared is given that tree to resolve from, rather than a second install.
66-
COPY shared/openbot-browser.ts /shared/openbot-browser.ts
62+
# The OpenBot Browser's contract and a Bot's browser's, which the browser routes check requests
63+
# against. They import zod, and a module resolves its imports from its own directory upward, which
64+
# from /shared never reaches /app/node_modules: so /shared is given that tree to resolve from, rather
65+
# than a second install.
66+
COPY shared/openbot-browser.ts shared/bot-browser.ts /shared/
6767
COPY shared/recorder-extension.ts shared/recorder-extension.json /shared/
6868
RUN ln -s /app/node_modules /shared/node_modules
6969

0 commit comments

Comments
 (0)