Nodes/ComfyUI-Live-Search/๐ŸŒ Live Search Agent
ComfyUI Node

๐ŸŒ Live Search Agent

Finally, ComfyUI Can Google Things

By Zone-RoamยทCreated 10 months agoยทUpdated 10 months agoยท 23
๐ŸŒ Live Search Agent
  • model_config
  • search_settings
  • image
  • answer
  • source_urls
  • optimized_prompt
โ—„promptโ€”โ–บ
โ—„roleโ–บ

This is the payoff node. ๐Ÿ”‘ API Loader and โš™๏ธ Settings feed it, but ๐ŸŒ Live Search Agent is where the actual search and summarization happen: you type a question, wire in a model_config and search_settings, queue it, and get back a written answer plus the URLs the model actually read. It's the node that turns a static image pipeline into something that knows what day it is, what the weather is doing, or who actually won last night's game - facts no image model can know on its own.

How it works

The Agent runs one of two flows depending on the mode you set in the Settings node.

T2T (text-only): the prompt goes through a detection pass - if it contains GPS coordinates, the Agent calls the free Open-Meteo API for live weather/time and uses geopy + Nominatim to reverse-geocode the coordinates into a place name (that's how "40.00023, 116.27808" becomes "Beijing, Haidian District"). Then it optionally optimizes your query into better English search keywords, runs a real DuckDuckGo search via the ddgs library, scrapes the most relevant pages with BeautifulSoup, and hands all of it to the LLM to write a sourced answer.

TI2T (text + image): your ComfyUI IMAGE tensor gets base64-encoded and sent to the vision model, which generates a search query from the picture, optionally searches, then reasons over the image plus the live snippets. That's how you upload a photo of a building and get back "that's the Eiffel Tower, here's the current weather in Paris."

Either way, nothing here downloads a model. All of it is API calls - the only "heavy" part is the network.

The inputs that matter

  • prompt - your question. Multiline, so write naturally.
  • model_config - from the API Loader. Required, obviously.
  • search_settings - from the Settings node. Required.
  • image - optional IMAGE input, only needed when Settings mode is TI2T.
  • role - optional custom system prompt injected before the default instructions. Handy for pinning a persona ("answer like a travel agent") without editing the pack's own prompts.

The three outputs

  • answer - the finished STRING. Wire it to any text display node, or feed it downstream into a prompt. For image generation, treat it as a researched briefing you paste into your positive prompt.
  • source_urls - newline-joined STRING of the URLs the model actually cited. Fact-checking is the whole point of this node, so don't skip it.
  • optimized_prompt - the search query that was actually run, after query optimization. When an answer misses the mark, this is the first place to look - it shows you whether the search itself went sideways.

Installing it

Part of ComfyUI-Live-Search. ComfyUI Manager โ†’ search Live Search โ†’ install โ†’ restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/Zone-Roam/ComfyUI-Live-Search.git
cd ComfyUI-Live-Search
pip install -r requirements.txt

Dependencies are light (requests, beautifulsoup4, ddgs, python-dotenv, geopy), no model files, no torch conflicts.

Where people get burned

  • DuckDuckGo scraping is not a guarantee. The search uses real web scraping, not an API - it's usually reliable, but if it's flaky from your network, set the proxy in the Settings node. The README is upfront that they chose DuckDuckGo precisely because Google's anti-bot walls make scraping it a nightmare.
  • TI2T without an image, or a settings mode that doesn't match what you wired up. The Agent picks its model from the Settings mode, so a mismatch produces a confusing failure.
  • Old tutorials. The README mentions a single "Live Search (Legacy)" node for backward compatibility, but the shipped pack registers only the three modular nodes - if a guide you're following uses the old single node, it's just outdated.
CategoryLiveSearch

Inputs (5)

NameTypeDefaultDescription
promptSTRINGโ€”
model_configMODEL_CONFIGโ€”
search_settingsSEARCH_SETTINGSโ€”
imageoptIMAGEโ€”
roleoptSTRINGโ€”

Outputs (3)

NameTypeDescription
answerSTRINGโ€”
source_urlsSTRINGโ€”
optimized_promptSTRINGโ€”