pi-ollama-web-search

pi extension adding Ollama web_search and web_fetch tools

Package details

extension

Install pi-ollama-web-search from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-ollama-web-search
Package
pi-ollama-web-search
Version
0.1.1
Published
Feb 14, 2026
Downloads
56/mo · 18/wk
Author
matteo.collina
License
unknown
Types
extension
Size
24.1 KB
Dependencies
0 dependencies · 0 peers
Pi manifest JSON
{
  "extensions": [
    "./extensions"
  ]
}

Security note

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

README

pi Ollama Web Search Extension

Adds two pi extension tools backed by Ollama's hosted web APIs:

  • ollama_web_searchPOST /api/web_search
  • ollama_web_fetchPOST /api/web_fetch

Default API host is https://ollama.com.

Requirements

Installation

Option A: install from npm (recommended)

pi install npx:@mariozechner/pi-ollama-web-search -l

Option B: install from GitHub

pi install git:github.com/mcollina/pi-ollama-web-search -l

Option C: clone and install locally

git clone git@github.com:mcollina/pi-ollama-web-search.git
cd pi-ollama-web-search
pi install . -l

After install, run /reload in pi (or restart pi).

Configuration

You can configure the extension in pi settings (supports a custom key per project).

Project-local config (preferred)

Create .pi/settings.json in your project:

{
  "ollamaWebSearch": {
    "apiKey": "ollama_key_for_this_project",
    "baseUrl": "https://ollama.com"
  }
}

Global config

Create or update ~/.pi/agent/settings.json:

{
  "ollamaWebSearch": {
    "apiKey": "ollama_key_for_all_projects",
    "baseUrl": "https://ollama.com"
  }
}

Environment fallback

If not set in config, the extension falls back to:

  • OLLAMA_API_KEY
  • OLLAMA_WEB_BASE_URL (optional)
export OLLAMA_API_KEY="your_key_here"
export OLLAMA_WEB_BASE_URL="https://ollama.com"

Resolution order

  1. .pi/settings.jsonollamaWebSearch
  2. ~/.pi/agent/settings.jsonollamaWebSearch
  3. Environment variables

Usage

Ask pi normally; the model can call:

  • ollama_web_search
    • query (string, required)
    • max_results (integer, optional, 1-10)
  • ollama_web_fetch
    • url (string, required)

Notes

  • Output is truncated to pi defaults (50KB / 2000 lines) to protect context window.
  • Tool errors are surfaced directly if key/config is missing or request fails.