使用代理内置的 web_fetch 连接到任意 REST API,自动处理认证头、JSON 请求体、错误解析和重试。适用场景:用户想要...
Install: clawhub install smart-api-connector
REST API integration using built-in tools. No code, no curl, no dependencies.
Detect from user's message language. Default: English.
User provides: API URL + what they want. Agent handles everything.
User: "Hent brukerinfo fra https://api.example.com/v1/users/123"
Agent runs:
web_fetch https://api.example.com/v1/users/123(with auth headers if provided)Returns parsed response.
text
web_fetch url --headers '{"Authorization": "Bearer KEY", "X-API-Key": "KEY"}'
text
exec: API_KEY="your_key" curl -s -H "Authorization: Bearer $API_KEY" "https://..."
API keys provided in conversation are used in-session only. Never persisted to files.
HTTP StatusAction200-299Parse and return response429Rate limited — wait and retry (max 3 retries)400Bad request — show error, suggest fix401/403Auth failed — check key, permissions404Not found — verify URL5xxServer error — retry once, then report
MethodUse CaseGETFetch dataPOSTCreate data / send JSON bodyPUTUpdate dataDELETERemove data
For POST/PUT: prompt user for JSON body if not provided.
Always extract and present the useful parts. For JSON APIs:
text
Response:
Name: John
Email: john@example.com
Created: 2026-03-28
Raw: {first 200 chars if user wants detail}
User saysAction"query {url}"GET request"POST to {url}"POST with body"test API {url}"Request + show response"API health check"GET and report status
Install the full suite:
bash
clawhub install smart-api-connector workflow-builder-lite context-brief setup-doctor