Skip to main content
Glama
XyFlow Browser
by Xyloth
README.md
# XyFlow Browser

**Keep AI browser tasks moving through connection failures, timeouts, and broken page observations.**

XyFlow grew out of a recurring problem: an AI could access the browser, encounter a popup or URL-verification error, and return without finishing the task. The user became the recovery system, repeatedly saying "try again" or manually repairing the Chrome connection. XyFlow provides a shared browser connection, fresh page observations, and structured recovery so agents have a supported path to continue ordinary work.

Created by **James Dye**, with AI-assisted implementation and review using OpenAI Codex. Built around Google's [Chrome DevTools MCP](https://github.com/ChromeDevTools/chrome-devtools-mcp); XyFlow supplies the coordination, action journal, identity checks, recovery logic, and feedback loop. It does not implement a browser engine.

[Download a release](https://github.com/Xyloth/xyflow-browser/releases/latest) · [Install](docs/INSTALL.md) · [Development story](docs/DEVELOPMENT-STORY.md) · [Architecture](docs/ARCHITECTURE.md) · [Demo](docs/DEMO.md) · [25-tool reference](TOOL-CATALOG.md)

![Actual isolated Chrome demo: one fixture submission, a blocked competing agent, and a suppressed duplicate request](docs/assets/reliability-demo.jpg)

*Captured from the reproducible local demo. The result cards reflect the controller's outcomes and the fixture server's submission count.*

## The problem that shaped the project

James Dye relied on AI agents for ordinary web tasks, often while away from his PC. Browser access could work one moment and fail the next. Popups interrupted control. Agents reported that a URL timed out or could not be confirmed, then stopped. Some tasks resumed after another instruction to try again; others required disabling and re-enabling the Chrome connection in settings.

That meant spending model usage and time on attempts that delivered no completed work, followed by more supervision just to get the same task moving again. **The goal was reliable task completion with less intervention.**

XyFlow addresses several parts of that failure chain: it uses a direct Chrome DevTools MCP backend, refreshes observations after page changes, distinguishes slow reads from lost connections, and provides recovery guidance instead of leaving every error to the user. It preserves a pending connection attempt instead of starting another approval attempt, and avoids unnecessary reconnections that can trigger fresh Chrome consent prompts. Action receipts and tab ownership support that persistence: they let an agent investigate what happened before trying more input.

**Reported result, November 29, 2026:** James estimates that browser work previously succeeded roughly 60–70% of the time and reports 100% success in his recent use of XyFlow. This is his experience, without a measured task count or controlled comparison; it is not a published success-rate benchmark. The improvement has not been isolated to one component. Chrome consent and Windows authentication remain distinct from the recoverable connection and observation failures addressed here.

Actual workflow reports drove the iterations: missing keyboard interactions, tabs that intentionally close, editors that became unreadable, delayed reads that triggered reconnects, and older clients missing new capabilities. [Read the sequence of problems, decisions, and fixes.](docs/DEVELOPMENT-STORY.md)

## What it does

| Capability | Why it matters |
|---|---|
| **25 MCP tools** | Observe, navigate, click, fill, press keys, drag accessible elements, capture screenshots, inspect receipts, and coordinate recovery. |
| **One shared browser coordinator** | Each agent has its own identity; short tab leases coordinate cooperating clients. |
| **Fresh-document targeting** | Stable tab IDs, transport epochs, document checks, and observation tokens reject stale input. |
| **Durable action receipts** | Reusing a request ID reads the existing outcome rather than dispatching again. Uncertain outcomes require reconciliation. |
| **Bounded recovery** | Distinguish navigation races, slow reads, actual disconnects, pending consent, and unknown input outcomes. |
| **Compact observations** | Read a subtree or text match, paginate, and avoid returning duplicate full-page content. |
| **Shared improvement log** | Record normalized failures, workarounds, limitations, and ideas without copying page contents or credentials. |
| **Optional desktop recovery wrapper** | Coordinate observed click/key/scroll/drag actions when a supported host supplies its desktop runtime. |

```mermaid
flowchart LR
    A[AI clients / MCP] --> B[Per-client adapters]
    B --> C[Local Windows named pipe]
    C --> D[Shared Python coordinator]
    D <--> E[(SQLite action journal)]
    D --> F[Chrome DevTools MCP]
    F --> G[Chrome]
    D --> H[Recovery and feedback]
```

The controller, diagnostics, and recovery checks are deterministic local code. They make **no model API calls**. The AI client using these tools still incurs its normal model usage.

## Run it

This is a **Windows developer tool**. The browser core needs Python, Node.js, Chrome, and an MCP-capable client. Download and extract the release, open PowerShell in its directory, and run:

```powershell
.\Install.ps1
.\Test-Installation.ps1 -Json
```

Setup installs project dependencies and prepares local configuration. Browser enrollment, client registration, connection, and optional startup are separate steps in the [installation guide](docs/INSTALL.md). It does not silently connect to your browser or grant persistent access.

The optional native helper requires a host-provided supported `@oai/sky` runtime. That runtime is **not bundled or installed by XyFlow**. The browser core does not depend on it. See [desktop integration](desktop/USAGE.md).

## Evidence, with its scope intact

The public 0.4.1 release passed **645 Python tests with zero skips**, including disposable real-Chrome fixtures, and **43 native-wrapper fixture tests**. Its dependencies were installed into a separate environment, and the reproducible browser demo verified lease conflict and duplicate-request suppression. [Read the public validation evidence.](VALIDATION.md)

Earlier private 0.4.0 records include a controlled endurance exercise with two clients, three owned-helper crashes, and 48 fixture submissions observed exactly once. Those historical results remain distinct from the new public tests. Neither establishes an uptime guarantee or universal exactly-once website behavior.

Preserved releases were imported into Git as **retrospective, sanitized snapshots**, with original archive hashes and dates in [snapshot provenance](docs/history/snapshot-provenance.json). Git import dates are not backdated development dates.

## Boundaries

- Existing-profile Chrome consent can recur after connection replacement.
- A recorded input acknowledgment does not prove that a form, payment, or other business operation completed.
- Leases coordinate XyFlow clients; they cannot fence a person or unrelated automation changing the page.
- The desktop wrapper cannot currently prove native-input settlement after its issuing runtime disappears.
- Windows sign-in, PC power recovery, MFA, password-vault operations, and security-control bypasses are outside this controller.
- Native runtime access is optional and host-dependent. Live uploads require explicitly enrolled file roots.
- This is a personal project with local deployment experience, not a claim of enterprise adoption or a service-level agreement.

See [security and supported boundaries](SECURITY.md), [the tool catalog](TOOL-CATALOG.md), and [contribution guidance](CONTRIBUTING.md).

## For reviewers

Start with the [project brief](docs/PORTFOLIO.md), then follow one failure from the [development story](docs/DEVELOPMENT-STORY.md) into its implementation and tests. The central product question is: **how can an agent recover and finish the task without making the user troubleshoot its tools?**

Original project code is available under the [MIT License](LICENSE). Upstream components remain under their own licenses; see [third-party notices](THIRD-PARTY-NOTICES.md).