Skip to main content

Edge Agent Bridge

PyPI version Python versions License: MIT Sponsor Buy Me A Coffee

Control your real, active Microsoft Edge tabs directly from Python scripts and CLI commands.

Standard browser automation frameworks like Playwright, Puppeteer, and Selenium always spin up clean temporary profiles that don't have your logged-in cookies, which ends up triggering bot checks or breaking on company SSO portals. Edge Agent Bridge skips that headache by attaching straight to your running browser window, so you don't lose your active session, enterprise VPN, or saved logins. It dispatches hardware-level inputs through Chrome DevTools Protocol over a local RFC 6455 WebSocket.


Measured Benchmarks

Ran 50 sequential tab queries on Windows 11 to compare round-trip response times:

Setup P50 Latency Minimum Extra Dependencies Session State
Edge Agent Bridge (WebSocket) 12.4 ms 8.1 ms None (Standard Library) Live Edge Tabs
HTTP Long Polling 860 ms 125 ms None Live Edge Tabs
Playwright Browser Launch ~1,800 ms ~1,200 ms 5+ packages & binaries Blank Incognito

Installation

pip install edge-agent-bridge

Runs on Python 3.8+ without installing external packages.


Fast Setup

  1. Open edge://extensions in Microsoft Edge and toggle Developer mode on.
  2. Run edge-bridge extension open in your terminal to reveal the extension folder.
  3. In Edge, select "Load unpacked" and pick that folder.
  4. Verify the connection by running:
    edge-bridge status
    

Python API

from edge_agent_bridge import Edge

with Edge() as browser:
    tab = browser.tab()
    print("Active:", tab["tab"]["title"])

    browser.nav("https://news.ycombinator.com")
    browser.hover("past")
    browser.click("comments")
    browser.fill("Search:", "AI agents")

    elements = browser.elements()
    print(f"Found {len(elements)} targets")

    browser.screenshot("hn.png")

Command Line Interface

# Check daemon and socket state
edge-bridge status

# Query active tab
edge-bridge tab

# List open tabs or jump to specific ID
edge-bridge tabs
edge-bridge switch 1234

# Hover by visible text label or coordinates
edge-bridge hover "Settings"
edge-bridge hover --x 450 --y 320

# Hardware click with trusted events
edge-bridge click "Sign In"
edge-bridge click "#submit-button"

# Double click, right click, or drag and drop
edge-bridge dblclick "File_01.pdf"
edge-bridge rightclick "Folder A"
edge-bridge drag "Task 1" "Done Column"

# Fill inputs and dispatch keyboard keys
edge-bridge fill "Search query" "LangChain vs AutoGPT"
edge-bridge key Enter
edge-bridge key Ctrl+A

# Extract element text or take viewport snapshots
edge-bridge text "#results-count"
edge-bridge screenshot output.png

Interactive REPL

If you're running repeated actions and want to skip Python startup overhead, launch the interactive shell:

edge-bridge repl
=== Edge Bridge Real-Time Interactive REPL ===
edge> tab
[11.8ms] {"success": true, "tab": {"id": 1459, "title": "GitHub"}}
edge> click "Pull requests"
[14.2ms] {"success": true, "x": 380, "y": 96, "native": true}
edge> fill "Type / to search" "bugfix"
[18.9ms] {"success": true, "text": "bugfix", "native": true}

Security Model

  • Localhost only: The daemon binds strictly to 127.0.0.1:18999 and refuses remote network traffic.
  • Origin check: Any browser page attempting to open ws://127.0.0.1:18999/ws gets rejected with 403 Forbidden, meaning web pages you browse cannot hijack the bridge.
  • Zero telemetry: Nothing leaves your computer.

Support & Sponsorship

Edge Agent Bridge is built by Shanewas Ahmed.

If this project saves you engineering hours or simplifies your agent workflows, consider supporting its development:

Sponsorship helps fund keeping CDP handlers aligned with rapid Chromium engine updates and maintaining zero-dependency Python packages.


License

MIT License. See LICENSE for details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

edge_agent_bridge-1.1.0.tar.gz (41.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

edge_agent_bridge-1.1.0-py3-none-any.whl (37.5 kB view details)

Uploaded Python 3

File details

Details for the file edge_agent_bridge-1.1.0.tar.gz.

File metadata

  • Download URL: edge_agent_bridge-1.1.0.tar.gz
  • Upload date:
  • Size: 41.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.4

File hashes

Hashes for edge_agent_bridge-1.1.0.tar.gz
Algorithm Hash digest
SHA256 950e16c7adca094a443c8e8f1a5eda249e2fb80caa607aa9f9482c8217a44023
MD5 a1f387a5c3d7d719ff787e8a77755c82
BLAKE2b-256 fc26c4d769550411c1625499765dee5af89143a8877b96e4858ce4f77d3632d4

See more details on using hashes here.

File details

Details for the file edge_agent_bridge-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for edge_agent_bridge-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f64575dcfb93b4d4be78f23e86b5783737cc8668414f6de34ee61b1784cb6126
MD5 2453b2b0aee93ce173f6db4db7c54641
BLAKE2b-256 4e9c55a5d6c9babf2d482bd12c737d2a7948bd40ad1430215f60f6c054ccf74f

See more details on using hashes here.

Release history Release notifications | RSS feed

2.0.2

2 files

2.0.1

2 files

2.0.0

2 files

1.2.1

2 files

1.2.0

2 files

1.1.2

2 files

1.1.1

2 files

This release

1.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page