Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

pi-web-extension

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pi-web-extension

A pi extension that adds web search and web fetch tools to the coding agent.

latest
Source
npmnpm
Version
0.1.2
Version published
Maintainers
1
Created
Source

pi web extension

npm version license

A pi extension that adds web search and web fetch tools to the coding agent.

  • Keyless web search via Brave and DuckDuckGo HTML fallback
  • Webpage fetching with HTML-to-Markdown conversion, saved to a temp file
  • Agent reads fetched content in chunks via the read tool — no context bloat
  • Automatic prompt steering for URL and web-search style prompts
  • Token-aware: keeps search results compact, trims oversized pages

Install

pi install npm:pi-web-extension
Alternative install methods

From the public git repo:

pi install git:github.com/NicoAvanzDev/pi-web-extension

From a local clone:

pi install .

Load without installing:

pi --no-extensions -e ./index.ts

How it works

websearch

Runs a keyless web search by scraping public search engines. Tries Brave first, falls back to DuckDuckGo HTML. Returns a compact list of results (title, URL, snippet).

webfetch

Fetches a URL, strips non-content elements, converts the HTML to Markdown via Turndown, and saves the result to a temp file in the pi session directory. Returns metadata (file path, title, content length, preview) so the agent can read the file in chunks as needed.

Prompt steering

Before each agent turn, the extension checks the user prompt for URLs and web-search intent patterns. When detected, it activates the web tools and injects steering instructions into the system prompt.

Tools

The extension exposes LLM-callable tools:

  • websearch
  • webfetch

websearch

Parameters:

  • query: string -- the search query

webfetch

Parameters:

  • url: string -- the URL to fetch
  • format?: "markdown" | "text" | "html" -- output format (default: "markdown")

Keywords

pi-extension

FAQs

Package last updated on 23 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts