For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inSign up
Support
GuidesReference
GuidesReference
    • Core
      • Overview
    • Agents
      • Overview
      • AgentBase
      • AgentServer
      • BedrockAgent
      • CLI Tools
      • Configuration
      • ContextBuilder
      • DataMap
      • FunctionResult
      • Helper Functions
      • LiveWire
      • MCP Gateway
      • PomBuilder
      • Prefabs
      • Search
      • SkillBase
      • Skills
        • api_ninjas_trivia
        • claude_skills
        • Custom Skills
        • datasphere
        • datasphere_serverless
        • datetime
        • google_maps
        • info_gatherer
        • joke
        • math
        • mcp_gateway
        • native_vector_search
        • play_background_file
        • spider
        • swml_transfer
        • weather_api
        • web_search
        • wikipedia_search
      • SWAIGFunction
      • SWMLBuilder
      • SWMLService
      • WebService
    • RELAY
      • Overview
      • Actions
      • Call
      • Constants
      • Events
      • Message
      • RelayClient
      • RelayError
    • REST Client
      • Overview
      • Addresses
      • Calling
      • Chat
      • Compat
      • Datasphere
      • Fabric
      • Imported Numbers
      • Logs
      • Lookup
      • MFA
      • Number Groups
      • Phone Numbers
      • Project
      • PubSub
      • Queues
      • Recordings
      • Registry
      • RestClient
      • Short Codes
      • SignalWireRestError
      • SIP Profile
      • Verified Callers
      • Video
LogoLogoSignalWire Docs
Log inSign up
Support
On this page
  • api_key
  • search_engine_id
  • num_results
  • delay
  • max_content_length
  • oversample_factor
  • min_quality_score
  • no_results_message
  • tool_name
AgentsSkills

web_search

|View as Markdown|Open in Claude|
Was this page helpful?
Edit this page
Previous

wikipedia_search

Next
Built with

Search the web using the Google Custom Search API. Results are filtered for quality and summarized for voice delivery.

Tools: web_search

Requirements: Google Custom Search API key + Search Engine ID

Multi-instance: Yes (use different tool_name and search_engine_id per instance)

api_key
strRequired

Google API key with Custom Search JSON API enabled.

search_engine_id
strRequired

Programmable Search Engine ID from Google.

num_results
intDefaults to 3

Number of search results to return (1-10).

delay
floatDefaults to 0.5

Delay between scraping pages in seconds.

max_content_length
intDefaults to 32768

Maximum total response size in characters.

oversample_factor
floatDefaults to 2.5

How many extra results to fetch for quality filtering (e.g., 2.5 fetches 2.5x the requested number). Range: 1.0-3.5.

min_quality_score
floatDefaults to 0.3

Quality threshold for filtering results (0.0-1.0).

no_results_message
str

Message to show when no quality results are found. Use {query} as a placeholder for the search query.

tool_name
strDefaults to web_search

Custom function name.

1from signalwire import AgentBase
2
3class MyAgent(AgentBase):
4 def __init__(self):
5 super().__init__(name="assistant", route="/assistant")
6 self.set_prompt_text("You are a helpful assistant.")
7 self.add_skill("web_search", {
8 "api_key": "YOUR_GOOGLE_API_KEY",
9 "search_engine_id": "YOUR_SEARCH_ENGINE_ID",
10 "num_results": 3
11 })
12
13agent = MyAgent()
14agent.serve()