GreedySearch for Pi

Multi-engine AI web search for Pi via browser automation.
- No API keys
- Real browser results from configurable engines: Perplexity, Google AI, ChatGPT, Gemini, plus opt-in Semantic Scholar and Logically research engines
- Research mode as the centerpiece: iterative planning, source fetching, citation audit, and structured bundles
- Optional configurable synthesis with source grounding (Gemini by default)
- Chrome runs headless by default — no window, purely background
Install
pi install npm:@apmantza/greedysearch-pi
Or from git:
pi install git:github.com/apmantza/GreedySearch-pi
Tool
greedy_search — multi-engine AI web search, source-grounded synthesis, and deep research
Quick usage
greedy_search({ query: "React 19 changes" }); // all engines + fetched sources
greedy_search({ query: "React 19 changes", synthesize: true }); // add configured synthesis
greedy_search({ query: "Prisma vs Drizzle", engine: "perplexity" }); // individual engine
greedy_search({
query: "Evaluate browser automation options for AI agents",
depth: "research",
breadth: 3,
iterations: 2,
maxSources: 8,
});
// Research mode writes a dataroom-style bundle under .pi/greedysearch-research/ by default.
// Headless is the default — no window. To force visible Chrome:
greedy_search({ query: "Visible browser setup", engine: "perplexity", visible: true });
Parameters (greedy_search)
Common
query (required)
fullAnswer: return full single-engine output instead of preview
headless: set to false to show Chrome window (default: true)
visible / alwaysVisible: set to true to always use visible Chrome for this search
Normal search
engine: all (default web/search fan-out), perplexity, google, chatgpt, gemini; opt-in research engines: semantic-scholar, logically; bing still works for signed-in users
synthesize: for engine: "all", synthesize fetched sources with the configured synthesizer (default false)
synthesizer: override the configured synthesis engine for this call (gemini default, chatgpt supported)
depth: legacy fast/standard/deep aliases are still accepted for compatibility; prefer synthesize for normal search
Deep research
depth: set to "research" to run the iterative research workflow
breadth: number of research actions per round, 1-5 (default 3)
iterations: research rounds, 1-3 (default 2)
maxSources: fetched source cap for the final report, 3-12
researchOutDir: optional directory for the research bundle
writeResearchBundle: write the research bundle to disk (default true for research mode)
Deep research uses the configured ~/.pi/greedyconfig.engines list for child searches and Gemini for planning/final synthesis.
Environment variables
| Variable | Default | Description |
|---|
GREEDY_SEARCH_VISIBLE | (unset) | Set to 1 to show Chrome window instead of headless |
GREEDY_SEARCH_ALWAYS_VISIBLE | (unset) | Set to 1 to force visible Chrome for all GreedySearch runs |
GREEDY_SEARCH_IDLE_TIMEOUT_MINUTES | 5 | Minutes of inactivity before auto-killing GreedySearch Chrome |
GREEDY_SEARCH_LOCALE | en | Default result language (en, de, fr, es, ja, etc.) |
CHROME_PATH | auto-detected | Path to Chrome/Chromium executable |
Search modes
- Individual engine search/research —
engine: "perplexity" | "google" | "chatgpt" | "gemini" | "semantic-scholar" | "logically" | "bing"; returns that engine's answer and sources.
- Grounded multi-engine search — default
engine: "all"; fans out to configured engines, ranks sources, fetches top source content, and reports confidence metadata.
- All + synthesis — add
synthesize: true (or CLI --synthesize) to ask the configured synthesizer to combine engine answers and fetched source evidence.
- Deep research —
depth: "research"; iterative action planning, direct URL fetches, fast multi-engine searches, source fetching, learning extraction, deterministic floor checks, citation audit, a final cited report, and a structured on-disk bundle.
Legacy depth: "fast" | "standard" | "deep" values remain accepted for compatibility: fast skips source fetching; standard/deep request synthesis.
Configure all-engine fan-out and synthesis in ~/.pi/greedyconfig:
{
"engines": ["perplexity", "google", "chatgpt", "gemini"],
"synthesizer": "gemini"
}