Salesforce Agentforce Open Web Search

Salesforce Agentforce Open Web Search

Supercharge Your Salesforce AI: A Guide to Agentforce Open Web Search

Tired of your AI assistant giving outdated answers? Ground your generative AI in the real-time, ever-changing world of the internet with Salesforce Agentforce Open Web Search. This powerful feature allows your AI agents to securely search the web, find the most current information, and provide accurate, timely answers—drastically reducing hallucinations and boosting user trust. 🤖

This guide will walk you through the simple, step-by-step process to configure Open Web Search and connect it to your Agentforce agent.


Step 1: Create Your Web-Enabled Data Library

First, we need to create a special “Data Library” that tells Salesforce it’s allowed to search the open web.

  1. Navigate to Setup in Salesforce, use the Quick Find box to search for Agentforce Data Library, and select it.
  2. Click the New Library button.
  3. Give your library a clear Name (e.g., Live Web Search Library) and a helpful Description. The API Name will auto-populate.
  4. For Data Type, select Web. This is the key step that enables web-based data sources.
  5. Toggle on Turn on Web Search. Be sure to read the on-screen instructions regarding the use of external data.
  6. For Web Source, ensure Search the Web is selected.
  7. Click Save.

You’ve now created the gateway for your agent to access live web data!


Step 2: Configure Your Agentforce Agent

With the Data Library ready, it’s time to connect it to an Agentforce agent and tell it how to use its new superpower.

  1. Open the Agentforce Agent in the Builder.
  2. In the agent’s configuration panel, click on the Data tab.
  3. Select your newly created Data Library (e.g., Live Web Search Library) to connect it to this agent.

Create the Web Search Topic

Now, let’s create a specific “Topic” that instructs the agent on performing the web search.

  1. Go to the Topics tab and click New Topic.
  2. Use the following configuration, which is optimized to ensure the agent relies only on search results and not its internal knowledge:
    • Name: Search Web
    • Classification: Declarative
    • Scope: Agent-Facing
    • Instructions: You are a helpful assistant. You can perform a web search and then synthesize an answer for the user based on your search results. You must respond to the user based on the web search results. If the web search results do not contain an answer, you MUST NOT use your own knowledge. Instead, you must state that you could not find an answer in the search results.

Add the Action

Finally, add the action that triggers the search.

  1. Within your new Search Web topic, click Add Action.
  2. Select the Answer Questions with Knowledge action. This action automatically utilizes the Data Library you connected earlier to perform the search and generate a response.
  3. Save your topic and activate your agent.

That’s it! Your Salesforce Agentforce agent is now equipped to answer questions using real-time information from the open web. You can test it by asking questions about recent events, a competitor’s latest press release, or any other up-to-the-minute topic. 🚀

Salesforce Article for Reference:

https://help.salesforce.com/s/articleView?id=ai.data_library_web_search.htm&type=5

Leave a Reply