Sign inSign up

superbizon007/antidetect-ghost-agent

By superbizon007

•Updated 5 months ago

Ghost Browser provides per-tab session isolation with distinct fingerprints, proxies, and cookies

Image
Machine learning & AI
0

762

superbizon007/antidetect-ghost-agent repository overview

⁠Ghost Browser Agent

A browser automation agent using Ghost Browser (Chromium-based anti-detect browser) connected via CDP (Chrome DevTools Protocol), controlled by a vision-language model (VLM).

Ghost Browser provides per-tab session isolation with distinct fingerprints, proxies, and cookies — making it well-suited for multi-account automation and anti-bot bypass scenarios.

⁠Architecture

┌─────────────────────────────────────────────┐
│  Docker Container                           │
│                                             │
│  ┌──────────────┐   CDP websocket           │
│  │ Ghost Browser│◄──────────────────────┐  │
│  │ (port 9223)  │                       │  │
│  └──────────────┘                       │  │
│         │ socat                         │  │
│         ▼                               │  │
│  0.0.0.0:9222 (external CDP)           │  │
│                                         │  │
│  ┌──────────────┐                       │  │
│  │ Python API   │  CDPClient ───────────┘  │
│  │ (port 443)   │  LangGraph + VLM         │
│  │ A2A + OpenAI │                          │
│  └──────────────┘                          │
│                                             │
│  VNC :5901 / noVNC :6901                   │
└─────────────────────────────────────────────┘

⁠Build

docker build \
  --build-context a2a_pkg=../../packages/a2a_agent \
  -f Dockerfile.ubuntu \
  -t ghost-browser-agent:latest \
  .
⁠Dev image (browser + VNC only, no API server)
docker build \
  --build-context a2a_pkg=../../packages/a2a_agent \
  -f Dockerfile.dev \
  -t ghost-browser-agent:dev \
  .

⁠Run

docker run -it \
  -p 443:443 \
  -p 6901:6901 \
  -p 5901:5901 \
  -p 9222:9222 \
  -e VLM_URL=https://api.openai.com/v1 \
  -e VLM_API_KEY=sk-... \
  -e VLM_MODEL=gpt-4o \
  ghost-browser-agent:latest
⁠Persist browser sessions across restarts

Mount a host directory to /data/ghost-profile — Ghost Browser will store all sessions, cookies, extensions, and profile data there:

docker run -it \
  -p 443:443 \
  -p 6901:6901 \
  -p 5901:5901 \
  -p 9222:9222 \
  -e VLM_URL=https://api.openai.com/v1 \
  -e VLM_API_KEY=sk-... \
  -e VLM_MODEL=gpt-4o \
  -v /host/path/ghost-profile:/data/ghost-profile \
  ghost-browser-agent:latest
⁠Load custom extensions

The image bundles extensions from files/extensions/ at /data/extensions/ by default. Mount your own directory to override:

  -v /host/path/my-extensions:/data/extensions \

Supported formats:

  • .crx files — auto-unpacked at startup (CRX2 and CRX3)
  • Unpacked directories — any subdirectory containing manifest.json

Override the path inside the container with GHOST_EXTENSIONS_DIR:

  -e GHOST_EXTENSIONS_DIR=/my/ext/path \
  -v /host/exts:/my/ext/path \
⁠Override the profile path
  -e GHOST_USER_DATA_DIR=/my/custom/path \
  -v /host/path:/my/custom/path \

⁠Environment Variables

VariableDefaultDescription
VLM_URLhttps://api.openai.com/v1VLM API endpoint
VLM_API_KEY``VLM API key
VLM_MODELgpt-4oVLM model name
CDP_HOSTlocalhostCDP host (internal)
CDP_PORT9223CDP port (internal, socat forwards from 9222)
VIEWPORT_WIDTH1920Browser viewport width
VIEWPORT_HEIGHT1080Browser viewport height
API_KEY``Bearer token for API auth (optional)
TRAJECTORY_DIRNoneEnable trajectory recording
SEND_IMAGEtrueSend screenshot to VLM (set false for text-only LLMs)
OMNIPARSER_URLNoneOmniParser API endpoint for element detection
OMNIPARSER_API_KEYNoneBearer token for OmniParser auth
LOCATOR_URLNoneUI localization model endpoint
LOCATOR_API_KEY``Bearer token for locator model auth
LOCATOR_MODELui-tarsLocator model name (e.g. bytedance/ui-tars-1.5-7b)
GHOST_USER_DATA_DIR/data/ghost-profileGhost Browser user data directory (sessions, cookies, profiles)
GHOST_EXTENSIONS_DIR/data/extensionsDirectory with extensions to load (.crx files or unpacked dirs)
SOCKS_PROXY``Transparent SOCKS5 proxy (e.g. socks5://host:1080)
WORKSPACE_IDNoneShared S3 workspace identifier
WORKSPACE_MOUNT_PATH/workspaceLocal mount point for S3 workspace
S3_BUCKETNoneS3 bucket for shared workspace
S3_ENDPOINT_URLNoneS3 endpoint URL (omit for AWS S3)
S3_ACCESS_KEY_IDNoneS3 access key
S3_SECRET_ACCESS_KEYNoneS3 secret key
S3_REGIONus-east-1S3 region
AGENT_IDghost_browser_agentUnique agent name written to blackboard
S3_PREFIX``Optional prefix before workspace_id in S3

⁠Ports

PortProtocolDescription
443HTTPSAgent API (A2A + OpenAI-compatible)
9222HTTPChrome DevTools Protocol (external, socat-forwarded)
5901VNCVNC server
6901HTTPnoVNC web client

⁠A2A Usage

The agent exposes a Google A2A JSON-RPC interface at https://host:443/.

Agent card: https://host:443/.well-known/agent.json

⁠Notes

  • Ghost Browser is an Electron/Chromium app — it requires a display (VNC is always started)
  • CDP internal port is 9223; socat forwards 0.0.0.0:9222 → 127.0.0.1:9223
  • Ghost Browser binary is expected at /opt/ghost-browser/ghost-browser after dpkg -i; the startup script also checks /opt/ghost-browser-stable/, /usr/bin/, /usr/local/bin/

⁠MCP tools

The agent image exposes an MCP (Model Context Protocol) server on the same port as A2A at /mcp. Any MCP client — Claude Desktop, Cursor, Windsurf, ChatGPT Connectors, OpenAI Agents SDK — can list and invoke these tools using the pod's API_KEY as Bearer.

In production, Core proxies https://antidetect-ghost-agent.agents.forfetch.ai/mcp → the worker pod's /mcp.

Tool (skill_id)Description
navigateNavigate to a URL inside an isolated Ghost Browser identity
clickClick on an element or coordinates
double_clickDouble-click on an element
typeType text into a focused element
scrollScroll the page
screenshotTake a screenshot of the current page
extract_textExtract text content from the page
evaluate_jsExecute JavaScript in the browser

Input schemas are authored in apps/agents_mcp/app/seed.py. Skills without an explicit schema advertise a single {task: str} freeform parameter.

Tag summary

Content type

Image

Digest

sha256:3eb0a615d…

Size

904.6 MB

Last updated

5 months ago

docker pull superbizon007/antidetect-ghost-agent