> For the complete documentation index, see [llms.txt](https://docs.maiagent.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.maiagent.ai/agent-builder/browser-tool.md).

# Browser Tool

## 這是什麼？ <a href="#what-is-this" id="what-is-this"></a>

Browser Tool 讓 Agent 能**操控瀏覽器**：自己導航到網頁、點擊按鈕、填寫表單、捲動畫面，並透過螢幕截圖「看見」當下頁面，再決定下一步要做什麼。

業界也常稱這類能力為 **Browser Use** 或 **Computer Use**。MaiAgent 的 Browser Tool 是內建在 Agent 上的版本，啟用後對話中就能直接使用，不需要額外串接外部服務。

## 能做什麼？ <a href="#what-it-can-do" id="what-it-can-do"></a>

* **導航與探索**：開啟指定 URL、跟著連結逐頁瀏覽
* **與頁面元素互動**：點擊、雙擊、輸入文字、按鍵、捲動
* **視覺理解**：每次操作後擷取截圖，Agent 看畫面決定下一步
* **多步任務**：登入 → 搜尋 → 篩選 → 取得資料這類連續流程

## 跟工具、Code Interpreter 有什麼不同？ <a href="#how-is-it-different" id="how-is-it-different"></a>

|            | 工具（API / MCP）       | Code Interpreter | Browser Tool   |
| ---------- | ------------------- | ---------------- | -------------- |
| **動作對象**   | 後端服務 / API          | 沙盒中的程式環境         | 真實瀏覽器與網頁       |
| **看得到畫面嗎** | 看不到（只有 JSON 回應）     | 看得到沙盒輸出          | **看得到**（截圖）    |
| **適合的任務**  | 結構化資料查詢、定義好的 API 呼叫 | 計算、處理檔案、產文件      | 沒有 API 但有網頁的服務 |

**簡單判斷**：對方有 API → 工具；要算東西／產檔 → Code Interpreter；只有網頁可以操作 → Browser Tool。

## 適合的場景 <a href="#when-to-use" id="when-to-use"></a>

* 沒有公開 API 的內部系統，但有 Web UI 可以操作
* 從第三方網站抓取需要登入或互動的資訊
* 自動化跨頁面、跨步驟的網頁流程（搜尋、篩選、下載）
* 任何「人在瀏覽器上會做的事」，但你想交給 Agent 自動完成

## 注意事項 <a href="#caveats" id="caveats"></a>

* **針對 Claude 模型最佳化**：Browser Tool 對視覺截圖的判讀依賴模型能力，使用 Claude 系列效果最佳，其他模型可能效果不穩。
* **同源頁面效果最佳**：跨域 iframe、嚴格 CSP 的網頁可能有部分操作受限。
* **執行需要時間**：每一步都要載入頁面、截圖、推理，連續多步任務會比一次 API 呼叫慢，請設計合理的場景。

## 我需要做什麼？ <a href="#what-do-i-need-to-do" id="what-do-i-need-to-do"></a>

1. **進入 Agent 設定** — 在你想啟用的 AI 助理設定頁
2. **開啟 Browser Tool** — 在工具或進階能力區啟用
3. **建議使用 Claude 模型** — 取得最佳的視覺判讀效果
4. **測試** — 在對話中請 Agent 執行一個需要操作網頁的任務，確認瀏覽器面板能正確顯示與互動


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.maiagent.ai/agent-builder/browser-tool.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
