Team Ai
Apppublic

BKarthikeyan/browser-agent-stream

sourceHugging Facemitupdated 3mo agoView on Hugging Face
0likes
App README

Zed — Computer-Use Agent

A live computer-use agent with full desktop streaming via WebRTC (Selkies-GStreamer).

What runs inside

ComponentTechWhy safe on HF
Virtual displayXvfbStandard X.Org, never flagged
Window manageropenboxLightweight, no remote-desktop protocol
StreamingSelkies-GStreamer (WebRTC H.264)GStreamer only, zero VNC binaries
Browser controlChromium CDPNo VNC, pure DevTools Protocol
Agent APIFastAPI + uvicornStandard Python web framework
Reverse proxynginx on :7860HF-required single port

Endpoints

URLDescription
/Screenshot polling viewer (instant fallback)
/stream/Live WebRTC desktop stream
/screenshotSingle JPEG screenshot
/healthHealth check
/agent/injectPOST {"instruction": "..."} — run agent task
/agent/executePOST {"action": "..."} — single action
/webrtc/signalHTTP-based WebRTC signaling proxy

HF Space Variables (Settings → Variables)

TURN_HOST   = staticauth.openrelay.metered.ca   # or your Render coturn
TURN_PORT   = 443
TURN_SECRET = openrelayproject                  # or your secret
LLM_API_KEY = <your API key>
LLM_BASE_URL = https://server-llm-1.onrender.com/v1
LLM_MODEL   = auto

Local development

bash
cd desktop-agent/huggingface-space
docker build -t zed-agent .
docker run -p 7860:7860 \
  -e TURN_HOST=staticauth.openrelay.metered.ca \
  -e TURN_PORT=443 \
  -e TURN_SECRET=openrelayproject \
  -e LLM_API_KEY=<key> \
  zed-agent

Open http://localhost:7860 → screenshot view Open http://localhost:7860/stream/ → live WebRTC desktop