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 MarkdownYour 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.
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
- 1Open Actions → Web searchAdd the web search action from your agent's Actions tab.
- 2Add your Tavily API keyPaste a Tavily key into the action config, or set TAVILY_API_KEY for the workspace.
- 3Scope it (optional)Restrict results to specific domains, and choose whether to include images.
- 4Describe when to searchTell 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:
| Setting | Description | Default |
|---|---|---|
api_key | Your Tavily API key. Falls back to the TAVILY_API_KEY env var. | (env var) |
include_domains | Limit results to these domains. Accepts an array or a comma-separated string. | (all domains) |
include_images | Whether 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.
{
"kind": "web_search",
"include_domains": ["yourbrand.com", "shippingcarrier.com"],
"include_images": false
}When to use it
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.