feat(chat): add web_search convenience tool (#2306)#2575
Merged
mrveiss merged 3 commits intoDev_new_guifrom Mar 27, 2026
Merged
feat(chat): add web_search convenience tool (#2306)#2575mrveiss merged 3 commits intoDev_new_guifrom
mrveiss merged 3 commits intoDev_new_guifrom
Conversation
The chat agent previously had no simple web search capability — small models had to orchestrate a multi-step browser flow (navigate → fill → click → get_text) which they couldn't do reliably. This adds a single `web_search` tool that accepts a query and returns results. Implementation: - New `_handle_web_search_tool` dispatch in tool_handler.py - Primary path: reuse existing `search_web_embedded` from playwright_service - Fallback path: DuckDuckGo HTML via browser VM `send_to_browser_vm` - Added `web_search` to known tools list (error messages + #2310 reminder) - Updated system_prompt_simple.md with tool documentation and examples
|
| Metric | Count |
|---|---|
| Total Violations | 2 |
| SSOT Violations (high priority) | 1 |
| Other Violations | 1 |
⚠️ 1 values have SSOT config equivalents!
These should be replaced with SSOT config imports:
Python:
from src.config.ssot_config import config
# Use: config.vm.main, config.port.backend, config.backend_urlTypeScript:
import config from '@/config/ssot-config'
// Use: config.vm.main, config.port.backend, config.backendUrl📖 See SSOT_CONFIG_GUIDE.md for documentation.
…2306) Code review feedback: when DuckDuckGo results exceed 3000 chars, append "... [results truncated]" so the LLM knows it received partial data.
…rowser tools (#2593, #2594) #2593: system_prompt.md was missing browser tools and web_search documentation that system_prompt_simple.md already had. Added matching sections. #2594: ToolRegistry.get_available_tools() only listed legacy tools. Added web_search (#2306) and browser tools (#1368) to match the chat workflow's ToolHandlerMixin dispatch capabilities.
This was referenced Mar 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
web_searchtool to the chat agent's tool dispatcher so small models (Mistral 7B) can search the web with a single tool call instead of orchestrating a multi-step browser flowsearch_web_embeddedfromplaywright_service.py; falls back to DuckDuckGo HTML via browser VMChanges
chat_workflow/tool_handler.py_handle_web_search_tool,_execute_web_search,_web_search_via_playwright,_web_search_via_browser_vmmethods; dispatch routing; known tools listchat_workflow/manager.pyweb_searchto #2310 tools reminderresources/prompts/chat/system_prompt_simple.mdTest plan
web_searchtool is called (not hallucinated names)web_searchappears in known tools list on invalid tool errorweb_searchCloses #2306