Skip to content

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

1.3 KB
Raw Blame
{
  "id": "080",
  "user": "close all my tabs except this one",
  "tab": {
    "url": "about:home",
    "title": "New Tab"
  },
  "latencyMs": 15350,
  "error": null,
  "firstToolCall": {
    "name": "execute_js",
    "args": {
      "code": "\nconst currentTab = await chrome.tabs.getCurrent();\nconst allTabs = await chrome.tabs.query({});\nconst tabsToClose = allTabs.filter(t => t.id !== currentTab.id).map(t => t.id);\nif (tabsToClose.length > 0) {\n  await chrome.tabs.remove(tabsToClose);\n}\nreturn `Closed ${tabsToClose.length} tab(s). Kept the current tab open.`;\n"
    }
  },
  "toolCallSource": "tool_calls",
  "finishReason": "tool_calls",
  "content": "I'll use the Chrome tabs API to close all other tabs while keeping this one open.\n\n",
  "usage": {
    "prompt_tokens": 17329,
    "completion_tokens": 709,
    "total_tokens": 18038,
    "cost": 0.002094656,
    "is_byok": false,
    "prompt_tokens_details": {
      "cached_tokens": 17024,
      "cache_write_tokens": 0,
      "audio_tokens": 0,
      "video_tokens": 0
    },
    "cost_details": {
      "upstream_inference_cost": 0.002094656,
      "upstream_inference_prompt_cost": 0.001187136,
      "upstream_inference_completions_cost": 0.00090752
    },
    "completion_tokens_details": {
      "reasoning_tokens": 570,
      "image_tokens": 0,
      "audio_tokens": 0
    }
  }
}