pi-plasmate
March 29, 2026 ยท View on GitHub
A Pi coding agent extension that adds web browsing via Plasmate SOM (Semantic Object Model).
When your coding agent needs to read documentation, check a reference page, or understand a website, it gets structured semantic content instead of raw HTML. 4x fewer tokens, explicit element roles, and available actions.
Installation
Option 1: Pi package (recommended)
Add to your ~/.pi/agent/settings.json:
{
"packages": ["git:github.com/plasmate-labs/pi-plasmate"]
}
Option 2: Manual
git clone https://github.com/plasmate-labs/pi-plasmate ~/.pi/agent/extensions/pi-plasmate
cd ~/.pi/agent/extensions/pi-plasmate
npm install
Prerequisites
Install Plasmate:
npm install -g plasmate
Tools registered
browse_web
Fetch any URL and return structured SOM content.
> Read the React documentation at https://react.dev/learn
The agent calls browse_web with the URL and gets back structured regions, typed elements, and available actions. Set extract_text: true for a compact text representation.
browse_web_compile
Compile a local HTML file to SOM without network requests.
> Analyze the structure of ./build/index.html
Useful when working with local HTML files in a project.
/plasmate
Show extension status: CLI version, cache configuration, available tools.
Configuration
| Environment Variable | Description |
|---|---|
PLASMATE_CACHE_API_KEY | SOM Cache API key for faster cached lookups (optional) |
PLASMATE_CACHE_URL | Cache base URL (default: https://cache.plasmate.app) |
Without a cache key, the extension uses the local plasmate CLI directly.
How it works
- Agent decides it needs to read a web page
- Calls the
browse_webtool with the URL - Extension fetches the page via SOM Cache API (if configured) or local Plasmate CLI
- Returns structured SOM JSON with page regions, element roles, and metadata
- Agent reasons over 4x fewer tokens with explicit semantic structure
Links
- Plasmate (the SOM compiler)
- SOM Spec v1.0
- Documentation
- Pi coding agent
License
Apache 2.0