feat: add multi-port support for parallel server instances#15
feat: add multi-port support for parallel server instances#15cs50victor wants to merge 1 commit intoSawyerHood:mainfrom
Conversation
Add --port and --cdp-port CLI flags to server.sh to enable running multiple dev-browser instances in parallel. This allows different subagents to each control their own browser instance. Usage: ./server.sh --port 9222 # instance 1 ./server.sh --port 9224 # instance 2 (parallel) CDP port defaults to port + 1 unless explicitly set via --cdp-port.
|
I have hit this same issue, I regularly have sub-agents doing work to speed things up, and discovered that dev-browser is in fact a single point of congestion now, nullifying the advantages of dev browser. Your approach @cs50victor could work, but then that requires agents to manage the assignment of ports based on availability and awareness of other sub-agents to doing work. I wonder if there's a better way, such as:
@SawyerHood interested in your thoughts on this. |
When multiple AI agents run browser automation tasks in parallel, they need separate HTTP API ports while potentially sharing the same browser instance. This adds automatic port allocation to avoid conflicts. Key changes: - Add port-manager.ts for dynamic port allocation (range 9222-9300) - Server tracking via ~/.dev-browser/active-servers.json - PORT=XXXX output for agent discovery - Config file support at ~/.dev-browser/config.json - Update both standalone and external browser modes Architecture: Agent 1 → server (port 9222) ┐ Agent 2 → server (port 9224) ├→ Shared Browser (CDP 9223) Agent 3 → server (port 9226) ┘ See docs/CONCURRENCY.md for design decisions and usage examples. Addresses concerns raised in PR SawyerHood#15 about single-point congestion.
|
auto port discovery would make the skill a lot easier for the model to use. I second this redesign. |
See #24. |
Add --port and --cdp-port CLI flags to server.sh to enable running multiple dev-browser instances in parallel. This allows different subagents to each control their own browser instance.
Usage:
./server.sh --port 9222 # instance 1
./server.sh --port 9224 # instance 2 (parallel)
CDP port defaults to port + 1 unless explicitly set via --cdp-port.