Problem
The web-search toggle added recently (POST /chat's web_search flag) does one search, folds the top results into the prompt, and answers in a single LLM call. That's fine for a quick lookup, but a real research/study task ("give me a thorough rundown of X") often needs multiple rounds: search, read a few of the most promising pages in full, decide what's still missing, search again, then synthesize.
Proposal
A "deep search" mode as a heavier alternative to the existing toggle:
- Initial
web_search call(s) to survey the topic.
- Use mcp-server's existing
web_fetch tool (already implemented in internal/tools/web.go, but never called from chat-agent — same gap the basic web_search toggle had before this session) to pull full content from the most relevant results.
- Let the LLM iterate — identify gaps, issue follow-up searches — bounded to a fixed number of rounds to keep cost/latency predictable.
- Produce a longer, structured synthesis with citations back to every source used, reusing the existing citation mechanism.
Relationship to other issues
Pairs well with #65 (cross-source synthesis) but is specifically about the web rather than ingested documents. Should stay a distinct, explicit mode (not the default toggle) given the extra latency/cost of multiple search+fetch round-trips.
Problem
The web-search toggle added recently (
POST /chat'sweb_searchflag) does one search, folds the top results into the prompt, and answers in a single LLM call. That's fine for a quick lookup, but a real research/study task ("give me a thorough rundown of X") often needs multiple rounds: search, read a few of the most promising pages in full, decide what's still missing, search again, then synthesize.Proposal
A "deep search" mode as a heavier alternative to the existing toggle:
web_searchcall(s) to survey the topic.web_fetchtool (already implemented ininternal/tools/web.go, but never called from chat-agent — same gap the basic web_search toggle had before this session) to pull full content from the most relevant results.Relationship to other issues
Pairs well with #65 (cross-source synthesis) but is specifically about the web rather than ingested documents. Should stay a distinct, explicit mode (not the default toggle) given the extra latency/cost of multiple search+fetch round-trips.