← 返回
未分类 中文

Plasmate

Browse the web via Plasmate, a fast headless browser engine for agents. Compiles HTML into a Semantic Object Model (SOM) - 50x faster than Chrome, 10x fewer...
通过 Plasmate 浏览网页,这是一款面向 Agent 的快速无头浏览器引擎。它将 HTML 编译成语义对象模型 (SOM)——速度比 Chrome 快 50 倍,资源占用减少 10 倍……
builder-nc builder-nc 来源
未分类 clawhub v3.2.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 558
下载
💾 0
安装
1
版本
#latest

概述

Plasmate - Browser Engine for Agents

Plasmate compiles HTML into a Semantic Object Model (SOM). 50x faster than Chrome, 10x fewer tokens.

  • Docs: https://docs.plasmate.app
  • Source: https://github.com/plasmate-labs/plasmate (Apache 2.0)
  • Privacy: All processing runs locally. No telemetry or cloud services.

Install

# Build from source (recommended)
cargo install plasmate

# Or use the install script
curl -fsSL https://plasmate.app/install.sh | sh

Protocols

  • AWP (native): 7 methods - navigate, snapshot, click, type, scroll, select, extract
  • CDP (compatibility): Puppeteer/Playwright compatible on port 9222

Default to AWP. Use CDP only when existing Puppeteer/Playwright code needs reuse.

Quick Start

Fetch (one-shot, no server)

plasmate fetch <url>

Returns SOM JSON: regions, interactive elements with stable IDs, extracted content.

Server Mode

# AWP (recommended)
plasmate serve --protocol awp --port 9222

# CDP (Puppeteer compatible)
plasmate serve --protocol cdp --port 9222

AWP Usage (Python)

Run scripts/awp-browse.py for AWP interactions:

# Navigate and get SOM snapshot
python3 scripts/awp-browse.py navigate "https://example.com"

# Click an interactive element by ref ID
python3 scripts/awp-browse.py click "https://example.com" --ref "e12"

# Type into a field
python3 scripts/awp-browse.py type "https://example.com" --ref "e5" --text "search query"

# Extract structured data (JSON-LD, OpenGraph, tables)
python3 scripts/awp-browse.py extract "https://example.com"

# Scroll
python3 scripts/awp-browse.py scroll "https://example.com" --direction down

CDP Usage (Puppeteer)

When CDP is needed, connect Puppeteer to the running server:

const browser = await puppeteer.connect({
  browserWSEndpoint: 'ws://127.0.0.1:9222'
});
const page = await browser.newPage();
await page.goto('https://example.com');
const content = await page.content();

SOM Output Structure

SOM is a structured JSON representation, NOT raw HTML. Key sections:

  • regions: Semantic page areas (nav, main, article, sidebar)
  • interactive: Clickable/typeable elements with stable ref IDs (e.g., e1, e12)
  • content: Text content organized by region
  • structured_data: JSON-LD, OpenGraph, microdata extracted automatically

Use ref IDs from interactive elements for click/type actions.

Performance

MetricPlasmateChrome
--------------------------
Per page4-5 ms252 ms
Memory (100 pages)~30 MB~20 GB
Output sizeSOM (10-800x smaller)Raw HTML

When to Use Plasmate vs Browser Tool

  • Plasmate: Speed-critical scraping, batch page processing, token-sensitive extraction, structured data
  • Browser tool: Visual rendering needed, screenshots, complex JS SPAs requiring full Chrome engine, pixel-level interaction

版本历史

共 1 个版本

  • v3.2.0 当前
    2026-03-30 18:23 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,427 📥 326,862
ai-agent

self-improving agent

pskoett
记录自身发现以实现自我改进的技能
★ 4,141 📥 916,119
ai-agent

Agent Browser

rez0
用于 AI 代理的浏览器自动化 CLI。当用户需要与网站交互(包括浏览页面、填写表单、点击按钮、截图等)时使用。
★ 853 📥 335,774