← Catalog

@m4ss/pi-search-delegator

Keep Pi's main context clean: remove web search, fetch, and llms_txt tools from the main model and force delegation to a focused, cheaper searcher subagent

Extension

Install

Install with PiG

pig install npm:@m4ss/pi-search-delegator

Install with Pi

pi install npm:@m4ss/pi-search-delegator
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./src/index.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 0.3.0 (README.md). PiG does not review it.

@m4ss/pi-search-delegator

We designed this to keep your main model's context clean. The extension removes staan_search, web_fetch, and llms_txt from the main model and forces it to delegate web research to a focused searcher subagent instead.

The searcher runs headless, does the web work, and returns a compact answer in three sections: Answer, Evidence (each key claim with its source URL and a short quote, so the main model can check it), and Gaps. This keeps the main context uncluttered. This also lets you run the searcher on a cheaper model.

Delegating web work to the searcher:

subagent({
  agent: "searcher",
  task: "Goal: find the latest GDPR, NIS2 and AI Act requirements for companies in Europe. Constraints: official EU sources only. Return: key obligations, dates, source URLs."
})

The searcher sees only the brief, so the main model is told to write it as a self-contained brief: the goal, what is already known, constraints, and what to return. It is also told to split independent questions into separate searcher calls and run them in parallel.

curl, wget, and other shell commands are not blocked.

Install

pi install npm:pi-subagents
pi install npm:@m4ss/pi-search-delegator

It creates ~/.pi/agent/agents/searcher.md and blocks the web tools at session start.

Commands

CommandAction
/search-delegatorShow current status

Configuration

Config file: ~/.pi/agent/search-delegator.json (missing fields fall back to defaults).

FieldDefaultDescription
blocked_tools["staan_search", "web_fetch", "llms_txt"]Tool names removed from the main model and granted to the searcher
searcher_subagent_name"searcher"Subagent name (must match the .md)
searcher_model""Model for the searcher (provider/model). Empty = inherit parent's default. Set a cheap model to keep web research inexpensive
orchestrator_prompt(built-in web-research guidance)Text sent to the main model at session start, telling it how to delegate to the searcher

The searcher.md template is regenerated whenever the config changes. If you edit searcher.md by hand, your version is detected and left untouched.

Tightening the searcher

~/.pi/agent/agents/searcher.md restricts the child to the tools listed in blocked_tools (by default tools: staan_search, web_fetch, llms_txt). To narrow it further, edit that file, but keep whatever extensions provide those tools loaded.

The template also sets inheritProjectContext, inheritGlobalContext, and inheritSkills to false, so repository instructions, your global AGENTS.md, and the skills catalog stay out of every searcher turn. Set one to true in searcher.md if your searches need it; inheritGlobalContext only takes effect when inheritProjectContext is also true.

License

MIT