Interact with web-based LLMs through the Chrome Relay extension. This skill enables automated conversations with AI models, supporting both simple queries and multi-turn research workflows.
Currently supported: Qwen AI (chat.qwen.ai) — more models coming soon.
Modern web-based LLMs (like Qwen) offer:
This skill leverages OpenClaw's Chrome Relay to:
Bottom line: Use OpenClaw to orchestrate powerful web-based LLMs at a fraction of the API cost, with better research quality than raw search APIs.
ModelStatusNotesQwen AI (chat.qwen.ai)✅ SupportedFull support for search, RAG, and multi-turn conversationsMore models🚧 Coming soonOpen an issue to request support for other web-based LLMs
chat.qwen.ai/*)127.0.0.1:18789 (default)ws package installedInstall the ws package using your preferred package manager:
bash
# npm
npm install ws
# yarn
yarn add ws
# pnpm
pnpm add ws
bash
node scripts/qwen_chat.js status
bash
# Plain text (default)
node scripts/qwen_chat.js send "What is machine learning?"
# With custom wait time (for long responses)
node scripts/qwen_chat.js send "Explain RAG in detail" --wait 120
# Get response in Markdown format (preserves formatting)
node scripts/qwen_chat.js send "Write a Python function" --format markdown
# Get raw HTML
node scripts/qwen_chat.js send "Create a table" --format html
bash
node scripts/qwen_chat.js read
status#Check if Chrome Relay is connected and Qwen tab is active.
bash
node scripts/qwen_chat.js status
Output:
text
Extension: ✅ Connected
Qwen tab: ✅ Qwen Chat
URL: https://chat.qwen.ai/c/...
send#Send a message to Qwen and receive the response.
bash
node scripts/qwen_chat.js send "your message" [options]
Options:
OptionDescriptionDefault--wait NMaximum wait time in seconds45--format text|markdown|htmlOutput formattext--debug-extractShow extraction debugging infooff
Output Formats:
text — Plain text outputmarkdown — Preserves code blocks, tables, lists, headers, and formattinghtml — Raw HTML from the pageread#Read the current page content (useful for debugging or reviewing conversation history).
bash
node scripts/qwen_chat.js read
research#Run multi-round research on a topic (fixed stages, consider using agent-orchestrated mode instead).
bash
node scripts/qwen_chat.js research "AI safety" --rounds 10 --wait 120
The script uses a robust extraction strategy:
bodyLen unpredictablyFor multi-turn research, use agent-orchestrated mode instead of the fixed research command. This allows the agent to dynamically control the conversation based on Qwen's responses.
text
1. Determine research topic
2. Ask first question (open-ended, let Qwen expand)
3. Read Qwen's response
4. Analyze the response:
- Which point deserves deeper exploration?
- Which claim needs cross-validation?
- Any contradictions or gaps?
5. Ask follow-up question based on analysis
6. Repeat steps 3-5 for 5-10 rounds
7. Final round: Ask Qwen to summarize, agent also compiles its own summary
bash
# Agent sends question and waits for response
node scripts/qwen_chat.js send "What are the key challenges in RLHF?" --wait 120
# Agent can read full page if needed
node scripts/qwen_chat.js read
Good follow-ups come from Qwen's response:
Response PatternFollow-up DirectionMentions data/statistics"What's the original source? Sample size?"Gives opinion without evidence"Any research supporting this claim?"Mentions controversy"What are the counter-arguments?"Uses "possibly/maybe""Under what conditions does this hold?"Lists multiple factors"Which one is most critical? Why?"Mentions case study"Has this case been challenged by other researchers?"Goes off-topic"Back to the core question, specifically..."
--wait 180 for search-heavy questions, --wait 60 for simple onesbash
node scripts/qwen_chat.js send "test message" --wait 90 --debug-extract
This shows:
IssueSolutionExtension disconnectedCheck Chrome extension badge shows ONNo Qwen tab foundOpen chat.qwen.ai and attach extensionResponse not capturedIncrease --wait time, use --debug-extract to diagnoseMarkdown formatting brokenCode blocks use Monaco Editor; extraction handles this automatically
The script auto-derives the relay token from the OpenClaw config. Config priority:
E:\.openclaw\.openclaw\openclaw.json (Windows)~/.openclaw/.openclaw/openclaw.json (Unix)1878918792 (Gateway + 3)research command uses fixed stages — use agent-orchestrated mode insteadtext
qwen-chat/
├── SKILL.md # This file
├── scripts/
│ ├── qwen_chat.js # Main script
│ ├── _diagnose_selectors.js # Diagnostic tools
│ └── _analyze_format.js # Format analysis
└── references/
└── chrome-relay.md # Chrome Relay setup guide
See LICENSE file for details.