@framers/agentos-ext-web-browser

中文文档
1.3.5发布于 2026/11/11Apache-2.0TypeScriptES Module构建来源已验证近 30 天下载 2万

Browser automation extension for AgentOS

原始使用文档
文档目录17 节
  1. Features
  2. Installation
  3. Quick Start
  4. Tools
  5. browser_navigate
  6. browser_scrape
  7. browser_click
  8. browser_type
  9. browser_screenshot
  10. browser_snapshot
  11. Configuration
  12. Use Cases
  13. Web Research Agent
  14. Form Automation
  15. Visual Verification
  16. Dependencies
  17. License

Web Browser Extension for AgentOS

Browser automation capabilities for AgentOS agents - navigate pages, scrape content, click elements, and capture screenshots.

Features

  • Navigate: Go to any URL and get page content
  • Scrape: Extract content using CSS selectors
  • Click: Interact with page elements
  • Type: Fill in forms and input fields
  • Screenshot: Capture visual snapshots
  • Page Snapshot: Get accessibility tree for intelligent interaction

Installation

npm install @framers/agentos-ext-web-browser

Quick Start

import { AgentOS } from '@framers/agentos';

const agentos = await AgentOS.create({
  extensionManifest: {
    packs: [
      {
        package: '@framers/agentos-ext-web-browser',
        options: {
          headless: true,
          timeout: 30000,
          viewport: { width: 1920, height: 1080 },
        },
      },
    ],
  },
});

Tools

browser_navigate

Navigate to a URL and retrieve page content.

const result = await gmi.executeTool('browser_navigate', {
  url: 'https://example.com',
  waitFor: 'networkidle2',
  returnText: true
});
// Returns: { url, status, title, text, loadTime }

browser_scrape

Extract content using CSS selectors.

const result = await gmi.executeTool('browser_scrape', {
  selector: 'article h2',
  limit: 10
});
// Returns: { selector, count, elements: [{ tag, text, html, attributes }] }

browser_click

Click on an element.

const result = await gmi.executeTool('browser_click', {
  selector: 'button.submit',
  waitForNavigation: true
});
// Returns: { success, element, newUrl }

browser_type

Type text into an input field.

const result = await gmi.executeTool('browser_type', {
  selector: 'input[name="search"]',
  text: 'AgentOS documentation',
  clear: true
});
// Returns: { success, element, text }

browser_screenshot

Capture a screenshot.

const result = await gmi.executeTool('browser_screenshot', {
  fullPage: true,
  format: 'png'
});
// Returns: { data (base64), format, width, height, size }

browser_snapshot

Get accessibility tree for intelligent interaction.

const result = await gmi.executeTool('browser_snapshot', {});
// Returns: { url, title, elements, links, forms, interactable }

Configuration

OptionTypeDefaultDescription
headlessbooleantrueRun browser in headless mode
timeoutnumber30000Default timeout (ms)
userAgentstring-Custom user agent
viewport.widthnumber1920Viewport width
viewport.heightnumber1080Viewport height
executablePathstringautoPath to Chrome executable

Use Cases

Web Research Agent

// Search and scrape information
await gmi.executeTool('browser_navigate', { url: 'https://google.com' });
await gmi.executeTool('browser_type', { selector: 'input[name="q"]', text: 'AI agents 2024' });
await gmi.executeTool('browser_click', { selector: 'input[type="submit"]', waitForNavigation: true });
const results = await gmi.executeTool('browser_scrape', { selector: '.g h3' });

Form Automation

await gmi.executeTool('browser_navigate', { url: 'https://signup.example.com' });
await gmi.executeTool('browser_type', { selector: '#email', text: '[email protected]' });
await gmi.executeTool('browser_type', { selector: '#password', text: 'securepass123' });
await gmi.executeTool('browser_click', { selector: 'button[type="submit"]' });

Visual Verification

await gmi.executeTool('browser_navigate', { url: 'https://myapp.com' });
const screenshot = await gmi.executeTool('browser_screenshot', { fullPage: true });
// Send screenshot to vision model for analysis

Dependencies

This extension requires Chrome/Chromium to be installed on the system. It uses puppeteer-core which does not bundle a browser.

License

Apache-2.0 © Frame.dev

版本与发布记录

@framers/agentos-ext-web-browser 共发布 10 个版本,首次发布于 2026/02/06;过去 12 个月发布了 10 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.3.5latest2026/11/114 天前
1.3.42026/11/0115 天前
1.3.32026/10/2125 天前
1.3.22026/10/121 个月前
1.3.12026/10/111 个月前
1.3.02026/10/081 个月前

关于 @framers/agentos-ext-web-browser 的常见问题

@framers/agentos-ext-web-browser 是什么?

Browser automation extension for AgentOS

如何安装 @framers/agentos-ext-web-browser?

在项目目录运行 npm install @framers/agentos-ext-web-browser,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@framers/agentos(>=0.10.40)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@framers/agentos-ext-web-browser 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@framers/agentos-ext-web-browser 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@framers/agentos-ext-web-browser 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@framers/agentos-ext-web-browser 可以商用吗?

@framers/agentos-ext-web-browser 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@framers/agentos-ext-web-browser 的下载量有多少?

根据 npm 官方下载统计,@framers/agentos-ext-web-browser 在 2026/10/16 – 2026/11/14 这 30 天内被下载 20,402 次,日均约 680 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@framers/agentos-ext-web-browser 还在维护吗?

最新版本 1.3.5 发布于 2026/11/11(4 天前);至今共发布 10 个版本,其中过去 12 个月发布了 10 个;首次发布于 2026/02/06。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。