Edge Agent Bridge
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. Install the Microsoft Edge Extension
You can install the extension via either method:
- Method A (Microsoft Edge Add-ons Store): Install the official Antigravity Edge Bridge extension from the Microsoft Edge Add-ons Store.
- Method B (Developer Mode / Unpacked):
- Open
edge://extensionsin Edge and toggle Developer mode on. - Run in terminal:
edge-bridge extension open
- Click Load unpacked and select that directory.
- Open
2. Verify Connection
Run in terminal:
edge-bridge status
When Microsoft Edge is open, the bridge daemon connects instantly over 127.0.0.1:18999 with sub-15ms WebSocket latency.
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:18999and refuses remote network traffic. - Origin check: Any browser page attempting to open
ws://127.0.0.1:18999/wsgets 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:
- GitHub Sponsors: github.com/sponsors/shanewas
- Buy Me a Coffee: buymeacoffee.com/shanewas
- Ko-fi: ko-fi.com/shanewas
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file edge_agent_bridge-1.1.2.tar.gz.
File metadata
- Download URL: edge_agent_bridge-1.1.2.tar.gz
- Upload date:
- Size: 53.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffa52bc9ca0190ae4778f0a169bed7ee4f2fb522c729d5b29e1e6612d1aadbb1
|
|
| MD5 |
d1033c7d3bf54f6734e8cbba1d2fca5a
|
|
| BLAKE2b-256 |
338caf026068f50c914dc509de9707fb49b6613b8edfe26cdea8ce5b3cd97e56
|
File details
Details for the file edge_agent_bridge-1.1.2-py3-none-any.whl.
File metadata
- Download URL: edge_agent_bridge-1.1.2-py3-none-any.whl
- Upload date:
- Size: 42.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8154b19f0e0482c5e2ad7c6154d6ccbc976a71f43c0b548051bb87911a2f9d5c
|
|
| MD5 |
ecb1e0d55ffafad5152bb6df4686cb7c
|
|
| BLAKE2b-256 |
aba6fef99037e89776394fff93dab910543b9c1d579097e2a772b7e28364ba1a
|