BookbagBookbag

Web search

Give your agent real-time access to the web. The web search action pulls fresh results — with an optional generated answer and source links — for questions your indexed data can't cover.

View as Markdown

Your indexed data is the agent's primary source of truth, but some questions need fresh, live information. The Web search action lets the agent look something up on the web in real time and ground its reply in the results.

Powered by Tavily

Web search runs through the Tavily search API. You provide a Tavily API key — either in the action config or via the TAVILY_API_KEY environment variable. Without a key, the action returns a clear "not configured" message instead of failing silently.

Add the action

  1. 1
    Open Actions → Web search
    Add the web search action from your agent's Actions tab.
  2. 2
    Add your Tavily API key
    Paste a Tavily key into the action config, or set TAVILY_API_KEY for the workspace.
  3. 3
    Scope it (optional)
    Restrict results to specific domains, and choose whether to include images.
  4. 4
    Describe when to search
    Tell the agent to search only for things outside your knowledge — current events, live availability, third-party info.

Configuration

Web search is a built-in of kind web_search. The action takes a query parameter from the model and supports these config options:

SettingDescriptionDefault
api_keyYour Tavily API key. Falls back to the TAVILY_API_KEY env var.(env var)
include_domainsLimit results to these domains. Accepts an array or a comma-separated string.(all domains)
include_imagesWhether to return image results alongside text.false

Each search returns a short generated answer, up to five results (title, URL, and an excerpt), and optionally images. The agent uses these to compose a grounded reply with sources.

web_search config
{
  "kind": "web_search",
  "include_domains": ["yourbrand.com", "shippingcarrier.com"],
  "include_images": false
}

When to use it

Don't replace your knowledge base with search

Web search is a supplement, not a substitute. Your policies, products, and FAQs should live in your data sources so answers stay accurate and on-brand. Reserve web search for genuinely live or external questions.

  • Good fit — current events, live third-party availability, public reference info not worth indexing.
  • Poor fit — your return policy, your product catalog, your shipping times. Index those instead.

FAQ

What's next