{"_id":"@agentxin-ai/plugin-web-tools","name":"@agentxin-ai/plugin-web-tools","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.2":{"name":"@agentxin-ai/plugin-web-tools","version":"0.0.2","author":{"name":"AgentXinAI","url":"https://agentxinai.cn"},"license":"AGPL-3.0","repository":{"type":"git","url":"git+https://github.com/agentxin-ai/agentxin-plugins.git"},"bugs":{"url":"https://github.com/agentxin-ai/agentxin-plugins/issues"},"type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{"./package.json":"./package.json",".":{"@agentxin-plugins-starter/source":"./src/index.ts","types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"dependencies":{"tslib":"^2.3.0"},"peerDependencies":{"zod":"3.25.67","@agentxin-ai/chatkit-types":"^0.0.12","@agentxin-ai/plugin-sdk":"^3.7.2","chalk":"4.1.2","@langchain/core":"0.3.72","@nestjs/common":"^11.1.6","@metad/contracts":"^3.8.0","@modelcontextprotocol/sdk":"^1.17.5","cheerio":"^1.0.0-rc.12","turndown":"^7.2.0"},"_id":"@agentxin-ai/plugin-web-tools@0.0.2","description":"`@agentxin-ai/plugin-web-tools` adds web fetching and internet search capabilities to [AgentXin AI](https://github.com/agentxin-ai/agentxin) agents. The middleware provides two LangChain tools — `web_fetch` for retrieving web page content and `web_search`","homepage":"https://github.com/agentxin-ai/agentxin-plugins#readme","_nodeVersion":"22.22.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-81pXwmoQUzhHi/UvoLZvj2s+TcRIxnBNJPHQMudhJvYaO31xP4cA5uZSK9NDvVV5VIhL3AYkZqxy3byeMZUVVw==","shasum":"7bf4b0ec0d86c6e2d1d49fb66ecfe84f757c0631","tarball":"https://registry.npmjs.org/@agentxin-ai/plugin-web-tools/-/plugin-web-tools-0.0.2.tgz","fileCount":2,"unpackedSize":4067,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIFTVdc8DbIk89uwYrB15UhM3HgNVon9bgd92phN0h5HjAiEAxJ2zsQW4AQmugUhpOACpLWvk1N0xnX4IjbMvTrk2BSY="}]},"_npmUser":{"name":"agentxin-ai","email":"1304040880@qq.com"},"directories":{},"maintainers":[{"name":"agentxin-ai","email":"1304040880@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/plugin-web-tools_0.0.2_1773917553180_0.5175230001809077"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-19T10:52:33.102Z","0.0.2":"2026-03-19T10:52:33.310Z","modified":"2026-03-19T10:52:33.467Z"},"maintainers":[{"name":"agentxin-ai","email":"1304040880@qq.com"}],"description":"`@agentxin-ai/plugin-web-tools` adds web fetching and internet search capabilities to [AgentXin AI](https://github.com/agentxin-ai/agentxin) agents. The middleware provides two LangChain tools — `web_fetch` for retrieving web page content and `web_search`","homepage":"https://github.com/agentxin-ai/agentxin-plugins#readme","repository":{"type":"git","url":"git+https://github.com/agentxin-ai/agentxin-plugins.git"},"author":{"name":"AgentXinAI","url":"https://agentxinai.cn"},"bugs":{"url":"https://github.com/agentxin-ai/agentxin-plugins/issues"},"license":"AGPL-3.0","readme":"# AgentXin Plugin: Web Tools Middleware\n\n`@agentxin-ai/plugin-web-tools` adds web fetching and internet search capabilities to [AgentXin AI](https://github.com/agentxin-ai/agentxin) agents. The middleware provides two LangChain tools — `web_fetch` for retrieving web page content and `web_search` for searching the internet via Exa MCP.\n\n## Key Features\n\n- **web_fetch**: Fetches any publicly accessible URL and returns content as Markdown (default), plain text, or raw HTML.\n- **web_search**: Searches the internet via [Exa](https://exa.ai) MCP endpoint with configurable result count and search depth (auto/fast/deep).\n- HTML-to-Markdown conversion via TurndownService; HTML-to-text extraction via Cheerio.\n- Configurable timeouts (default 30s fetch, 25s search, max 120s) and 5MB response size limit.\n- Dual MCP transport support: StreamableHTTP (preferred) with SSE fallback.\n- Ships as a global NestJS module that plugs directly into the AgentXin agent middleware pipeline.\n\n## Installation\n\n```bash\npnpm add @agentxin-ai/plugin-web-tools\n# or\nnpm install @agentxin-ai/plugin-web-tools\n```\n\n> **Note**: Ensure the host service already provides `@agentxin-ai/plugin-sdk`, `@nestjs/common@^11`, `@langchain/core@^0.3`, `@modelcontextprotocol/sdk`, `cheerio`, `turndown`, `zod`, and `chalk`. These are treated as peer/runtime dependencies.\n\n## Quick Start\n\n1. **Register the Plugin**\n   Start AgentXin with the package in your plugin list:\n   ```sh\n   PLUGINS=@agentxin-ai/plugin-web-tools\n   ```\n   The plugin registers the global `WebToolsPlugin` module.\n2. **Enable the Middleware on an Agent**\n   In the AgentXin console (or agent definition), add a middleware entry with strategy `WebTools`.\n\n## Tools Provided\n\n### web_fetch\n\nFetches and reads the contents of a web page.\n\n| Parameter | Type | Required | Default | Description |\n|-----------|------|----------|---------|-------------|\n| `url` | string | Yes | — | The URL to fetch content from |\n| `format` | `\"markdown\"` \\| `\"text\"` \\| `\"html\"` | No | `\"markdown\"` | Output format |\n| `timeout` | number | No | `30000` | Request timeout in milliseconds (max 120000) |\n\n### web_search\n\nSearches the internet for information via Exa MCP.\n\n| Parameter | Type | Required | Default | Description |\n|-----------|------|----------|---------|-------------|\n| `query` | string | Yes | — | The search query |\n| `numResults` | number | No | `5` | Number of results to return |\n| `type` | `\"auto\"` \\| `\"fast\"` \\| `\"deep\"` | No | `\"auto\"` | Search depth |\n\n## Development & Testing\n\n```bash\nnpm install\nnpx nx build @agentxin-ai/plugin-web-tools\nnpx nx test @agentxin-ai/plugin-web-tools\n```\n\nTypeScript artifacts emit to `middlewares/web-tools/dist`. Validate middleware behavior against a staging agent run before publishing.\n\n## License\n\nThis project follows the [AGPL-3.0 License](../../../LICENSE) located at the repository root.\n","readmeFilename":"README.md","_rev":"1-c930ce262a4931f9dad2d0c0a1b1342a"}