@agentium/browser

中文文档
4.11.0发布于 2026/10/24MITTypeScriptESM + CJS近 30 天下载 1900

Browser automation agent for Agentium using Playwright

原始使用文档
文档目录7 节
  1. Custom tool execution boundary
  2. Install
  3. Quick Start
  4. Documentation
  5. Community
  6. License
  7. DOM observation privacy

@agentium/browser

Browser automation agent for Agentium using Playwright.

Custom tool execution boundary

Custom ToolDefs execute through the core ToolExecutor, including Zod validation, mandatory executionPolicy, and approval/approvalManager decisions. Explicit approval requirements fail closed without an approver. run(task, { context }) accepts an inherited RunContext; asTool() forwards the parent context automatically, preserving identity, tenant, session, policy, and cancellation. Completing a nested browser run leaves unrelated parent approvals pending.

Standalone runs accept sessionId, userId, tenantId, signal, and runMode. Plan mode rejects browser execution before launch because native browser actions do not yet have a host-owned effect classifier. In execute mode, the custom-tool policy does not govern native click/type/navigation/evaluate actions. Configure the existing browser controls for those operations; this change does not claim native browser sandboxing.

Install

npm install @agentium/browser playwright

Quick Start

import { BrowserAgent } from "@agentium/browser";
import { openai } from "@agentium/core";

const agent = new BrowserAgent({
  name: "browser-bot",
  model: openai("gpt-4o"),
  instructions: "Navigate websites and extract information.",
});

const result = await agent.run("Go to example.com and get the page title");
console.log(result.result);

Jev can pick the next click from a closed per-step list (planner: "jev"). Do not set model: jev().

const agent = new BrowserAgent({
  name: "jev-browser",
  model: openai("gpt-4o-mini"),
  planner: "jev",
});

Documentation

Full docs at docs.agentium.in

Community

Join the conversation on Discord.

License

MIT

DOM observation privacy

Element labels use explicit labels, ARIA text, placeholders and names; filled input, textarea and contenteditable values are excluded. This covers password, OTP and payment fields without relying on their input type. It does not redact arbitrary visible page text or screenshot pixels. Hosts should choose observation modes appropriate to the page and keep credentials behind the existing credential references.

版本与发布记录

@agentium/browser 共发布 40 个版本,首次发布于 2026/05/22;过去 12 个月发布了 40 个版本。

版本发布日期距今
4.11.0latest2026/10/2415 天前
4.10.02026/10/2415 天前
4.9.02026/10/1326 天前
4.8.32026/10/1227 天前
4.8.22026/10/1029 天前
4.8.12026/10/1029 天前

关于 @agentium/browser 的常见问题

@agentium/browser 是什么?

Browser automation agent for Agentium using Playwright

如何安装 @agentium/browser?

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

@agentium/browser 支持 TypeScript 吗?

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

@agentium/browser 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@agentium/browser 需要什么版本的 Node.js?

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

@agentium/browser 可以商用吗?

@agentium/browser 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@agentium/browser 的下载量有多少?

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

@agentium/browser 还在维护吗?

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