Skip to main content

Two-phase AI-assisted search library with zoom-out and zoom-in workflows

Project description

Zoom Search

Better Answers, Bounded Extra Cost

Direct search baseline vs Zoom Search workflow

Useful results

Answer quality

Extra budget

1-5 -> 4-12

more good sources

2.0-7.2 -> 7.8-8.7

stronger final answers

+5.9s to +12.2s

+2.3k to +5.1k tokens

Python >=3.10 License: MIT Package: zoom-search Tests: pytest goofrey/zoom-search MCP server

Quickstart · Agent Tool · Agents · Benchmarks · Advanced Configuration

Zoom Search is a search and evidence tool for AI agents. It helps agents rewrite search questions, gather broader web evidence, zoom into high-value source domains, and return sourced answers with metrics.

It is built for agentic applications that need stronger source discovery, traceability, and answer grounding than a single search call.

Why Zoom Search

  • Agent search tool: expose structured answers, sources, warnings, and metrics for tool-calling agents.
  • Better evidence gathering: rewrite agent questions into stronger search variants.
  • Source-domain zoom-in: search broadly first, then focus on high-value domains.
  • Traceable outputs: preserve source domains, duplicate provenance, warnings, and runtime metrics.
  • MCP/LangGraph ready: use Zoom Search through MCP or LangGraph integrations.
  • Provider-flexible: use built-in engines or custom OpenAI-compatible and native HTTP providers.

Install

pip install zoom-search

Quickstart

Run a deterministic local demo without API keys:

import asyncio

from zoom_search import search


async def main() -> None:
    response = await search(
        question="What hotels in Shenzhen have rooms with exercise bikes?",
        demo_mode=True,
        output_mode="answer_with_sources",
        seed=7,
    )
    print(response.answer)
    print(response.results)


asyncio.run(main())

Agent Tool Example

Install the MCP extra:

pip install "zoom-search[mcp]"

Add Zoom Search to your MCP client:

{
  "mcpServers": {
    "zoom-search": {
      "command": "zoom-search-mcp",
      "env": {
        "ZOOM_SEARCH_LLM_ENGINE": "gemini",
        "ZOOM_SEARCH_LLM_MODEL": "gemini-2.5-flash",
        "ZOOM_SEARCH_LLM_API_KEY": "YOUR_GEMINI_API_KEY",
        "ZOOM_SEARCH_SEARCH_ENGINE": "tavily",
        "ZOOM_SEARCH_SEARCH_API_KEY": "YOUR_TAVILY_API_KEY"
      }
    }
  }
}

Your agent can then call the zoom_search tool with a question argument:

{
  "question": "Which vector databases support hybrid search and metadata filtering for Python apps?",
  "output_mode": "answer_with_sources"
}

The tool returns sourced answers, source-domain zoom-in, warnings, and runtime metrics.

Or wrap it as a LangGraph/LangChain tool:

import os

from langchain.tools import tool

from zoom_search import search


@tool
async def zoom_search_evidence(query: str) -> dict:
    response = await search(
        question=query,
        llm_engine=os.environ["ZOOM_SEARCH_LLM_ENGINE"],
        llm_model=os.environ["ZOOM_SEARCH_LLM_MODEL"],
        llm_api_key=os.environ["ZOOM_SEARCH_LLM_API_KEY"],
        search_engine=os.environ["ZOOM_SEARCH_SEARCH_ENGINE"],
        search_api_key=os.environ["ZOOM_SEARCH_SEARCH_API_KEY"],
        output_mode="answer_with_sources",
    )
    return response.to_dict()

See docs/agent-integration.md for MCP client configuration and provider environment variables.

Benchmarks

Historical evaluations compare direct search against the Zoom Search agent workflow, showing better useful result coverage and stronger final answers with bounded extra time and token cost.

Case Good results Answer quality Extra time Extra tokens
Playwright authentication reuse 5 -> 7 6.6 -> 8.7 +5.89s +2,324
GitHub Actions secrets inherit 1 -> 4 2.0 -> 7.8 +8.93s +2,936
Hydrangea pruning comparison 4 -> 12 7.2 -> 8.4 +12.17s +5,073

See the full benchmark notes in docs/benchmarks.md.

Runnable examples for demo mode, streaming, conversation history, and LangGraph are available in the examples/ directory.

Documentation

License

Zoom Search is open source under the MIT License.

Project details


Download files

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

Source Distribution

zoom_search-0.1.5.tar.gz (2.1 MB view details)

Uploaded Source

Built Distribution

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

zoom_search-0.1.5-py3-none-any.whl (78.8 kB view details)

Uploaded Python 3

File details

Details for the file zoom_search-0.1.5.tar.gz.

File metadata

  • Download URL: zoom_search-0.1.5.tar.gz
  • Upload date:
  • Size: 2.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for zoom_search-0.1.5.tar.gz
Algorithm Hash digest
SHA256 5431492e7c586975b4abd5fc6af8910e143a3a8460b676fc6948140a196df402
MD5 55de35fc574b15a1d54147388346a407
BLAKE2b-256 fb76cdc28c58fa15111b4e14521dc57448c8b0e62b9b99441b3d0f9662748cf0

See more details on using hashes here.

File details

Details for the file zoom_search-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: zoom_search-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 78.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for zoom_search-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4d0b0355aa090702d07d684cf6f57fa22ddf941ac1c7b39ad61fa169b551178f
MD5 a19515aa05329f2a684ddb9fe58454c3
BLAKE2b-256 c9a19866c521a07f5ea7fc96aa4d36941de24846bcbdd057b745a3c5f4ea6324

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page