← Back to PRs

#13386: feat(web-search): add Nimble Web Search API provider

by ilchemla open 2026-02-10 12:54 View on GitHub →
docs agents stale size: S
## Summary Adds **Nimble Web Search API** as the fourth search provider alongside Brave, Perplexity, and Grok. **Nimble is a Real-Time Web Intelligence API specifically designed for AI Agents** - optimized for agentic workflows with fast, structured search results and flexible depth modes. ## Why Nimble? Nimble provides real-time web intelligence tailored for AI agent use cases: - **Built for AI Agents**: Optimized response format for tool use in agentic systems - **Dual-mode search**: Fast mode for quick lookups, deep mode for comprehensive analysis - **Real-time results**: Fresh data from the web with low latency - **Token-efficient**: Concise results in fast mode reduce token consumption in agent loops ## Changes ### Core Implementation - Add Nimble as a `tools.web.search` provider option - Support `deep_search` parameter: - `false` (default, fast mode): Concise, token-efficient results optimized for agentic loops - `true` (deep mode): Comprehensive full-page content for deeper analysis - Use official endpoint: `https://sdk.nimbleway.com/v1/search` (hardcoded, no override) - Bearer token authentication via `Authorization` header ### Configuration & Schema - Add Nimble config types to `types.tools.ts` - Add Zod schema validation for `nimble` provider and config - Add field metadata to `schema.ts` - Add config validation test ### Documentation - Update `docs/tools/web.md` with: - Nimble provider comparison table - Configuration examples - `deep_search` parameter documentation - Usage examples for both modes ## Configuration Example ```json5 { tools: { web: { search: { provider: "nimble", nimble: { apiKey: "your-api-key" } } } } } ``` **Note:** The endpoint is hardcoded to `https://sdk.nimbleway.com/v1/search` for security (SSRF prevention). No `baseUrl` override is supported. ## Usage Example ```javascript // Fast mode - optimal for agent loops await web_search({ query: "latest AI developments", count: 5, deep_search: false // token-efficient, concise results }); // Deep mode - comprehensive analysis await web_search({ query: "Claude AI capabilities", deep_search: true // full-page content extraction }); ``` ## Testing ✅ Manually tested against live Nimble API: - Fast mode (`deep_search: false`) - verified concise, agent-optimized results - Deep mode (`deep_search: true`) - verified comprehensive content extraction - Response structure matches implementation - Both modes return expected data format with proper typing ## Security 🔒 **SSRF Prevention:** The Nimble endpoint is hardcoded to the official SDK URL. No user-configurable `baseUrl` option is provided to prevent Server-Side Request Forgery attacks. ## Implementation Notes - Follows existing pattern from Brave/Perplexity/Grok integration - Validates `deep_search` parameter only works with Nimble provider - Includes proper error messages and docs links - Cache key includes `deep_search` state for proper caching - Results formatted with security wrapper (`wrapWebContent`) for safe agent consumption --- 🤖 **AI-assisted:** Built with Claude Sonnet 4.5 📋 **Testing:** Tested with live Nimble API 🎯 **Purpose:** Integrate Nimble's Real-Time Web Intelligence API designed for AI Agents Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR adds a new `nimble` option to `web_search`, including config/schema support (`tools.web.search.nimble.apiKey` with `NIMBLE_API_KEY` env fallback), a `deep_search` tool parameter that’s restricted to Nimble, and docs updates describing the new provider and deep vs fast modes. Implementation follows the existing provider pattern (provider resolution, per-provider auth, caching, and `wrapWebContent` for external content). One issue remains in the docs: Grok is still supported by the tool, but the provider overview/table on the web tools doc page omit it, which makes the documentation inconsistent with actual behavior. <h3>Confidence Score: 4/5</h3> - This PR looks safe to merge once the remaining documentation inconsistency is fixed. - Core Nimble integration is straightforward (hardcoded endpoint, per-provider auth, caching, and content wrapping) and schema/tests are updated accordingly. The only verified issue is user-facing: docs omit the already-supported Grok provider in the overview/table, making documentation inconsistent with runtime behavior. - docs/tools/web.md <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs