{"id":51580018,"url":"https://github.com/joematthews/pi-smart-web-search","last_synced_at":"2026-07-11T05:02:08.285Z","repository":{"id":365143573,"uuid":"1270650592","full_name":"joematthews/pi-smart-web-search","owner":"joematthews","description":"Web search tool for the pi coding agent — batch queries, ranked readable markdown results ready to fetch. Pairs with pi-smart-fetch.","archived":false,"fork":false,"pushed_at":"2026-06-26T16:35:44.000Z","size":413,"stargazers_count":5,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-26T18:13:46.189Z","etag":null,"topics":["agentic","ai-agents","content-extraction","defuddle","llm-tools","pi","pi-coding-agent","pi-extension","pi-package","search","typescript","web-scraping","web-search","wreq-js"],"latest_commit_sha":null,"homepage":"https://pi.dev/packages/pi-smart-web-search","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joematthews.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-15T23:27:49.000Z","updated_at":"2026-06-26T16:35:29.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/joematthews/pi-smart-web-search","commit_stats":null,"previous_names":["joematthews/pi-smart-web-search"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/joematthews/pi-smart-web-search","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joematthews%2Fpi-smart-web-search","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joematthews%2Fpi-smart-web-search/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joematthews%2Fpi-smart-web-search/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joematthews%2Fpi-smart-web-search/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joematthews","download_url":"https://codeload.github.com/joematthews/pi-smart-web-search/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joematthews%2Fpi-smart-web-search/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35351426,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-11T02:00:05.354Z","response_time":104,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentic","ai-agents","content-extraction","defuddle","llm-tools","pi","pi-coding-agent","pi-extension","pi-package","search","typescript","web-scraping","web-search","wreq-js"],"created_at":"2026-07-11T05:02:07.513Z","updated_at":"2026-07-11T05:02:08.279Z","avatar_url":"https://github.com/joematthews.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pi-smart-web-search\n\nA [pi](https://pi.dev) extension that adds one tool — **`web_search`** — for batch web discovery.\n\n![web_search in pi — search, fetch, answer](https://raw.githubusercontent.com/joematthews/pi-smart-web-search/main/demo.png)\n\nIt takes an **array of queries**, turns each into a search URL,\nand runs it through the same fetch→extract pipeline as [pi-smart-fetch](https://pi.dev/packages/pi-smart-fetch) (`wreq-js` → `linkedom` →\n`Defuddle`). It returns the extracted search-results pages (titles, links, snippets as markdown),\nprefaced with a `# Next step` header telling the model to open the best result URLs.\n\nSo the model **curates** which links to open (no SEO-trash auto-pulled into context), and the\nfollow-up nudge sits right next to the links.\n\n## Install\n\n```sh\npi install npm:pi-smart-web-search\npi install npm:pi-smart-fetch   # companion (see below)\n```\n\nThen restart pi.\n\n### Pairs with pi-smart-fetch\n\n`web_search` finds sources; it hands off to **`batch_web_fetch`** (from\n[`pi-smart-fetch`](https://pi.dev/packages/pi-smart-fetch)) to read the chosen pages. Install\nit alongside, or the model has nothing to follow up with.\n\n## Usage\n\nOnce installed, start up pi and just ask a question — `web_search` kicks in automatically when an\nanswer needs current or external info. Try:\n\n```\nWhat's the latest version of Node.js, and what's new in it?\n```\n\n```\nCompare Bun and Deno for a new TypeScript API in 2026.\n```\n\npi searches, opens the best results, and answers from what it read. No flags, no setup — just ask.\n\n## Tool\n\n```\nweb_search(searches: string[])\n```\n\nPass several queries at once to cover a topic from multiple angles in one call.\n\n## Development\n\nRun from a local clone instead of the registry:\n\n```sh\ngit clone https://github.com/joematthews/pi-smart-web-search\ncd pi-smart-web-search\nnpm install\npi install .\n```\n\nThen restart pi.\n\n`npm run check` runs typecheck, lint, format, spell, and tests.\n`npx tsx debug.ts \"your query\"` prints what the model would receive for a search.\n\n## Credits\n\nHeavily inspired by [pi-smart-fetch](https://pi.dev/packages/pi-smart-fetch) by\n[Thinkscape](https://github.com/Thinkscape) (MIT). It shares the same pipeline (`wreq-js` → `linkedom` → `Defuddle`), and the `web_search` result card mirrors `batch_web_fetch`'s look. Thanks to that project for the pattern.\n\n## License\n\n[MIT](LICENSE) © Joe Matthews\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoematthews%2Fpi-smart-web-search","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoematthews%2Fpi-smart-web-search","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoematthews%2Fpi-smart-web-search/lists"}