ワンクリックで
Browser Use Cloud API integration for autonomous web browsing
npx skills add https://github.com/seanchiuai/trace --skill browser-automationこのコマンドをClaude Codeにコピー&ペーストしてスキルをインストール
Browser Use Cloud API integration for autonomous web browsing
npx skills add https://github.com/seanchiuai/trace --skill browser-automationこのコマンドをClaude Codeにコピー&ペーストしてスキルをインストール
React component architecture, dark theme design system, and animation patterns
Claude Opus agentic loop — think, pick tool, execute, repeat
Convex database schema, mutations, queries, actions, and scheduler patterns
OSINT tool integrations for intelligence gathering
Convex real-time subscriptions powering live investigation updates
| name | browser-automation |
| description | Browser Use Cloud API integration for autonomous web browsing |
Browser Use Cloud provides "dumb hands" for the AI investigator. The orchestrator (Opus) sends natural language instructions, Browser Use executes them in a cloud browser, and returns extracted page text. The user can watch via a live iframe.
Base URL: https://api.browser-use.com/api/v3
Auth: X-Browser-Use-API-Key: {BROWSER_USE_API_KEY}
| Endpoint | Method | Purpose |
|---|---|---|
/sessions | POST | Create session + run a task (combined in v3) |
/sessions/{sessionId} | GET | Poll session status until idle/stopped/error |
/sessions/{sessionId}/stop | POST | Stop a session |
| Status | Meaning |
|---|---|
created | Sandbox spinning up |
running | Task currently executing |
idle | Task finished, session alive (keepAlive: true), ready for next task |
stopped | Session terminated |
timed_out | Session exceeded time limit |
error | Session encountered an error |
// convex/tools/browserUse.ts — runTask
// v3: session creation and task execution are combined
const body: Record<string, unknown> = {
task: "Go to imginn.com/johndoe and describe what you see",
keepAlive: true,
};
if (existingSessionId) {
body.sessionId = existingSessionId; // reuses session
}
const createRes = await fetch(`${API}/sessions`, {
method: "POST",
headers: getHeaders(),
body: JSON.stringify(body),
});
const created = await createRes.json();
const sessionId = created.id;
// Poll GET /sessions/{id} until status is "idle" (finished)
// Adaptive polling: 1s for first 10 checks, then 2s after
// Max 200 attempts (~6 minutes)
Before reusing a session, waitForSessionIdle() polls the session status for up to 60s:
idle → reuse by passing sessionId in the POST bodystopped, timed_out, error) → create a fresh sessionrunning/created → wait up to 60s, then create freshTerminal states return structured results with recovery hints instead of throwing:
// Instead of: throw new Error("Browser Use task timed out")
// Returns:
{
output: "Browser timed out. RECOVERY: Use web_search instead.",
sessionId,
liveUrl,
status: "timed_out",
}
This lets the orchestrator pass the recovery hint to Opus, which can then switch to web_search.
The orchestrator limits browser actions to MAX_BROWSER_ACTIONS (6) per investigation:
browserActionsUsed counter across stepsbrowser_action is removed from available tools[Browser limit reached. Use web_search for all remaining lookups.]startInvestigation checks maigret health, builds initial context, starts the step loopbrowser_action call creates the session; sessionId and liveUrl stored on investigationbrowser_action calls reuse the session via waitForSessionIdlebrowserLiveUrl and renders it in BrowserView iframecleanupBrowserSession stops the sessionsrc/components/BrowserView.tsx
All functions are internalAction — only callable by the orchestrator.
| Function | File | Purpose |
|---|---|---|
runTask | convex/tools/browserUse.ts | Create/reuse session + run task + poll until idle (up to ~6 min) |
getSession | convex/tools/browserUse.ts | Fetch session details |
stopSession | convex/tools/browserUse.ts | Stop a session (POST to /stop endpoint) |
waitForSessionIdle ensures the session is ready before sending a new taskmodel: "bu-2-0" for +12% accuracyallow-same-origin allow-scripts allow-forms allow-popups needed for Browser Use playerrunTask retries up to 2 times with 3s delay for server errorsstopSession treats 404 as success — session may already be goneRECOVERY: hints, not exceptions