From 7a62142eda6b39fd8930b53878652ab675dc26c1 Mon Sep 17 00:00:00 2001 From: Anthony Ettinger Date: Sat, 4 Jul 2026 09:10:52 +0000 Subject: [PATCH] docs: add TronBrowser M3 browser agents PRD Adds the M3 product requirements document (browser agents, AI analyze, and automation) at docs/tronbrowser-m3-browser-agents-prd.md. Co-Authored-By: Claude Opus 4.8 --- docs/tronbrowser-m3-browser-agents-prd.md | 1452 +++++++++++++++++++++ 1 file changed, 1452 insertions(+) create mode 100644 docs/tronbrowser-m3-browser-agents-prd.md diff --git a/docs/tronbrowser-m3-browser-agents-prd.md b/docs/tronbrowser-m3-browser-agents-prd.md new file mode 100644 index 0000000..526b9d1 --- /dev/null +++ b/docs/tronbrowser-m3-browser-agents-prd.md @@ -0,0 +1,1452 @@ +# PRD: TronBrowser M3 — Browser Agents, AI Analyze, and Automation + +**Target monorepo path:** `docs/tronbrowser-m3-browser-agents-prd.md` +**Document owner:** TronBrowser team +**Status:** Draft v0.3 +**Date:** 2026-07-04 +**Product area:** Desktop browser, existing `tron` CLI, browser automation, AI agents, MCP +**Related milestones:** M1 Chromium fork/launcher, M2 AI sidebar, **M3 Browser agents**, M6 Plugins + +--- + +## 1. Executive Summary + +M3 should make the existing TronBrowser/Ungoogled Chromium product programmable by developers and AI agents without creating a new browser engine, a new repository, or a new public CLI binary. + +The core M3 addition is an AI-assisted browser automation loop exposed through the existing `tron` CLI: + +```bash +tron snapshot --json +tron click @e3 +tron fill @e4 "hello@example.com" +tron analyze "Fill out this contact form" --data ./lead.json +tron analyze "Fill out this contact form but do not submit" --data ./lead.json --execute --no-submit +tron analyze "Click through onboarding until the dashboard is visible" --execute --max-steps 8 +tron mcp --headless +``` + +`tron analyze` is the new high-level command for unknown interfaces. It should inspect the current page, infer what forms and controls are asking for, map user-provided data to fields, propose a safe action plan, optionally execute bounded steps, verify progress after each step, and stop when blocked, ambiguous, unsafe, or complete. + +MCP must expose the same capability so external agents can either use low-level browser primitives or delegate an entire bounded task to TronBrowser: + +```txt +browser_snapshot +browser_analyze +browser_step +browser_run_task +browser_click +browser_fill +browser_extract +``` + +--- + +## 2. Product Decisions + +### 2.1 Keep the current browser strategy + +M3 uses the existing TronBrowser/Ungoogled Chromium/Chromium backend. + +M3 does **not** build a new Rust browser engine, rendering engine, JavaScript engine, extension platform, or MV3 implementation. + +### 2.2 Extend the existing `tron` CLI + +M3 does **not** create a new public binary such as: + +```bash +trond +tronctl +tron-engine +tron-automate +``` + +The only public command remains: + +```bash +tron +``` + +Internal helper processes are allowed only if they are automatically launched and managed by `tron`. + +### 2.3 Stay inside the existing monorepo + +All M3 code lands in the existing `tronbrowser.dev` monorepo. No new repository should be created. + +Recommended target areas: + +```txt +apps/desktop/launcher/ # existing tron CLI and launch logic +apps/desktop/extensions/ # current extension/feed/sidebar architecture +packages/browser-core/ # browser/session/page/snapshot types +packages/agent-runtime/ # analyze loop, planner, validator, MCP wrappers +packages/workflow-engine/ # browser workflow nodes +packages/sdk/ # public TypeScript SDK +services/ # optional local services if already aligned with repo patterns +docs/ # this PRD and user/developer docs +``` + +--- + +## 3. Goals + +1. Preserve existing `tron `, `tron --tor`, `tron upgrade`, `tron remove`, and `tron version` behavior. +2. Add browser automation commands to the existing `tron` CLI. +3. Add structured page snapshots optimized for AI agents. +4. Add stable element refs such as `@e1`, `@e2`, and `@e3`. +5. Add `tron analyze` for AI-assisted unknown-interface navigation and form filling. +6. Add headless one-shot automation for CI and agent workflows. +7. Add MCP support through `tron mcp`. +8. Add a TypeScript/JavaScript SDK through the existing SDK package. +9. Add trace/replay artifacts for debugging failed agent runs. +10. Keep browser control local-first and privacy-preserving by default. + +--- + +## 4. Non-Goals + +M3 explicitly does **not** include: + +1. A custom Rust browser engine. +2. A new `tron-engine` repo. +3. A separate public automation CLI. +4. Reimplementation of HTML, CSS, JavaScript, DOM, rendering, networking, storage, or extensions. +5. Reimplementation of Manifest V3. +6. Full Playwright replacement in M3. +7. CAPTCHA bypassing, bot evasion, stealth automation, or anti-abuse circumvention. +8. Blind automation of payments, banking, healthcare, legal filings, tax/government forms, or destructive account actions. +9. Public remote browser control by default. +10. Cloud browser sessions in the first M3 release. + +--- + +## 5. Target Users + +### 5.1 AI Agent Builders + +Developers building agents that need to inspect pages, fill forms, click through unknown interfaces, extract data, and produce reproducible traces. + +### 5.2 Power Users + +Users who want repeatable browser workflows from a terminal without writing Playwright/Selenium code. + +### 5.3 TronBrowser Team + +Internal workflows for smoke tests, extension validation, feed-page checks, onboarding tests, AI sidebar tests, and regression testing. + +### 5.4 MCP Clients and AI Coding Agents + +External agents that want browser access via a standard tool interface rather than shelling out to ad hoc scripts. + +--- + +## 6. Core UX Principles + +1. **One command:** everything is exposed through the existing `tron` CLI. +2. **Snapshot first:** agents should reason from structured page state, not screenshots alone. +3. **Refs over selectors:** agents should prefer stable refs like `@e4` over brittle CSS selectors. +4. **Plan before action:** AI-assisted unknown-interface workflows default to dry-run planning. +5. **One step at a time:** execution should re-snapshot and re-plan after every meaningful action. +6. **Safe by default:** final submits, destructive actions, payments, and sensitive disclosures require confirmation or explicit policy. +7. **Local-first:** no hidden hosted AI calls; use configured BYOK/local AI settings. +8. **Composable:** CLI, SDK, MCP, and workflow engine all use the same underlying browser primitives. + +--- + +## 7. CLI Requirements + +### 7.1 Existing commands that must continue working + +```bash +tron +tron --tor [url] +tron upgrade +tron remove +tron version +``` + +### 7.2 New M3 command map + +```bash +tron open +tron browser +tron headless [options] +tron snapshot [options] +tron analyze [goal|mode] [options] +tron click +tron fill +tron type +tron press +tron select +tron scroll +tron extract [options] +tron screenshot +tron pdf +tron cookies +tron storage +tron trace +tron run