{"_id":"@agent-smith/feat-search","_rev":"4-47ae3f7b5dc093fbe6dffea2f22e390e","name":"@agent-smith/feat-search","dist-tags":{"latest":"0.0.5"},"versions":{"0.0.2":{"name":"@agent-smith/feat-search","version":"0.0.2","license":"MIT","_id":"@agent-smith/feat-search@0.0.2","maintainers":[{"name":"synw","email":"synwx@pm.me"}],"homepage":"https://github.com/synw/agent-smith#readme","bugs":{"url":"https://github.com/synw/agent-smith/issues"},"dist":{"shasum":"ca3ba0c238d95a53f23aff0c90808d972cfc4c67","tarball":"https://registry.npmjs.org/@agent-smith/feat-search/-/feat-search-0.0.2.tgz","fileCount":7,"integrity":"sha512-gt7mggxmh713VF2iQtvt9Q07Q1Gt8q3nty0dSLD94BZxQpM3YcXUeVrJ4PbqRugV9AmxMEVtwGPsT5hK0NtJeA==","signatures":[{"sig":"MEYCIQCxBwtWHWER7W5JIcOx/p4ERoOSt1VwgODJNgcroFUQjQIhALQfMKmZ6MtXiaruoVKj9Lgjsx4U1Mb5RXkSeRKIiLrG","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3127},"type":"module","gitHead":"8bba1cce2d6fdbfccbd43236491e5890c668e297","_npmUser":{"name":"synw","email":"synwx@pm.me"},"repository":{"url":"git+https://github.com/synw/agent-smith.git","type":"git"},"_npmVersion":"11.4.1","description":"Web search for Agent Smith cli","directories":{},"_nodeVersion":"20.19.2","dependencies":{"@agent-smith/cli":"^0.0.70","@agent-smith/jobs":"^0.0.14"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"2.8.1","ts-node":"^10.9.2","typescript":"^5.8.3","@types/node":"^24.1.0","@locallm/types":"^0.1.9","@commander-js/extra-typings":"^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/feat-search_0.0.2_1753967501926_0.8130993557905886","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@agent-smith/feat-search","version":"0.0.3","license":"MIT","_id":"@agent-smith/feat-search@0.0.3","maintainers":[{"name":"synw","email":"synwx@protonmail.com"}],"homepage":"https://github.com/synw/agent-smith-plugins#readme","bugs":{"url":"https://github.com/synw/agent-smith-plugins/issues"},"dist":{"shasum":"ab91c34682cd2e2cf468641e512bfe07683ee853","tarball":"https://registry.npmjs.org/@agent-smith/feat-search/-/feat-search-0.0.3.tgz","fileCount":9,"integrity":"sha512-K73eVpKaP5OLM8ec8F5ywXIHXx3pilZV9RRk9bcp93jnsfU37+/5XqpNIxTXitnfpP534kZwY3OnjeOnZJebZg==","signatures":[{"sig":"MEYCIQCtqbSwvzPimO8wo6UFV+171RylkNGOCWkazNOwGd7JkAIhAOh/iobj+NboNQTK9eWQ5zp7U2hkQzcXJMdlBiwzbtwR","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5277},"type":"module","gitHead":"4859aa4500d8839c4107d3d8d88090f12a1707ed","_npmUser":{"name":"synw","email":"synwx@protonmail.com"},"repository":{"url":"git+https://github.com/synw/agent-smith-plugins.git","type":"git"},"_npmVersion":"11.7.0","description":"Agent Smith: web search plugin","directories":{},"_nodeVersion":"24.11.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"2.8.1","ts-node":"^10.9.2","typescript":"^6.0.2","@types/node":"^25.5.2"},"_npmOperationalInternal":{"tmp":"tmp/feat-search_0.0.3_1775646818503_0.7878369807386718","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"@agent-smith/feat-search","version":"0.0.4","license":"MIT","_id":"@agent-smith/feat-search@0.0.4","maintainers":[{"name":"synw","email":"synwx@protonmail.com"}],"homepage":"https://github.com/synw/agent-smith-plugins#readme","bugs":{"url":"https://github.com/synw/agent-smith-plugins/issues"},"dist":{"shasum":"739a592145dc13f0d1a7ce5638af4f86ef395b03","tarball":"https://registry.npmjs.org/@agent-smith/feat-search/-/feat-search-0.0.4.tgz","fileCount":12,"integrity":"sha512-zi/s2glZx5Z2ZVYePIQGWYGOYvT+ytuCm0v6Wm8d+h6vSNJBXxEGOjJl2RAPuP1CabRTKVW1JVtOH4YuBN3PjA==","signatures":[{"sig":"MEUCIA/kXA8yB2vXSH+ZtWgy3d9W+Q8NZYT+UGSLAYTPdBS9AiEAoAySX0I0FtGHI7FYyaflzj4xHkKWZAe/fyU309FDbTg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15778},"type":"module","gitHead":"7e345a0d4db3ceea107aef5d11481befdf1560c9","_npmUser":{"name":"synw","email":"synwx@protonmail.com"},"repository":{"url":"git+https://github.com/synw/agent-smith-plugins.git","type":"git"},"_npmVersion":"11.13.0","description":"Agent Smith: web search plugin","directories":{},"_nodeVersion":"24.11.0","dependencies":{"cheerio":"^1.2.0","turndown":"^7.2.4","isomorphic-dompurify":"^3.16.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"2.8.1","ts-node":"^10.9.2","typescript":"^6.0.3","@types/node":"^25.9.3"},"_npmOperationalInternal":{"tmp":"tmp/feat-search_0.0.4_1781272598102_0.8182853644477015","host":"s3://npm-registry-packages-npm-production"}},"0.0.5":{"_id":"@agent-smith/feat-search@0.0.5","bugs":{"url":"https://github.com/synw/agent-smith-plugins/issues"},"dist":{"shasum":"2c8e73a406edc548ab45288f60d56ecaa6e0e1a0","tarball":"https://registry.npmjs.org/@agent-smith/feat-search/-/feat-search-0.0.5.tgz","fileCount":24,"integrity":"sha512-It09m6ft6fJTE02RjxfYGXM0CkznvSvWcX8SrHFTfValwtU594FPZIPLDxqO+Iy1SQfIE7nkOwM8EDuaDBIPSQ==","signatures":[{"sig":"MEUCIQDljbXdQ2AHkl8wtKbbjCXVu2NyhEhXc/mpN36ycyB3dQIgeIs0/yXOIGSMwBINufj4cSxfp62zbFmcTEbrrmHb5iI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD9z7262H5faOVYJVA7k2t2kMHsP/gzBKG6zkdIlpLkLwIgfMDHUEwurlAs4KCU/v9gMHjIc6j95Rf7QCwirv6Rl8A="}],"unpackedSize":64541},"name":"@agent-smith/feat-search","type":"module","gitHead":"c0d9a520ccf80fbf5c05b50e954def9ca5b1d181","license":"MIT","version":"0.0.5","_npmUser":{"name":"synw","email":"synwx@protonmail.com"},"homepage":"https://github.com/synw/agent-smith-plugins#readme","repository":{"url":"git+https://github.com/synw/agent-smith-plugins.git","type":"git"},"_npmVersion":"11.18.0","description":"Agent Smith: web search plugin","directories":{},"maintainers":[{"name":"synw","email":"synwx@protonmail.com"}],"_nodeVersion":"24.11.0","dependencies":{"cheerio":"^1.2.0","turndown":"^7.2.4","lru-cache":"^11.5.2","isomorphic-dompurify":"^3.16.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"2.8.1","ts-node":"^10.9.2","typescript":"^6.0.3","@types/node":"^25.9.3"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/feat-search_0.0.5_1789560847657_0.36062432754450935"}}},"time":{"created":"2025-07-31T13:11:41.780Z","modified":"2026-09-16T12:14:07.933Z","0.0.2":"2025-07-31T13:11:42.115Z","0.0.3":"2026-04-08T11:13:38.665Z","0.0.4":"2026-06-12T13:56:38.223Z","0.0.5":"2026-09-16T12:14:07.737Z"},"bugs":{"url":"https://github.com/synw/agent-smith-plugins/issues"},"license":"MIT","homepage":"https://github.com/synw/agent-smith-plugins#readme","repository":{"url":"git+https://github.com/synw/agent-smith-plugins.git","type":"git"},"description":"Agent Smith: web search plugin","maintainers":[{"name":"synw","email":"synwx@protonmail.com"}],"readme":"# @agent-smith/feat-search\n\n**Powerful web search and browsing tools for AI agents — search the web, Wikipedia, and extract page content with ease.**\n\nPart of the [Agent Smith](https://github.com/lynxai-team/agent-smith) toolkit for managing AI agents.\n\n[![pub package](https://img.shields.io/npm/v/@agent-smith/feat-search)](https://www.npmjs.com/package/@agent-smith/feat-search)\n\n## Features\n\n- 🔍 **Multiple Search Backends** — DuckDuckGo, smolagents, and generic web search with redundancy\n- 📚 **Wikipedia Lookup** — Direct Wikipedia topic search via smolagents\n- 🌐 **Webpage Extraction** — Extract content from any webpage as markdown (smolagents, crawl4ai & TypeScript)\n- 🤖 **Pre-built Agents** — Ready-to-use `searchweb`, `browse`, and `infers` agent configurations\n- ⚡ **Async Crawling** — Advanced async crawling with configurable delays, word thresholds, and tag filtering\n- 🎯 **Browser Automation** — Playwright-based browsing via MCP protocol for JavaScript-rendered pages\n- 🔧 **Modular Design** — Each tool is a standalone CLI script (Python/TypeScript) for flexible agent orchestration\n\n## Documentation\n\n### For AI Agents\n- [Codebase Summary](.agents/documentation/codebase-summary.md) — Architecture, key files, and patterns for the search plugin\n- [Plugin Overview](https://raw.githubusercontent.com/lynxai-team/agent-smith/refs/heads/main/docsite/public/doc/plugins/1.overview.md) — Plugin system overview and creation guide\n- [Search Plugin Docs](https://raw.githubusercontent.com/lynxai-team/agent-smith/refs/heads/main/docsite/public/doc/plugins/8.search.md) — Complete search plugin documentation\n\n### For Humans\n- [Plugin Overview](https://lynxai-team.github.io/agent-smith/plugins/) — Plugin system overview and creation guide\n- [Search Plugin](https://lynxai-team.github.io/agent-smith/plugins/search) — Complete search plugin documentation\n\n## Installation\n\nInstall the plugin globally:\n\n```bash\nnpm i -g @agent-smith/feat-search\n```\n\n### Python Dependencies\n\nThe search plugin requires these Python packages. Install them before use:\n\n```bash\npip install duckduckgo_search smolagents crawl4ai playwright\n```\n\n> **Note:** Playwright browsers need to be installed separately after installation:\n> ```bash\n> playwright install\n> ```\n\n## Configuration\n\nAdd the plugin to your `config.yml` file:\n\n```yaml\nplugins:\n  - \"@agent-smith/feat-search\"\n```\n\nThen update your CLI configuration:\n\n```bash\nlm conf\n```\n\n## Quick Start\n\n### Basic Web Search\n\nUse the search tools directly from your agent prompt:\n\n```yaml\ndescription: A web search agent\nprompt: |-\n    {prompt}\nmodel: qwen4b\ninferParams:\n    min_p: 0\n    top_k: 20\n    top_p: 0.95\n    temperature: 0.4\ntoolsList:\n  - searchweb  # Uses the searchweb subagent\n```\n\nThe `searchweb` agent will automatically:\n1. Search the web for relevant information\n2. Crawl and extract content from promising URLs\n3. Synthesize and return comprehensive results\n\n## Usage Patterns\n\n### Available Search Tools\n\n| Tool | Description | Backend |\n|------|-------------|---------|\n| `smsearch` | Generic web search | smolagents WebSearchTool |\n| `ddsearch` | DuckDuckGo search | ddgs (DuckDuckGo Search) |\n| `wikipedia` | Wikipedia topic lookup | smolagents |\n\n### Available Page Reading Tools\n\n| Tool | Description | Backend |\n|------|-------------|---------|\n| `open_webpage` | Simple webpage content extraction | smolagents |\n| `openpage` | Advanced async crawling with options | crawl4ai |\n| `read-webpage` | TypeScript-based webpage reader | cheerio + turndown |\n\n### Pre-built Agents\n\n#### `searchweb` Agent\n\nMulti-step search and content extraction workflow:\n\n```yaml\n# dist/agents/searchweb.yml\ndescription: Web search agent\nprompt: |-\n    {prompt}\nmodel: qwen4b\ninferParams:\n    min_p: 0\n    top_k: 20\n    top_p: 0.95\n    temperature: 0.4\ntoolsList:\n  - searchweb\n```\n\n**Workflow:** Search → Crawl → Answer\n\n#### `browse` Agent\n\nPlaywright-based browser automation:\n\n```yaml\n# dist/agents/browse.yml\ndescription: Browser automation agent\ntoolsList:\n  - browse  # Playwright MCP server\n```\n\n**Use case:** JavaScript-rendered pages, interactive websites, form filling.\n\n#### `infers` Agent\n\nRaw inference with search augmentation:\n\n```yaml\n# dist/agents/infers.yml\ndescription: Inference with search\ntoolsList:\n  - searchweb  # Subagent for web search\n```\n\n**Use case:** Augmenting any agent's responses with live web data.\n\n### Advanced Usage: Direct Tool Calls\n\nYou can call individual tools directly from agent prompts:\n\n```yaml\n# Using DuckDuckGo search directly\ntoolsList:\n  - ddsearch\n  - openpage\n\n# Using smolagents search\ntoolsList:\n  - smsearch\n  - open_webpage\n  - wikipedia\n\n# Using TypeScript-based reader\ntoolsList:\n  - read-webpage\n```\n\n## API Reference\n\n### Search Actions\n\n| Action File | Command | Description |\n|-------------|---------|-------------|\n| `dist/actions/ddsearch.py` | `ddsearch <query>` | DuckDuckGo web search with time-limit filtering |\n| `dist/actions/smsearch.py` | `smsearch <query>` | Generic web search via smolagents |\n| `dist/actions/wikipedia.py` | `wikipedia <topic>` | Wikipedia topic lookup |\n\n### Page Reading Actions\n\n| Action File | Command | Description |\n|-------------|---------|-------------|\n| `dist/actions/open_webpage.py` | `open_webpage <url>` | Simple webpage content extraction via smolagents |\n| `dist/actions/openpage.py` | `openpage <url> [options]` | Advanced async crawling with configurable options |\n| `dist/actions/read-webpage.js` | `read-webpage <url>` | TypeScript-based webpage reader (cheerio + turndown) |\n\n### openpage.py Options\n\nThe `openpage.py` action supports these configurable parameters:\n\n- `--delay`: Delay before extracting content (for JavaScript rendering)\n- `--word-threshold`: Minimum word count to include page\n- `--excluded-tags`: HTML tags to exclude from extraction\n\n### Agent Configurations\n\n| Agent File | Purpose | Key Features |\n|------------|---------|--------------|\n| `dist/agents/searchweb.yml` | Multi-step search workflow | Search → Crawl → Synthesize |\n| `dist/agents/browse.yml` | Browser automation | Playwright MCP integration |\n| `dist/agents/infers.yml` | Search-augmented inference | Subagent architecture |\n\n## Important Notes\n\n- 🐍 **Python Required**: Most search actions are Python scripts. Ensure Python 3.8+ is installed.\n- ⚛️ **TypeScript Support**: `read-webpage.js` uses TypeScript with cheerio and turndown for HTML-to-markdown conversion.\n- 🌐 **Network Access**: Agents need internet access to use search tools.\n- ⚠️ **Rate Limits**: Be mindful of rate limits on search providers (DuckDuckGo, Wikipedia).\n- 🔒 **Security**: Webpage extraction uses crawl4ai which can execute JavaScript — be cautious with untrusted URLs.\n- 📦 **Dependencies**: The `playwright` package requires separate browser installation (`playwright install`).\n\n## Related Packages\n\n- [`@agent-smith/core`](https://www.npmjs.com/package/@agent-smith/core) — Core Agent Smith framework\n- [Browse plugin](https://github.com/synw/agent-smith-plugins) — Complementary browser automation\n\n## License\n\nMIT\n","readmeFilename":"README.md"}