The Page Agent Chrome extension is an optional companion to theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/alibaba/page-agent/llms.txt
Use this file to discover all available pages before exploring further.
page-agent JavaScript library. While PageAgent.js handles in-page automation on its own, the extension adds three additional capabilities: running tasks that span multiple tabs, browser-level navigation control, and the ability to trigger automation from page JavaScript or from external agent systems (such as local MCP servers or cloud agents) via the window.PAGE_AGENT_EXT API.
Key Features
Multi-Page Tasks
Run tasks across multiple pages and tabs without being limited to a single page context.
Browser-Level Control
Enable richer automation including cross-tab navigation, page switching, and tab management.
Open Integration API
With explicit user authorization, page JS, local agents, or cloud agents can trigger multi-page tasks through the extension.
Installation
Install the extension
Install from the Chrome Web Store (stable) or GitHub Releases (faster updates):
- Chrome Web Store: Page Agent Ext
- GitHub Releases: alibaba/page-agent/releases
Install type definitions (recommended)
Add
@page-agent/core to your project for full TypeScript support:Quick Start
After setting the auth token, wait for the extension to injectwindow.PAGE_AGENT_EXT, then call execute:
API Reference
PAGE_AGENT_EXT.execute(task, config)
Executes a natural-language browser task. Returns a Promise<ExecutionResult> that resolves when the task completes (or fails).
Natural-language description of the task to perform.
LLM settings, scope options, and event callbacks. See the table below.
ExecuteConfig properties:
| Property | Type | Required | Description |
|---|---|---|---|
baseURL | string | Yes | LLM API endpoint URL |
model | string | Yes | Model name |
apiKey | string | No | LLM API key |
systemInstruction | string | No | Global system-level instructions (equivalent to AgentConfig.instructions.system) |
includeInitialTab | boolean | No | Whether to include the tab where execute was called. Default: true |
experimentalIncludeAllTabs | boolean | No | Control all unpinned tabs in the window instead of only the tab group. Default: false |
onStatusChange | (status: AgentStatus) => void | No | Called when agent lifecycle status changes |
onActivity | (activity: AgentActivity) => void | No | Called for real-time activity updates (thinking, executing, etc.) |
onHistoryUpdate | (history: HistoricalEvent[]) => void | No | Called after each step with the full event history |
PAGE_AGENT_EXT.stop()
Sends a cancellation signal to the currently running task. The task will stop at the next cooperative cancellation point.
PAGE_AGENT_EXT_VERSION
A version string injected alongside the main API object. Use it to check extension capabilities before calling the API:
Window Type Declaration
If you prefer not to install@page-agent/core, add the following declaration to your project: