Web Chat for Openclaw

A browser automation skill that enables AI agents to query Google Gemini and ChatGPT directly through a controlled Chrome instance.

ljie-pi
v1.0.0
Mar 7, 2026
0
911
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install web-chat

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install web-chat using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Web Chat?

Web Chat is a specialized technical skill designed to bridge the gap between AI agents and web-based LLM interfaces. By utilizing Playwright for browser automation, this skill allows agents to send queries to Google Gemini and ChatGPT just like a human user would. This is a vital component for developers looking to expand their library of Openclaw Skills, as it enables access to the latest web-only features and models without relying solely on traditional API endpoints.

The skill manages the entire browser lifecycle, including session persistence through a dedicated Chrome profile. This ensures that once a user logs in manually, the AI agent can continue to perform research and retrieve information across multiple sessions. It is specifically optimized for high-fidelity data retrieval, returning responses verbatim with citations preserved.

Web Chat Use Cases

  • Retrieving real-time information from Google Gemini through browser-based search capabilities.
  • Automating complex queries to ChatGPT to leverage its latest reasoning models.
  • Building multi-agent workflows that compare responses from different LLMs using Openclaw Skills.
  • Bypassing API constraints by interacting directly with chatbot web interfaces.

How Web Chat Works

  1. The agent identifies a trigger phrase such as "ask Gemini" or "ask ChatGPT" and extracts the user's raw query.
  2. The skill checks for an active Chrome instance running with the Chrome DevTools Protocol (CDP) on port 9222.
  3. If no browser is found, it executes a startup script to launch Chrome with a persistent user data directory.
  4. A Python script connects to the browser session and navigates to the target chatbot's URL (e.g., gemini.google.com).
  5. The script injects the query into the input field, monitors the DOM for the complete response, and extracts the text verbatim.
  6. The final response is passed back to the agent to be displayed to the user without any modification.

Web Chat Setup

To get started with this skill, ensure you have Python 3 installed and set up the virtual environment with the required dependencies:

cd {baseDir} && python3 -m venv .venv && .venv/bin/pip install -r requirements.txt

You must also ensure the Chrome browser is initialized with the correct remote debugging port:

{baseDir}/scripts/start_chrome.sh

Note: You must manually log in to your Google or OpenAI accounts within the automated browser window during the first run to save your session.

Web Chat Data Schema & Taxonomy

The skill organizes its operation around a persistent workspace and specific communication ports to maintain stability across multiple Openclaw Skills calls.

Component Path / Value Purpose
User Data ~/.openclaw/workspace/chrome_profile Persists login sessions and browser state.
CDP Port 9222 The communication bridge between Python and Chrome.
Gemini Script scripts/ask_gemini.py Logic for interacting with Google Gemini.
ChatGPT Script scripts/ask_chatgpt.py Logic for interacting with ChatGPT.

Web Chat Advanced Features

  • Built-in locking mechanism in the startup script to prevent multiple Chrome instances from clashing.
  • Configurable --timeout flags to handle varying response speeds from different AI models.
  • Support for --new-chat parameters to force a fresh context for sensitive or distinct queries.
  • Verbatim data extraction ensures that citations and structural formatting are not lost during the transfer to the agent.
  • Seamless integration with other Openclaw Skills for complex automated research tasks.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*