Skip to content

feat: add outcrawl backend to web_search - #1006

Open
heydryft wants to merge 1 commit into
crestalnetwork:mainfrom
heydryft:feat/outcrawl-web-search
Open

heydryft wants to merge 1 commit into
crestalnetwork:mainfrom
heydryft:feat/outcrawl-web-search

Conversation

@heydryft

@heydryft heydryft commented Nov 8, 2026

Copy link
Copy Markdown

Thanks for the quota-aware fallback design in web_search: it made adding a backend a very small change.

Description

Adds Outcrawl as a third web search backend in the web_search system tool, next to Tavily and Jina. Outcrawl is web infrastructure for AI agents; its search API (POST https://api.outcrawl.ai/v1/search, bearer key) returns title, URL and snippet for each hit, and the free plan includes credits every month.

It joins the existing random pick between the metered backends, so it gets the same Redis cool-down on quota errors (402, 429 and the others in _QUOTA_STATUS) and the same Gemini and Z.AI fallbacks. It is only used when OUTCRAWL_API_KEY is set, so nothing changes for existing deployments.

Type of Change

  • New Feature
  • Bugfix
  • Improvement
  • Documentation Update

Changes Made

  • intentkit/core/system_tools/search_web.py: _search_outcrawl (JSON body {query, limit}, Authorization: Bearer, quota statuses raise _QuotaError, other non-200 responses raise ToolException, hits mapped to title, url and snippet), has_outcrawl in the backend pool and the "no backend configured" message, module docstring.
  • intentkit/config/config.py: outcrawl_api_key loaded from OUTCRAWL_API_KEY.
  • .env.example: OUTCRAWL_API_KEY= and the comment above it.
  • tests/core/test_system_tools.py: _set_search_keys takes outcrawl; new tests for Outcrawl as the only backend, quota fallback to Jina with cool-down, response parsing, the 429 and 500 paths.

Testing

From the repo root with uv sync --frozen on Python 3.13:

  • pytest tests/core/test_system_tools.py: 85 passed (the 5 new Outcrawl tests included).
  • ruff format --check and ruff check: clean. basedpyright: 0 errors, 0 warnings. lint-imports: 1 kept, 0 broken. deptry .: no issues.
  • pytest tests/core tests/config tests/tools --ignore=tests/core/test_pdf_url_fetcher.py: 1271 passed. 5 tests in test_image.py and test_origin_provider.py fail because no OpenRouter key is set here, and 74 tests error because no PostgreSQL could be launched (test_pdf_url_fetcher.py cannot load a system library); none of those touch this change.

I also ran one live search through _search_outcrawl with a real key (query "intentkit open source agent framework", limit 2): it returned the formatted result list with the repository as the first hit.

  • I have read the contributing guidelines.
  • I have added tests to cover my changes.
  • All new and existing tests passed (see the note above: the failures are environment related and unrelated to this change).

Related Issue

None, this adds a backend.

Disclosure: I work on Outcrawl.

This change was prepared with AI assistance (omp with Claude): the code, tests and this description were written with it, and the commands above were run as part of preparing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant