-
-
Live tab takeover inside an isolated Otter tab group with a viewport highlight frame and instant Stop control.
-
Mid-run /btw side questions and /queue follow-up prompt queueing without interrupting the active task.
-
Per-host, per-action permission gates requiring explicit approval before reading, clicking, typing, uploading, or downloading.
-
Live page reading and summarization across visible text, headings, forms, Shadow DOM, and embedded iframes.
-
Otter side-panel overview: open-source Chrome, Edge, Brave, and Firefox browser agent running with your own API key and no backend.
-
Local replayable recipes with durable locators and {{param}} placeholders that replay without calling an LLM.
-
Hybrid input execution combining Chromium chrome.debugger CDP input with pre-dispatch DOM event fallback on Firefox and restricted frames.
-
Automatic redaction of passwords, cards, and OTPs plus human handoff pauses for sign-ins, 2FA prompts, and payment checkouts.
-
Structured /qa runs with deterministic DOM assertions, console/network capture, and HTML, Markdown, JUnit XML, or JSON reports.
-
Local-only file attachments, download approval gating, and task-scoped tab isolation.
-
Bring your own API key across Anthropic, OpenAI, Groq, Ollama, OpenRouter, or custom endpoints, with native tools or [ACTION] text fallback.
-
47-property deterministic PBT suite in tests/pbt.test.js (198 passing tests) plus live headless Chrome E2E verification.
-
Committed .kiro/ workspace built with Kiro CLI v3.7.1: steering docs, otter-architect and otter-qa agents, hooks, and feature specs.
-
Cross-origin iframe inspection and control using on-demand chrome.scripting injection, frame-scoped refs, and per-frame host permissions.
-
Export recorded recipes to standalone @playwright/test files with frameLocator support and expect() assertions, or share as JSON.
Inspiration
Most browser agents lock you into one vendor's account and route your tabs through their servers. I wanted an assistant that lives in the browser side panel, talks directly to whatever model I already pay for or run locally (Anthropic, OpenAI, Groq, Ollama, OpenRouter, or a self-hosted proxy), and needs no backend server. I also got tired of repeating manual QA clicks before every release, so I built the agent to run checks against the live DOM and export reports I can attach to a pull request or CI run.
What it does
Otter is an open-source side-panel extension for Chrome, Edge, Brave, and Firefox. It reads the active tab and carries out tasks across forms, multi-step flows, cross-origin iframes, data extraction, and file uploads or downloads.
In normal chat, Otter uses 24 browser tools covering clicks, hovers, drag-and-drop, sliders, typing, dropdowns, keyboard shortcuts, scrolling, screenshots, Shadow DOM, embedded iframes, and native browser dialogs. While a run is active, /btw lets you ask a side question without interrupting the current task, and /queue lines up follow-up prompts.
Typing /qa (or /qa checkout totals) starts a structured QA run. Otter plans happy-path, validation, and edge-case checks, drives the page, and evaluates deterministic verify assertions in the DOM with polling timeouts. It also records console errors, uncaught exceptions, and failed 4xx or 5xx network requests, then exports the results as HTML, Markdown, JUnit XML, JSON, or a short summary.
Any finished run can be saved locally as a recipe. Recipes store durable locators (data-testid, ARIA role and name, id, or CSS selectors) along with {{param}} placeholders, so replays run without calling an LLM. If a page changes and a locator breaks, Otter asks the model to complete that step and offers to update the saved recipe. Recipes also export to standalone @playwright/test files, including frameLocator calls for cross-origin iframes.
Frankenstein architecture
For Kiroween 2026 (Frankenstein), Otter combines several mismatched browser and model runtimes into one Manifest V3 extension written in plain JavaScript ES modules with no bundler, no framework, and zero runtime dependencies.
The side panel runs the agent loop, recipe recorder, and QA report view. A content script reads the DOM, performs actions, and evaluates verify assertions. The background service worker manages tab-group isolation and proxies streaming requests for cross-origin custom endpoints.
Input dispatch adapts to each browser and frame. On Chromium, Otter drives trusted input through the chrome.debugger DevTools Protocol API; on Firefox, protected pages, and ambiguous frames, it switches to simulated DOM events before dispatch. On the model side, providers with native tool calling use structured tool schemas, while models without tool support fall back to a text-based [ACTION] protocol.
Cross-origin iframe control uses on-demand chrome.scripting.executeScript injection while keeping "all_frames": false in manifest.json. Child controls receive frame-scoped references (ref_f<frameId>_<N>), coordinates translate into top-viewport space for chrome.debugger, and each iframe origin passes its own host permission check before Otter reads or interacts with it.
Built and hardened with Kiro CLI
I used Kiro CLI (v3.7.1) to specify and verify the cross-origin iframe and security work. The repository commits the full .kiro/ workspace:
- Architecture, stack, layout, and security steering docs under
.kiro/steering/ - Two validated custom workspace agents in
.kiro/agents/:otter-architectfor implementation and architecture reviews, andotter-qafor test design and property-based verification - Two workspace hooks in
.kiro/hooks/guarding syntax/test runs andmanifest.json/package.jsonversion parity - Feature specs in
.kiro/specs/cross-origin-iframes/and.kiro/specs/security-and-iframe-pbt/
Running otter-qa produced a 47-property deterministic property-based test suite in tests/pbt.test.js (300 seeded cases per property), bringing the Node test suite to 198 passing tests (npm test) alongside a live headless Chrome E2E suite (npm run test:e2e). Formalizing those properties exposed two security bugs before release: cleanTarget in lib/recipe.js accepted percent-encoded hosts such as a%22b.com that could break out of exported Playwright frameLocator strings, and check in lib/permissions.js evaluated saved rules in list order so an earlier allow could shadow a later deny. Both are fixed and covered by regression tests.
Safety and privacy
API keys stay in chrome.storage.local and are never synced. Every page interaction requires a per-host, per-action grant (read, click, type, navigate, upload, or download), and saved deny rules always win over allow rules. Otter redacts passwords, payment cards, and one-time codes before page data leaves the tab, and pauses with a handoff card for sign-ins, 2FA prompts, and payment checkouts. Attached files stay in the side panel so the model only sees file names, types, and sizes.
Challenges
Making QA checks trustworthy meant refusing to accept a model saying a page looks fine. Assertions had to run as deterministic DOM checks with polling timeouts.
Keeping recipes working after UI changes required recording durable locators instead of temporary element references, then falling back to the model only when a locator breaks.
Supporting cross-origin iframes safely meant enforcing host permissions per frame, translating child coordinates into top-viewport coordinates for Chromium's debugger API, and suppressing overlays inside nested frames.
Supporting Chrome and Firefox from one codebase meant working around API gaps: Firefox has no chrome.debugger API or tab groups, and self-hosted model endpoints bring CORS restrictions and varied tool-calling support.
What I learned
Deterministic DOM assertions, strict permission boundaries, and durable locators matter much more for reliable browser automation than clever prompting. Writing formal properties with Kiro CLI's custom QA agent also caught edge cases in URL escaping and rule precedence that standard unit tests missed.
What's next
Submitting Otter to the Chrome Web Store and Firefox Add-ons, expanding Firefox test coverage, and adding UI localization.