Skip to main content

Build a File-Based Data Library for an Agent

Learning Objectives

After completing this unit, you’ll be able to:

  • Create and configure a data library from Setup.
  • Create or add a data library from Agentforce Builder.

Whether you’re new to Agentforce or a seasoned user, it’s easy to set up an Agentforce Data Library. All you need is Salesforce admin privileges and sufficient permissions to enable Agentforce Data Library. If you’re not a Salesforce admin, that’s OK. Read along to learn how your admin would take the steps in a production org or sandbox. A sandbox is a safe space to test out agents with data libraries. To try it out, see Test Data Libraries in a Sandbox.

Meet Coral Cloud Resorts

Coral Cloud Resorts is a luxury hospitality company with hotels operating in some of the world’s most glamorous destinations. The company has been experimenting with AI agents, and so far so good. But Coral Cloud Resorts admin Becca wants her agents to answer more specific questions and complete complex tasks based on the company’s unique policies. The resort’s current data? A massive collection of unstructured content—emails, PDFs, videos, and internal FAQs.

That’s where Agentforce Data Libraries come in. After researching how to add unstructured data to her agents, Becca decides to set up an Agentforce Data Library to ground Coral Cloud’s AI chatbots.

Let's follow along as she goes through the setup steps.

Create a Data Library

Becca is ready to create a data library. Here’s what she does.

  1. From Setup, search for and select Agentforce Data Library.
  2. From the Agentforce Data Library setup page, click New Library.
  3. Enter a unique library name and an optional description. This should reflect its purpose or content.

A new data library labeled Coral Cloud Spa Services.

  1. Click Save.

Choose a Data Source

Next, Becca chooses the type of data source she wants to use. Agentforce offers two main options: Knowledge articles and file uploads. Once you choose a data source, you won’t be able to change it later, so make sure to select the one that best fits your needs.

Becca wants this agent to recommend spa services to guests based on their needs and Coral Cloud’s offerings. The spa manager writes up and circulates information about spa services and seasonal specials via PDF files. So, Becca decides to create a file-based data library. Here’s what she does.

  1. Click Upload Files and select your files. Ensure the files are within the size limits (4 MB for text/HTML, 100 MB for PDFs).

The Coral Cloud Spa Services data library with two files uploaded.

  1. Click Save.

As soon as she clicks save, several configuration steps across Data Cloud and Prompt Builder begin. Data streams are pushed to Data Cloud, data objects are created and mapped, and a search index and retriever are created. With these steps completed automatically, it’s easy for Becca and Coral Cloud Resorts to link agents to their data. No heavy lifting. Just a clean, simple way to make agents smarter.

Assign Data Libraries to Features

The library is ready to use, and Becca wants to assign it to an agent for Coral Cloud’s spa services web page. Here’s how she assigns her new data library.

  1. Click the name of your agent, and then click Open in Builder.
  2. Click the Knowledge tab. Select a library for your agent (or, to create a library, click New Library).
  3. Save your changes.
  4. Click Activate.

The Agentforce Builder opened on the Data tab, showing the Coral Cloud Spa Services file-based data library.

To see which features support data libraries, go to Salesforce Help.

Try It Out

Now that she’s added the data library to her agent, Becca is ready to see it in action. To test out her changes, she first checks that the search index and data library are ready, then restarts the preview conversation.

Becca asks the agent about available spa services for sensitive skin. After thinking for a moment, the agent recommends the Tropical Revitalizing facial and the Aloha Aromatherapy facial.

The response is quick and seamless; it works!

The agent preview window with the agent conversation recommending spa services highlighted.

Next, Becca wants to see if the agent can make a recommendation from the resort’s specials menu. She asks about seasonal specials for sensitive skin, and the agent recommends the Holiday Bliss Package, even highlighting the complimentary cookie and hot chocolate that comes with the package. Becca looks over the agent’s reasoning, which cites the files she uploaded to her data library. Finally, Becca asks the agent for the Holiday Bliss Package price to verify that it matches the menu. The agent swiftly responds with the correct price.

The agent preview window with the agent conversation recommending spa services and cost highlighted. The related reasoning is highlighted as well.

Satisfied with the agent’s responses to her test questions, Becca clicks Activate one last time. The agent, grounded in the resort’s data, is live and ready to help guests relax and unwind at Coral Cloud’s premiere spa.

Wrap It Up

You’ve just seen how fast and easy it is to go from raw unstructured data to intelligent, grounded responses—all with Agentforce Data Libraries. Whether you’re an experienced Salesforce admin or just starting out, you now have the tools to create, configure, and test data libraries that will make your AI agents smarter, more accurate, and ready to wow your customers. Ready to put your new skills to the test? Dive in to a sandbox and see the magic happen.

Resources

Teilen Sie Ihr Trailhead-Feedback über die Salesforce-Hilfe.

Wir würden uns sehr freuen, von Ihren Erfahrungen mit Trailhead zu hören: Sie können jetzt jederzeit über die Salesforce-Hilfe auf das neue Feedback-Formular zugreifen.

Weitere Infos Weiter zu "Feedback teilen"