@pi-plugins/webfetch

WebFetch tool extension for pi-agent.

Packages

Package details

extension

Install @pi-plugins/webfetch from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@pi-plugins/webfetch
Package
@pi-plugins/webfetch
Version
0.2.1
Published
Jul 23, 2026
Downloads
77/mo · 30/wk
Author
kedom1337
License
MIT
Types
extension
Size
32.2 KB
Dependencies
4 dependencies · 4 peers
Pi manifest JSON
{
  "extensions": [
    "./dist/index.mjs"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

@pi-plugins/webfetch

A pi-agent extension that registers a web_fetch tool for fetching content over HTTP(S).

Install

pi install npm:@pi-plugins/webfetch

For a one-off run without adding it to settings:

pi -e npm:@pi-plugins/webfetch

For local development, load it straight from this directory:

pi -e ./plugins/webfetch

Tool: web_fetch

The tool fetches a URL and returns its content as Markdown (the default) or raw HTML. Requests are sent with browser-like headers and transient failures are retried.

Inputs

Parameter Type Required Default Description
url string yes The URL to fetch content from.
format 'markdown' | 'html' no 'markdown' The format to return the content in.
timeout number no 30 Timeout in seconds (min 1, max 120).

Output

Returns the page content as text. With format: 'markdown', HTML pages are converted to Markdown; non-HTML responses are returned unchanged. With format: 'html', the raw response body is returned.

Long content is truncated from the head to fit the tool's output budget. When this happens the text ends with a note such as:

[Truncated to 500 of 1234 lines]

The tool result also carries a details.truncated boolean indicating whether truncation occurred.