qwen-web-agent

Browser automation for 通义千问 (Qwen) web interface at qianwen.com. Use when the agent needs to ask questions to Qwen AI and get back responses via browser automation. Supports single-turn and multi-turn conversations. Launches a real Chromium browser (headed mode) via Playwright, handles login persistence, sends queries, and captures complete AI replies. Best for: (1) Getting AI answers from Qwen's web platform, (2) Automating Qwen queries from other agents/skills, (3) Integrating Qwen responses into automated workflows.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "qwen-web-agent" with this command: npx skills add dereksongyang/qwen-web-agent

Qwen Web Agent

Browser automation for 通义千问 (qianwen.com) using Playwright. Login session persists at ~/.qwen_session/.

Quick Start

Single-turn

python scripts/qwen_agent.py "你的问题"
echo "你的问题" | python scripts/qwen_agent.py

Multi-turn

printf "问题1\n问题2\n关闭" | python scripts/qwen_multi_agent.py

First Run (Manual Login Required)

The first launch opens a Chromium window — complete login in the browser, then the script continues automatically. Subsequent runs reuse the saved session.

Scripts

scripts/qwen_agent.py

Single-turn Q&A. Sends one query, waits for the streaming response to stabilize, saves to last_output.md, then cleans up the conversation.

Parameters:

  • --timeout N: Override timeout in seconds (default 120)

scripts/qwen_multi_agent.py

Multi-turn conversation. Reads queries from stdin line by line, maintains conversation context, writes all turns to qwen_session_history.md.

Exit commands: 关闭, exit, quit, or EOF

Environment Requirements

  • Python 3.x
  • pip install playwright python-dotenv
  • playwright install chromium
  • Display server (X11/Wayland) or Xvfb for headed mode

Architecture

Both scripts use Playwright async API with a persistent browser context. The response capture logic polls DOM selectors (#qk-markdown-react, .chat-answers-card-wrap, etc.) until the text stabilizes (streaming detection). Multi-turn additionally tracks response element count to distinguish new responses from cached ones.

References

See references/使用说明.md for detailed usage documentation.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

Find Agent

OceanBus-powered agent and service discovery via Yellow Pages. Use when users want to find someone, look for a service, reach out to an expert, discover anot...

Registry SourceRecently Updated
Automation

Captain Lobster

Zero-player AI trading game powered by OceanBus SDK. Your AI captain autonomously sails, trades, and negotiates P2P contracts across 11 goods × 10 ports — wh...

Registry SourceRecently Updated
Automation

Guess Who's AI?

OceanBus-powered social deduction game — find the AI impostors among humans. Use when hosting or joining a multiplayer "Who's the AI?" party via OceanBus P2P...

Registry SourceRecently Updated
Automation

Persona Switch

切换 agent 的人设(soul.md)。支持三套预设人设与原有人设之间自由切换。 触发词:切换人设、persona-switch、赛博朋友、温柔伴侣、创始人龙虾。

Registry SourceRecently Updated