Repository navigation
Conversation
Add an `outcrawl` engine for WebSearchTool (tool `outcrawl_search`, key OUTCRAWL_API_KEY or `outcrawl_api_key`) and an `outcrawl_scrape` content fetcher, following the Tavily HTTP engine layout. Register the engine in the capability web_search wrapper and document it in the skill references and capability setup guide.
This branch has not been deployed
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.
Change Summary
Adds Outcrawl as a web search engine and as a page content fetcher. Outcrawl (https://outcrawl.ai) is a scrape and search API for AI agents (free tier: 1,000 credits a month).
outcrawlforWebSearchTool, exposed as theoutcrawl_searchtool. It callsPOST https://api.outcrawl.ai/v1/searchwithqueryandlimit. Withscrape: trueeach hit also carries the page markdown, which prefillscontentso the fetch step is skipped (same mechanism as Tavilyraw_content).fetcher: outcrawl_scrape, which callsPOST /v1/scrapewithformats: ["markdown"]and is used byfetch_pageand byfetch_contentin searches.OutcrawlHTTPErrorwithstatus,code,retry_after,is_quotaandis_auth, soWebSearchTool._search_error_payloadreports auth and rate limit errors to the model the same way it does for Tavily.OUTCRAWL_API_KEYenv var oroutcrawl_api_keyin theweb_searchtool config; optionaloutcrawl_request_timeout(default 60s). The engine raises a clear error when no key is set, like Exa.The layout follows the Tavily engine (stdlib HTTP client, no new dependency), and the registration points match it:
ms_agent/tools/search/outcrawl/(new:http.py,schema.py,search.py,fetcher.py,__init__.py)ms_agent/tools/search/search_base.py:SearchEngineType.OUTCRAWL,ENGINE_TOOL_NAMES['outcrawl']ms_agent/tools/search/websearch_tool.py:get_content_fetcher,get_search_engine_class,get_search_engine,SUPPORTED_ENGINES, API key map, request timeout,connect(),outcrawl_search()method, docstringsms_agent/capabilities/wrappers/web_search.py: key requirement and engine descriptionsms-agent-skills/references/web-search.md,ms-agent-skills/SKILL.md,examples/capability/setup.mdtests/search/test_outcrawl.py(new),tests/capability/test_gateway.py(missing key case, mirroring the Tavily one)Example config:
Related issue number
None.
Checklist
pre-commit installandpre-commit run --all-filesbefore git commit, and passed lint check.Commands run
pre-commit run --files <the 13 changed files>: flake8, isort, yapf and the other hooks all passed (I ran it on the changed files, not with--all-files).python -m pytest tests/search/test_outcrawl.py tests/search/test_tavily_keyless.py tests/capability/test_gateway.py tests/capability/test_review_regressions.py tests/tools/test_server_tools_smoke.py(with no search keys set): 57 passed, 6 skipped. The skips are the real network tests that need keys.OUTCRAWL_API_KEY=... python -m pytest tests/search/test_outcrawl.py: 17 passed, including the two real network tests,test_outcrawl_search_realandtest_outcrawl_scrape_real.tests/search/test_search.pydoes not collect in my environment because the optionalarxivpackage is not installed. That happens onmaintoo and is unrelated to this change.Live calls through the new code
These ran through
WebSearchToolwithengines: [outcrawl]andfetcher: outcrawl_scrape:outcrawl_searchwith query "ModelScope MS-Agent framework" andnum_results: 2: statusok, 2 results (github.com/modelscope/ms-agentand its releases page). Both pages were then fetched with the Outcrawl scrape fetcher,fetch_success: true, about 39,000 characters of markdown each.fetch_pageonhttps://example.com/: statusok, and the markdown starts with "This domain is for use in documentation examples...".Note: the HTTP client sends
User-Agent: ms-agentbecause the API edge refuses the defaultPython-urllibuser agent.Disclosure: I work on Outcrawl.
This PR was prepared with AI assistance (omp with Claude). The code, tests, docs edits and this description were written with it. The tests, lint and live calls above were actually run as described. No human has reviewed it yet.