Skip to content

Open-source AI browser agent for Chrome and Firefox (monorepo) 🧠

1.5 KB
Raw Blame
{
  "id": "080",
  "user": "close all my tabs except this one",
  "mode": "act",
  "tab": {
    "url": "about:home",
    "title": "New Tab"
  },
  "latencyMs": 10279,
  "error": null,
  "firstToolCall": {
    "name": "execute_js",
    "args": {
      "code": "(async () => {\n  if (typeof chrome === 'undefined' || !chrome.tabs) {\n    return { ok: false, error: 'chrome.tabs not available' };\n  }\n  const current = await chrome.tabs.query({ active: true, currentWindow: true });\n  const currentId = current[0] && currentId = current[0].id;\n  const all = await chrome.tabs.query({});\n  const toRemove = all.filter(t => t.id !== currentId).map(t => t.id);\n  if (toRemove.length) {\n    await chrome.tabs.remove(toRemove);\n  }\n  return { ok: true, removed: toRemove.length, kept: currentId };\n})();"
    }
  },
  "toolCallSource": "tool_calls",
  "finishReason": "tool_calls",
  "content": "I'll close all your other tabs while keeping this New Tab open. Let me use the browser's tab API to do this cleanly.",
  "usage": {
    "prompt_tokens": 17252,
    "completion_tokens": 1608,
    "total_tokens": 18860,
    "cost": 0,
    "is_byok": false,
    "prompt_tokens_details": {
      "cached_tokens": 0,
      "cache_write_tokens": 0,
      "audio_tokens": 0,
      "video_tokens": 0
    },
    "cost_details": {
      "upstream_inference_cost": 0,
      "upstream_inference_prompt_cost": 0,
      "upstream_inference_completions_cost": 0
    },
    "completion_tokens_details": {
      "reasoning_tokens": 1409,
      "image_tokens": 0,
      "audio_tokens": 0
    }
  }
}