Catalog PyPI
PACKAGE EXPLORERView in registry

agentarch-search-tools

PyPI

Web search tools with Google and DuckDuckGo support

Versions collected1
Direct dependencies8From release 1.0.2
Last observed20 Oct, 21:28 UTC

README

Version 1.0.2 documentation

Search Tools (Python @tool Pattern)

Web search capabilities using Google (primary) and DuckDuckGo (fallback).

Installation

uv add tool-search-tools

Tools Provided

ToolDescription
web_searchSearch with automatic Google → DuckDuckGo fallback
search_googleGoogle only (requires API credentials)
search_duckduckgoDuckDuckGo only (no credentials needed)

Configuration

Google Search (Optional)

Set environment variables for Google Programmable Search Engine:

export GOOGLE_API_KEY="your-api-key"
export GOOGLE_CSE_ID="your-cse-id"

Without these, web_search automatically falls back to DuckDuckGo.

Rate Limiting (Optional)

export GOOGLE_SEARCH_RATE_LIMIT="1.0"      # requests per second
export GOOGLE_SEARCH_TIMEOUT="30.0"        # seconds
export DUCKDUCKGO_SEARCH_RATE_LIMIT="1.0"
export DUCKDUCKGO_SEARCH_TIMEOUT="30.0"

Usage

Direct Invocation

from search_tools import web_search

result = await web_search.ainvoke({"query": "python async tutorial", "num_results": 5})

print(result["provider"])  # "google" or "duckduckgo"
for r in result["results"]:
    print(f"{r['title']}: {r['url']}")

With LangGraph

from langchain_openai import ChatOpenAI
from langgraph.prebuilt import ToolNode
from search_tools import web_search

tools = [web_search]
llm = ChatOpenAI(model="gpt-4o-mini")
llm_with_tools = llm.bind_tools(tools)
tool_node = ToolNode(tools)

Response Format

{
    "results": [
        {"title": "Page Title", "url": "https://...", "snippet": "Description..."},
        ...
    ],
    "provider": "google",  # or "duckduckgo"
    "query": "original query",
    "count": 5
}

When to Use Which

ToolUse Case
web_searchDefault choice - automatic fallback
search_googleNeed Google specifically, handle errors yourself
search_duckduckgoTesting, or when Google quota exhausted

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
1.0.21 Dec 20258

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 21:28 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:e7e5e162cfc030a4fad304542123aa1481bde39a13091002e564f4ccb1645de5