✨Feature: Add Serply search tool - #3749
Open
googio wants to merge 1 commit into
Open
Conversation
Adds SerplySearchTool as a new open-web search provider alongside tavily/exa/linkup, using Serply's REST search API (api.serply.io).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
SerplySearchTool, a web search tool backed by the Serply SERP API, as another interchangeable option alongsideTavilySearchTool,ExaSearchTool, andLinkupSearchTool. It returns Google organic results with title, snippet, and link, and emits the same observer messages andSearchResultTextMessagecard format as the existing search tools.Why
Closes #3748. The SDK's search-tool family has no Google SERP option today; users who need Google-flavored results, or who already hold a Serply subscription, cannot bring their key to Nexent.
Notes
TavilySearchToolinsdk/nexent/core/tools/tavily_search_tool.py: sameToolsubclass shape, observer hooks, and running-prompt messages (en/zh).sdk/nexent/core/tools/__init__.py,ToolSign.SERPLY_SEARCHinsdk/nexent/core/utils/tools_common_message.py, and a label entry inbackend/consts/tool_labels.py.httpx, which the SDK already depends on. The request sends an explicitUser-Agentbecause the Serply API rejects default client user agents.test/sdk/core/tools/test_serply_search_tool.pywith the network mocked.Testing
Also live-tested against the real API with a personal key:
Disclosure: I work with Serply. Happy to adjust scope, naming, or drop this entirely if it isn't a direction you want for the project.