Browser engine for AI agents - Convert HTML to Semantic Object Model (SOM) with 10-100x token compression.
- Fetch Page: Fetch any URL and convert to SOM, text, or markdown
- Extract Text: Extract readable text content from web pages
- Extract Links: Extract all links from a page in structured JSON
Install the Plasmate CLI:
# From source
git clone https://github.com/nickarino/plasmate
cd plasmate
cargo build --release
cp target/release/plasmate /usr/local/bin/
# Or add to PATH
export PATH="$PATH:/path/to/plasmate/target/release"-
Build the extension:
npm install npm run compile npx vsce package
-
In Cursor, open Command Palette (Cmd+Shift+P / Ctrl+Shift+P)
-
Run "Extensions: Install from VSIX..."
-
Select the generated
.vsixfile
Search for "Plasmate" in the Cursor extensions marketplace.
Access via Command Palette (Cmd+Shift+P / Ctrl+Shift+P):
| Command | Description |
|---|---|
Plasmate: Fetch Page |
Fetch a URL and display as SOM, text, or markdown |
Plasmate: Extract Text |
Extract readable text from a URL |
Plasmate: Extract Links |
Extract all links from a URL |
Open Settings (Cmd+, / Ctrl+,) and search for "Plasmate":
| Setting | Default | Description |
|---|---|---|
plasmate.path |
plasmate |
Path to the plasmate executable |
plasmate.defaultFormat |
som |
Default output format (som, text, markdown) |
plasmate.timeout |
30000 |
Timeout in milliseconds |
Structured JSON representation of web page content, optimized for AI consumption:
{
"tag": "main",
"children": [
{
"tag": "h1",
"text": "Welcome"
},
{
"tag": "p",
"text": "Page content..."
}
]
}Plain text extraction of readable content.
Formatted markdown output preserving document structure.
- Open Command Palette
- Run "Plasmate: Fetch Page"
- Enter URL:
https://docs.example.com/api - Select format: SOM
- Result opens in new editor tab
- Run "Plasmate: Extract Links"
- Enter URL of page with links
- Get JSON array of all links with text and href
Plasmate provides 10-100x token compression compared to raw HTML:
| Page Type | Raw HTML | SOM | Compression |
|---|---|---|---|
| Blog post | 50K tokens | 2K tokens | 25x |
| Documentation | 100K tokens | 5K tokens | 20x |
| Landing page | 200K tokens | 3K tokens | 66x |
- Ensure plasmate is installed and in your PATH
- Or configure the full path in settings:
{ "plasmate.path": "/path/to/plasmate" }
Increase the timeout in settings:
{
"plasmate.timeout": 60000
}Open Output panel (View > Output) and select "Plasmate" from the dropdown.
# Install dependencies
npm install
# Compile TypeScript
npm run compile
# Watch mode
npm run watch
# Package extension
npx vsce packageMIT