Skip to content

add WebSearchTool with Metaso API integration#133

Open
mrluanma wants to merge 1 commit into
HKUDS:mainfrom
meta-sota:feat/websearch-metaso
Open

add WebSearchTool with Metaso API integration#133
mrluanma wants to merge 1 commit into
HKUDS:mainfrom
meta-sota:feat/websearch-metaso

Conversation

@mrluanma
Copy link
Copy Markdown

Description

Adds WebSearchTool — a web search tool backed by the Metaso API — and registers it in the default agent toolset. Includes a built-in default API key with ~100 free searches/day.

Related Issues

None.

Changes Made

  • nanobot/agent/tools/web.py — Added _get_metaso_api_key() helper (falls back to built-in default key), and WebSearchTool class with web_search name, supporting query and optional topK params.
  • nanobot/agent/loop.py — Imported and registered WebSearchTool alongside WebFetchTool.
  • nanobot/workspace/TOOLS.md — Documented the new web_search tool.
  • tests/web_search_test.py — 387 lines of tests covering API key resolution, search responses, error handling, and edge cases.

Implement web_search tool using the Metaso search API. The tool supports
query-based web search with configurable result count, API key resolution
from METASO_API_KEY env var, and comprehensive error handling for rate
limits, auth failures, and daily quotas.

Metaso provides 100-free-searches/day quota.  You can set your own
`METASO_API_KEY` environment variable to raise that limit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant