This Chrome extension is the Svelte + TypeScript side panel client for Anda Bot. It talks to the local Anda daemon through a single WebSocket RPC connection per browser profile and exposes browser tabs to the agent through the split browser tools.
- Generate an extension token. This also provisions the local owner identity in the OS secure credential store when it does not exist yet:
cargo run -p anda_bot -- browser token --days 30- Build the extension:
pnpm --dir chrome-extension build-
Open
chrome://extensions, enable Developer mode, choose Load unpacked, and selectchrome-extension/dist. -
Open the Anda Bot side panel, paste the printed Gateway URL and Bearer token, then save.
Chrome 116 or newer is required because the extension keeps its Manifest V3 service worker alive with a WebSocket keepalive.
When a request starts from this Side Panel, Anda receives request metadata with a stable browser_session. The session stays the same as you switch tabs, while the current tab id, URL, title, and language hint are sent as metadata. The service worker registers that metadata again when you activate another tab or when the active tab's URL or title changes, and skips unchanged tab updates. A window gaining focus always refreshes the session's activity, so requests without an explicit browser session, such as TUI requests, select the recently focused browser profile. Updates in other windows never change which tab Anda targets.
The agent can use the split browser tools below. Page, input, and script tools intentionally target the active tab; use browser_tabs.switch_tab first when another tab is needed. The extension does not read or change cookies or clear site data.
browser_tabs actions:
get_current_tablist_tabsswitch_tabopen_tabopen_fileclose_tabnavigateget_framesgo_backgo_forwardreloadlaunch_browserdownloadlist_downloadscancel_downloadopen_download
browser_page actions:
snapshotextract_textscreenshotread_selectionget_full_page_htmlget_structured_dataget_accessibility_treeprint_to_pdfannotate_viewportclear_annotationsget_element_infoget_viewport_sizefind_in_pagewait_for_elementhandle_dialog
browser_input actions:
clicktype_textpress_keyscrollscroll_tohoverdrag_and_dropselect_dropdownupload_filecopy_to_clipboard
browser_script actions:
execute_javascript
execute_javascript accepts either a JavaScript expression or a function body. Bare expressions such as document.title return automatically; multi-statement code should use return. It evaluates in the page context through the debugger, so it also works on sites with a strict CSP.
Chrome blocks extension scripts on some protected pages such as chrome:// URLs and the Chrome Web Store.
Connection settings are shared by the Side Panel and Dashboard. Updating the Gateway URL or bearer token clears data from the previous connection; saving the daemon configuration preserves the selected approval policy.
The Dashboard loads workspaces on demand and does not restore chat histories in the background. Chat renders Markdown and math with bundled styles; raw HTML is shown as text. Image previews load when their messages become visible.
Voice capture stays attached to the tab where it started, including when another tab becomes active. It runs in the extension's isolated world, so the page's own scripts cannot read the recording or the transcript. Choosing a memory policy for a new conversation temporarily disables voice input until the first text message starts that conversation.
"Send this content to Anda" reads the right-clicked element only after you choose the menu item; ordinary right-clicks do not read page text.
open_download reveals the downloaded file in its folder. Opening the file itself
requires a user click, which Chrome does not allow a WebSocket command to supply.