Skip to main content

WHSearch

AI-native research search engine built as a lightweight modular monolith.

Current phase

All phases implemented: foundation, multi-provider web discovery (DuckDuckGo + Wikipedia fan-out), robots-gated reader, passage retrieval, adaptive research planning with stopping conditions, claim-level evidence with source-independence and contradiction checks, MCP search agent (search, read_page, search_and_read, research), bounded SQLite/FTS5 local index, and explicit research budgets.

Design rules

  • Evidence first: retrieve sources and passages before generating research conclusions.
  • Online first: use external discovery initially; keep persistent storage bounded.
  • Respect robots.txt, access policies, and conservative per-domain rate limits.
  • Domain models and protocols must not depend on HTTP clients, providers, MCP, or extractors.
  • MCP is an adapter layer; research/search logic stays in application modules.
  • Optional integrations must not be required for importing the core domain.
  • Resource limits are explicit so the system remains usable on low-memory machines.

Planned phases

  1. Foundation: contracts, configuration, logging, testing, architecture checks. Done.
  2. Web discovery: provider abstraction and DuckDuckGo discovery. Done (+Wikipedia).
  3. Web reader: robots policy, fetching, extraction, metadata, passages. Done.
  4. Retrieval: passage ranking and deduplication. Done.
  5. Research: adaptive query planning and stopping conditions. Done.
  6. Evidence: claims, source independence, contradictions, verification. Done.
  7. Search agent: orchestration through the MCP tools. Done.
  8. Local index: SQLite/FTS5 bounded cache and reusable evidence. Done.
  9. Autonomous research budgets and larger-scale discovery. Done (budgets + fan-out).

Development

Use the repository virtual environment when available:

.venv/bin/python -m pytest
.venv/bin/python -m compileall -q src tests
.venv/bin/ruff check src tests

The quality gate must pass before moving to the next phase.

Install as an MCP server

Requires Python >= 3.12. After the whsearch package is published to PyPI, no manual install is needed — uvx fetches and runs it on first use:

{
  "mcpServers": {
    "whsearch": { "command": "uvx", "args": ["--from", "whsearch[mcp]", "whsearch"] }
  }
}

Alternatives:

uv tool install "whsearch[mcp]" && whsearch   # persistent install via uv
pipx install "whsearch[mcp]" && whsearch      # persistent install via pipx
pip install -e ".[mcp]" && whsearch           # from source

WHSEARCH_INDEX_PATH enables the persistent local index.

License

GPL-3.0-or-later, see LICENSE. Copyright (C) 2026 WHSearch contributors. Per-file copyright holder names were intentionally left generic; update them to your name before publishing if you are the sole author.

Release files for whsearch 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for whsearch 0.1.0
File Size Uploaded
whsearch-0.1.0.tar.gz 36.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for whsearch 0.1.0
File Interpreter ABI Platform
whsearch-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 80.8 kB

Release files / whsearch-0.1.0.tar.gz

Download URL whsearch-0.1.0.tar.gz
Size 36.1 kB
Tags Source
SHA-256 checksum
How to use checksums
681b732b35bf49e06b8442b000c86e4b40951397ee2600059452742e3760e785
BLAKE2b-256 checksum
How to use checksums
d5101be33d702d290dc0a8706756ace7af323f2ff3174e4530a68c3550884c1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / whsearch-0.1.0-py3-none-any.whl

Download URL whsearch-0.1.0-py3-none-any.whl
Size 44.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
25466a9a641447dc8c4963d7bde9bc9e626e6366a0303956909111927e9816b3
BLAKE2b-256 checksum
How to use checksums
009437d153636cb2d21fb45f0909e3bdc3529c25e2dddbfd0526ea80325372c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release history Release notifications | RSS feed

0.3.0

2 release files

0.2.0

2 release files

This release

0.1.0 This release

2 release 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