Skip to main content

xyberos-web-search

Web search abstraction plugin — RFC-0019, M5. One WebSearch contract (search(query, top_k) -> list[Result]), many providers behind it: Tavily, Serper, Brave, Exa, Firecrawl. Each adapter is a thin, stdlib-only urllib call; the plugin exposes a single typed web_search tool.

Install

pip install -e ./web-search

Usage

from xyberos import create_app
from xyberos_web_search import WebSearchPlugin

app = create_app()
app.load_plugin(WebSearchPlugin(provider="tavily"))   # API key from TAVILY_API_KEY

app.tools.execute("web_search", None, query="xyberos", top_k=5)

Provider + key resolution (explicit args, then env):

Provider provider API key env
Tavily tavily TAVILY_API_KEY
Serper serper SERPER_API_KEY
Brave brave BRAVE_API_KEY
Exa exa EXA_API_KEY
Firecrawl firecrawl FIRECRAWL_API_KEY

WEB_SEARCH_PROVIDER selects the default provider (default tavily). Calling the tool without a key raises a clear ProviderError.

Use the contract directly (provider-agnostic)

from xyberos_web_search import get_web_search

search = get_web_search("serper")   # reads SERPER_API_KEY
for result in search.search("xyberos", top_k=3):
    print(result.title, result.url, result.snippet)

Design

  • ContractWebSearch protocol + SearchResult(title, url, snippet, score, extra).
  • Adapters — thin, dependency-free, with an injectable request transport so tests run without a network.
  • Tool — the plugin registers web_search(query: str, top_k: int = 5) through the public FunctionTool API.

Examples

  • examples/web_search.py — CLI example; needs an API key (see README).

Tests

pip install pytest
pytest tests/

Adapters are tested against canned responses via a fake transport — no network required.

Ship location

Plugin (xyberos.plugins entry point). Depends on M2's HTTP patterns.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xyberos_web_search-0.1.0.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xyberos_web_search-0.1.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file xyberos_web_search-0.1.0.tar.gz.

File metadata

  • Download URL: xyberos_web_search-0.1.0.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for xyberos_web_search-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d5d77ae24eccb66d0729caad4a56e8342591571f28b7367afb3c7d457e4ad534
MD5 363aeb8dd5725e56b5e3079dc291543f
BLAKE2b-256 694dbfa714553f5d03b47fc2c2b6d359d76bc2a09175df6db240299b12788f6f

See more details on using hashes here.

Provenance

The following attestation bundles were made for xyberos_web_search-0.1.0.tar.gz:

Publisher: pypi-plugins.yml on xyberos/xyberos-plugins

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xyberos_web_search-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for xyberos_web_search-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2d2e909ebf882eabc1a6d0e6cf24d7da42fe621784ebe16b9f5a48764339cc90
MD5 4f4fd5890fa5111450c7bb73b9e39f8a
BLAKE2b-256 53089be6774813579ea0fb57dd3ccffd7106bed1c45854e7e3d2b4e53534301f

See more details on using hashes here.

Provenance

The following attestation bundles were made for xyberos_web_search-0.1.0-py3-none-any.whl:

Publisher: pypi-plugins.yml on xyberos/xyberos-plugins

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.2.0

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page