Install
openclaw skills install external-ki-integration-backupSkill for accessing external AI services (ChatGPT, Claude, Hugging Face, etc.) via browser automation (Chrome Relay) and APIs to assist with tasks.
openclaw skills install external-ki-integration-backupUse external AI services via browser automation (ChatGPT, Claude, web‑based LLMs) and APIs (Hugging Face Inference, OpenAI‑compatible endpoints) to augment your capabilities.
browser tool with profile="chrome" (user must have attached a tab to OpenClaw Browser Relay).~/.openclaw/openclaw.json or provided as environment variable.The user must click the OpenClaw Browser Relay toolbar icon on the desired tab (badge ON). Verify attachment:
openclaw browser status
Or via browser tool: browser(action=status, profile="chrome").
If token already stored in config, it will be used automatically. Otherwise, ask user to provide it.
For API‑based access, you may set:
export OPENAI_API_KEY="sk-..."
export ANTHROPIC_API_KEY="sk-ant-..."
export HF_TOKEN="hf_..."
https://chat.openai.com, https://claude.ai, https://gemini.google.com).refs="aria" to locate UI elements.act with ref or selector.// 1. Navigate
browser(action="open", profile="chrome", targetUrl="https://chat.openai.com");
// 2. Snapshot after load
const snap = browser(action="snapshot", profile="chrome", refs="aria", interactive=true);
// 3. Find textbox (adapt ref based on snapshot)
browser(action="act", profile="chrome", request={ kind: "type", ref: "textbox:Message", text: "Your query here" });
// 4. Click send button
browser(action="act", profile="chrome", request={ kind: "click", ref: "button:Send" });
// 5. Wait for response (poll until new text appears)
// 6. Extract response
refs="aria" for stable references (aria‑role, aria‑name). Fall back to selector with CSS classes if needed.See the dedicated Hugging Face skill for detailed usage.
If user provides an API key, you can call models via curl or exec:
curl -s -X POST https://api.openai.com/v1/chat/completions \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4",
"messages": [{"role": "user", "content": "Hello"}]
}'
curl -s -X POST https://api.anthropic.com/v1/messages \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-3-opus-20240229",
"max_tokens": 1024,
"messages": [{"role": "user", "content": "Hello"}]
}'
system/logs/hf-costs.log. Stay within monthly budget (e.g., 33€). Notify user at 50% threshold.This skill complements:
Add this skill to skills/index.md:
| External KI Integration | skills/external‑ki‑integration/SKILL.md |