Skip to main content

Review Options to Ground an Agent With Data

Learning Objectives

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

  • Describe four different mechanisms that can be used to incorporate data in Agentforce.
  • Learn several methods that Agentforce uses to connect with data.

So, how does Agentforce access your data for grounding? To understand that, let’s take a step back and talk about the building blocks of an AI agent.

The Building Blocks of an Agent

Agents are made up of three key elements.

  • Topics define the types of jobs an agent can do.
  • Instructions draw clear boundaries to define how an agent makes decisions.
  • Actions are the specific tasks or activities that an agent can perform.

Salesforce provides some standard topics and actions for Agentforce so you can get up and running quickly. But you can also create custom topics and custom actions to give your AI agent additional abilities to perform tasks specific to your business.

Connect Actions to Data with Four Mechanisms

When you build an agent action, you don’t have to create it from nothing. You build actions on top of the existing platform functionality that you want to make available to Agentforce—invocable or REST Apex classes, autolaunched flows, prompt templates, and MuleSoft APIs.

In Agentforce, we refer to that underlying functionality as a reference action; it’s an awesome way to get more out of your Salesforce Platform capabilities. Reference actions are the mechanisms of how an agent connects to your data and gets work done. Let’s take a look at each type of reference action.

Process diagram showing the relationship of agent actions to data retrieval mechanisms and data sources.

Power Agent Actions with Apex

Developers can build agent actions using Apex, as well as invoke Agentforce agents from an Apex class. Check out the Agent Customization with Apex module for more information.

Power Agent Actions with Flows

If you prefer a low-code or no-code approach to agent actions, you can build your agent actions using Flow Builder. Check out the Agent Customization with Flows module to learn how to create and configure your agent actions with flows.

Power Agent Actions with Prompt Templates

Prompt templates in Agentforce help ensure that AI responses are grounded by providing a structured format that aligns with specific data and the context of your business needs. When you predefine the structure or format, it can guide the AI agent in generating responses or completing actions. Combined with LLMs to generate output, a prompt template-driven action helps agents to handle queries such as knowledge search, summarization, translation, classification, content creation, and more. To get started with prompt templates, check out the Custom Service Agents with Prompt Builder and Agentforce module.

Power Agent Actions with MuleSoft APIs

MuleSoft connects an AI agent to any third-party system through APIs and connectors. Similar to how Data Cloud connects with external data sources, MuleSoft APIs provide for individual-scale connections. In Agentforce, you can expose APIs as agent topics and actions, which include embedded instructions and metadata. This means you can ground an agent on data that’s outside a Salesforce org or other enterprise systems, such as Enterprise Resource Planning or SaaS applications.

Not sure which type of reference action to use when building your agent action? Check out the Agentforce: Agent Planning badge to learn more about how to design your agent.

Use Salesforce Data Model Resources

Make the most of your existing data within Salesforce to ground an agent with information from nearly any field you’re already using. Using your existing CRM data provides seamless integration and real-time accuracy.

Here are some of the available data types.

  • Standard objects: Your agent actions can access the structured data from standard Salesforce objects like accounts, contacts, cases, and opportunities.
  • Custom objects: If you have custom objects tailored to your business, your agent actions can also access data for those objects.
  • External objects: For real-time data integration, use Salesforce Connect to link individual external data sources directly to your Salesforce environment so your agent always has the most up-to-date information.
  • Data extraction: Employ Salesforce Data Export Service or Data Loader to extract the necessary data. This data can then be formatted for your LLM prompts.

However, grounding your agent with Salesforce data isn’t your only option. Many businesses use several software services, which means that data is likely to be stored in disparate sources and formats. With Data Cloud, unify that data to make it available for grounding in Agentforce. Read more about The Force Behind Agentforce: How Data Cloud Fuels Agent-First Enterprises in a blog post by Salesforce Vice President, Erika Ehrli. Then learn more at Connect Data Cloud to Agentforce on Trailhead.

Streamline Integration with Data Libraries

Agentforce Data Libraries (ADL) simplify grounding setup and maintenance, especially for unstructured datasets. When you create a data library, several configuration steps across Data Cloud and Prompt Builder are automated, like pushing data streams to Data Cloud, mapping data objects, and creating a search index and retriever. After these steps are completed, you can easily link agents to your data. Create and configure libraries from the ADL setup or through Agentforce Builder. See more in our What Are Data Libraries help topic.

Conclusion

Grounding your AI agents helps them provide precise and contextually relevant responses tailored to your business. We explored structured and unstructured data types, compared grounding with RAG, and summarized several different methods of grounding custom actions. Learn more about how AI agents can use your data, or try it out yourself.

Resources

Salesforce 도움말에서 Trailhead 피드백을 공유하세요.

Trailhead에 관한 여러분의 의견에 귀 기울이겠습니다. 이제 Salesforce 도움말 사이트에서 언제든지 새로운 피드백 양식을 작성할 수 있습니다.

자세히 알아보기 의견 공유하기