# Give your AI agent real-time web search > Give your agent real-time web search so it can answer questions your data sources don't cover The **Web search** Action lets your QwryAI agent search the web during a conversation and use the results in its reply. It's for teams whose customers ask about live or fast-changing information that their data sources don't cover. You can limit it to the sites you trust, and it works on every channel, including WhatsApp, Slack, phone and the API. **Best for:** answering questions that depend on live or fast-changing information, and filling gaps your data sources don't cover. **Common use cases:** * Questions about information that changes too often to keep in a data source, such as weather or service updates * Topics covered on your industry's reference sites but not on your own * Follow-up questions the agent can't answer from your sources alone ## How to create the Action **1. Open Actions** In your [QwryAI dashboard](https://www.qwryai.com), select your agent and click **Build › Actions** in the sidebar. **2. Create the Action** Click **Create Action**, then the **Web search** card ("Give your agent real-time web search to answer questions with live data"), and **Start customizing**. **3. Configure General** **Action name:** a descriptive name, such as `search_the_web`. Names need 3 to 63 characters and can contain only letters, numbers, underscores and hyphens, with no spaces. **When to use:** when the agent should search and the kind of questions that should trigger it. You can also add instructions for after the search, such as "Include a link to the page you used." It comes prefilled with a default you can edit, and **Reset** restores it: ```text Use when the user asks for a topic or question which you don't know the answer to, or topics that you have outdated information about. Call this tool to search the web for information and reply with the search results. ``` ![search_the_web typed in Action name, above the default When to use text and Reset.](annotated/01-name.webp "Name the Action; When to use comes prefilled.") To run the Action only as a [Procedure](/docs/user-guides/chatbot/procedures/procedures-overview) step, turn on [**Only use in Procedures**](/docs/user-guides/chatbot/actions/actions-overview#only-use-in-procedures). **When to use** is then hidden. **4. Configure the search settings** Set **Include Images** and **Included Domains (optional)** in the same section. See [Settings](#settings). Then click **Continue**. **5. Choose Channels** Web search works on every channel. Turn it on or off for each configured channel. See [Channels](/docs/user-guides/chatbot/actions/actions-overview#channels). **6. Save and publish** Click **Save**. The Action is saved to your agent's draft; click **Publish** in the top-right corner to make it live. See [Drafts and publishing](/docs/user-guides/chatbot/drafts-and-publishing). ## Settings **Include Images:** turn it on to include relevant images in the search results, so the agent can add them to its reply. Each search returns up to 3 images, from the same sites as the results. ![The Include Images switch with its description, above Included Domains.](annotated/02-images.webp "Include Images adds pictures to the results.") **Included Domains (optional):** limit the search to specific sites. Leave it empty and the agent searches the whole web. Add sites and it searches only those. Sites related to your business keep results relevant. Add each site on a new line, as a full URL: ```text https://www.abc.net.au https://www.bom.gov.au ``` ![Two websites entered in Included Domains, one per line.](annotated/03-domains.webp "Limit the search to a few sites, one per line.") * **Enter sites, not pages.** Each line is reduced to its domain, so `https://www.example.com/blog` searches all of `example.com`. * **Subdomains are included.** `https://www.example.com` and `https://example.com` both also cover `docs.example.com` and other subdomains. * **Each line must be a public `http` or `https` URL,** without a port or a username and password. Otherwise the form shows which line to fix. * **Up to 300 sites.** > [!TIP] > > Test the Action in the **Preview** beside the editor with a question your data sources don't cover, and check that the answer reflects current information from the sites you allowed. ## How Web search works When a customer's question matches **When to use**, the agent sends a search query to a dedicated search service and reads the top 5 results, each with a title, link and snippet, plus images when **Include Images** is on. It then writes its reply from those results. The model's own built-in web search isn't used, so the Action works the same with every model. The agent decides whether to mention its sources. To always include them, ask for it in **When to use**, for example "Include a link to the page you used." **Example.** With **Included Domains** set to `https://www.bom.gov.au` and **When to use** set to "When a customer asks about the weather for a store pickup", a conversation could look like this: | Who | Message | | - | - | | **Customer** | What's the weather forecast for Sydney this weekend? Planning to pick up my order in person. | | **Agent** | Here's the latest forecast for Sydney from the Bureau of Meteorology... *(a summary of the weekend forecast from the search results)* | ## Best practices > [card] Limit your sites | /docs/user-guides/chatbot/actions/web-search | Add the sites you trust to Included Domains instead of searching the whole web. > [card] Clear Action triggers | /docs/user-guides/chatbot/actions/actions-overview | Write a specific When to use so the agent searches only when your own sources fall short. > [card] Prefer your own sources | /docs/user-guides/chatbot/data-sources | Anything you control and can keep current belongs in a data source. Use web search for the rest. > [card] Test thoroughly | /docs/user-guides/chatbot/tests | Ask questions your sources don't answer and check the results are accurate and from the sites you expect. ## Frequently asked questions > [accordion] Can I limit Web search to specific pages or folders of a site? > > No. Each line in **Included Domains** is reduced to its domain, so a page or folder still searches the whole site. To focus on one section, describe it in **When to use**. > [accordion] Does the agent cite or link its sources? > > Not always. The search results go to the agent, which decides what to include. Ask for links in **When to use** if you want sources in every reply. > [accordion] Can the agent show images from the web? > > Yes. Turn on **Include Images** and each search also returns up to 3 related images, which the agent can add to its reply. With **Included Domains** set, images come only from those sites. > [accordion] Which models and channels support Web search? > > Every model and every channel, including WhatsApp, Slack, phone and the API. > [accordion] Why doesn't the agent search yet? > > Web search saves to your draft. Click **Publish** to make it live, and check that the Action is on for the customer's channel. ## Next steps > [card] Data sources | /docs/user-guides/chatbot/data-sources | Train the agent on the content you own. > [card] Custom actions | /docs/user-guides/chatbot/actions/custom-action | Call a specific API instead of searching. > [card] Guardrails | /docs/user-guides/chatbot/guardrails | Keep answers on topic. > [card] Drafts and publishing | /docs/user-guides/chatbot/drafts-and-publishing | Put your changes live. > [card] Actions overview | /docs/user-guides/chatbot/actions/actions-overview | See every Action you can add.