Install
openclaw skills install ai-orchestratorDeepSeek AI access via Puppeteer browser automation with CDP interceptor. Persistent daemon (~35ms startup), health checks, graceful shutdown, PM2 management. Configurable via `.deepseek.json`. Use when: (1) need DeepSeek responses without API key, (2) code analysis, review, or generation, (3) text analysis, summarization, translation, (4) "consult DeepSeek" or ask-deepseek.sh.
openclaw skills install ai-orchestratorWhat this is: Browser automation that talks to DeepSeek via Puppeteer. What this is NOT: A general AI router or multi-model orchestrator. It's one browser → one LLM.
Working directory rule: Unless a command here uses an absolute path, run ai-orchestrator commands from the skill root: ~/.openclaw/workspace/skills/ai-orchestrator.
If you are not already there, run:
cd ~/.openclaw/workspace/skills/ai-orchestrator
Relative paths such as .daemon-ws-endpoint, .profile/, .deepseek.json, and scripts/setup-daemon.sh assume this directory.
# Simple question
ask-deepseek.sh "What is HTTP?"
# Session (keeps context between questions)
ask-deepseek.sh "Explain OAuth2" --session work
ask-deepseek.sh "What about OpenID Connect?" --session work
ask-deepseek.sh --session work --end-session
# With daemon (fast startup ~35ms vs ~15s cold)
ask-deepseek.sh "Question" --daemon
# Pipe code or long prompts
cat code.py | ask-deepseek.sh "Find bugs"
ask-deepseek.sh --stdin < code.py
ask-deepseek.sh <<'EOF'
Long multi-line prompt here
EOF
| Task | ai-orchestrator | Direct API | Manual browser |
|---|---|---|---|
| Code analysis / review | ✅ Fast, no API key | Needs API | ❌ Slow |
| Text analysis / summary | ✅ (with --daemon) | Needs API | ❌ Tedious |
| Brainstorming | ❌ (use Dual Thinking skill) | Needs API | ❌ |
| Web scraping | ❌ Wrong tool | ❌ | ✅ |
| API testing | ❌ Overkill | ✅ | ❌ |
| CAPTCHA solving | ❌ Will fail | ❌ | ✅ (manual) |
Rule: Need LLM reasoning without API key → ai-orchestrator.
Need browser tasks (scrape, click, fill forms) → use agent-browser skill instead.
Default site mode: ai-orchestrator must keep DeepSeek in Expert mode whenever the site exposes the Instant / Expert switch. Treat Expert as the canonical default. Do not fall back to Instant unless a future implementation explicitly adds an override and the user asks for it.
Session continuity: in daemon mode, follow-up requests using --session NAME must restore the exact saved DeepSeek chatUrl for that session unless --new-chat was explicitly requested. Reusing an arbitrary open DeepSeek tab is incorrect because it breaks multi-round review continuity.
| Flag | Purpose |
|---|---|
--session NAME | Persistent context across requests (keeps chat history) |
--daemon | Use running Chrome daemon (~35ms startup) |
--search | Enable DeepSeek web search capability |
--think | Enable DeepThink site mode (deeper reasoning) |
--new-chat | Start new chat within existing session |
--end-session | Close and clean up session |
--visible | Open visible browser (for auth/CAPTCHA fixes) |
--wait | Wait for manual auth completion (with --visible) |
--close | Force close browser after request |
--dry-run | Test auth + composer without sending prompt |
--stdin | Explicitly read prompt body from stdin |
--debug | Verbose debug output |
--verbose | More detailed logs |
-h, --help | Show help |
# 1. Daemon running?
pm2 status | grep -q "deepseek.*online" || echo "Daemon down"
# 2. Dry-run path works?
ask-deepseek.sh --dry-run --daemon || echo "DeepSeek dry-run failed" # Checks auth + composer through the daemon path
# 3. Real response path works?
ask-deepseek.sh "OK" --daemon | grep -q "OK" || echo "DeepSeek not responding"
If any step fails, do not improvise. Use the troubleshooting ladder below.
When any command fails:
| If you see this symptom | Run this exact command | Then verify with |
|---|---|---|
Connection refused, ECONNREFUSED, daemon not online | pm2 restart deepseek-daemon && sleep 8 && ask-deepseek.sh --dry-run --daemon | ask-deepseek.sh "Say OK" --daemon |
auth expired, CAPTCHA, login page, 401, 403 | cd ~/.openclaw/workspace/skills/ai-orchestrator && pm2 stop deepseek-daemon && rm -f .daemon-ws-endpoint && bash ask-deepseek.sh --visible --wait --dry-run && pm2 start deepseek-daemon | bash ask-deepseek.sh --dry-run --daemon |
| response cuts off / incomplete long answer | ask-deepseek.sh "Part 1" --session temp && ask-deepseek.sh "Continue with next part" --session temp | ask-deepseek.sh --session temp --end-session |
lock, Singleton, profile already in use | cd ~/.openclaw/workspace/skills/ai-orchestrator && rm -f .profile/Singleton* && pm2 restart deepseek-daemon | bash ask-deepseek.sh --dry-run |
timeout, selector missing, composer not found | ask-deepseek.sh --dry-run --visible | only after manual inspection consider selector edits |
Do not keep guessing. Reset to a known-good baseline:
cd ~/.openclaw/workspace/skills/ai-orchestrator
pm2 stop deepseek-daemon
pkill -f puppeteer || true
rm -f .daemon-ws-endpoint .profile/Singleton*
bash scripts/setup-daemon.sh
bash ask-deepseek.sh "Say OK" --daemon
If that still fails, escalate to manual auth/inspection with --visible --wait.
--wait blocks until you complete auth in the visible browser or interrupt the command yourself.
There is no automatic timeout documented here.
Use Ctrl+C if you need to abort.
One-liner:
cd ~/.openclaw/workspace/skills/ai-orchestrator && bash scripts/setup-daemon.sh
Or manual:
bash scripts/setup-daemon.sh # Or run step-by-step below
npm install # First time only
pm2 start deepseek-daemon.js --name deepseek-daemon --no-autorestart
pm2 save
pm2 startup # Auto-start on boot
| Code | Meaning | Action |
|---|---|---|
| 0 | Success — response received | Continue |
| 1 | Config/arg error | Check flags, run --help |
| 2 | DeepSeek unreachable or daemon unavailable | Check network, daemon endpoint, pm2 status |
| 3 | Blocked or rate limited | Wait 5s, retry, or use --visible |
Note: Partial success (truncated response) still returns 0. Use "Continue" button handling.
DEEPSEEK_SUBMIT_BLOCKED_OVERSIZE_PROMPT if delivery never succeeds..clawhubignore excludes local profile, diagnostics, logs, sessions, and daemon state files.--session for long conversations instead of single huge promptsask-deepseek.sh "Write a Python backend guide" --session guide
ask-deepseek.sh "Now cover async and databases" --session guide # Continue
ask-deepseek.sh --session guide --end-session # Done
After important orchestrator runs, append to memory/episodic/YYYY-MM-DD.md:
## ai-orchestrator
- Task: code review app.js (tool: deepseek, duration: 12s, status: success)
- Failure: CAPTCHA on deepseek (fallback: manual via --visible)
Not every request needs logging. Log decisions and failures, not routine questions.
--session chunks instead{
"idleTimeout": 15000,
"heartbeatInterval": 15000,
"domErrorIdleMs": 25000,
"maxContinueRounds": 30,
"logToFile": true,
"logPath": ".logs/deepseek.log"
}
0 = success, 1 = config/runtime error, 2 = DeepSeek unreachable or daemon unavailable, 3 = blocked or rate-limited. Never treat 2 or 3 as success.Instant / Expert, ai-orchestrator must use Expert unless the user explicitly requests otherwise via a future supported override.--session NAME must restore the exact saved chatUrl unless --new-chat was explicitly requested..clawhubignore exists and excludes local runtime state.When choosing what to do next, use these defaults:
--daemon--session--new-chat--end-session--visible --wait --dry-run--dry-run--session and split it into chunksagent-browser, not ai-orchestrator`Expert mode when that switch exists--think is used, enable the site DeepThink toggle before sending the promptSee REFERENCE.md for: