Agentforce allows organizations to build and manage autonomous agents for tasks across various business departments – in fact, there’s an “Agentforce in every app”. There’s the potential to build Sales Agents, Service Agents, Marketing Agents, Commerce Agents, and Platform Agents.
But, how does this all work? What are the building blocks that we will use to configure our agents? Salesforce advocated that agents can be built easily with clicks not code. This was backed up by many attendees that visited the ‘Agentforce Launchpad’ section of Dreamforce, who said that Agentforce really “does work”, and it is as declarative as Salesforce says.
“We do think that humans and agents working together is the future. It’s hard to believe, but we brought 5,200 customers live on Agentforce in their sandboxes in the first two days of Dreamforce.” – David Schmaier (President & Chief Product Officer, Salesforce)
So, how does the process of building an agent actually work? We’ll be walking through the main components of what makes an agent function, taking insights from the Dreamforce ‘24 keynote demo, where Sophie, Saks’ service agent, was put to the test.
Agent Description
Build your agent within Agent Builder (part of Agentforce Studio). The configuration for the agent is the key starting point. This is done in natural language (i.e. the way you would have a conversation with another human) – and, as Salesforce says “If you can describe (dream) it, Agentforce can do it”. Below shows the interface, where the avatar, agent name, and description is set.
Channels are the ways that humans and agents communicate with each other, for example, email, voice, WhatsApp, etc.
Notice that there are four sections to the Agent Builder interface:
- The left-hand sidebar to navigate between agent settings (which we will walk-through in this guide).
- The left panel, showing the setting page you’re currently on.
- The right-hand panel, enabling you to start a conversation to test-drive your agent.
- The middle panel, where the test-drive output will be displayed.
Note: There are some out-of-the-box agents that can be enabled in a guided setup, such as Sales Agents.
Agent Topics
Topics are the foundational building blocks for agents, determining the scope of what they can do. Another way to think about topics is categories of information, for example, an order management topic that could enable the agent to have access to order history data and change the product specs. See the “this agent’s topics” in the image below.
In the Dreamforce ‘24 keynote demo, the agent was able to produce answers/outcomes for some of the customer’s queries; however, some were not able to be resolved because the agent didn’t have those topics assigned. This is part of the concept of guardrails (what the agent can’t do).
Inspecting a topic’s configuration, see the description and scope of the topic.
Topic Actions
Alongside topics, actions are another building block of agents. Actions are tied to topics. Below, see some of the actions that the agent already has assigned (i.e. what they can do). These are actually flows.
View Agentforce Actions from Salesforce setup, and from the topic see the assigned actions from the sub-tab:
Assign Topic Actions
Assigning additional actions that are available in your org is as simple as ticking actions from the list that appears in the pop-up window.
Creating a New Topic Action
The pop-up screen requests you to add a reference action type (Apex, Flow, a prompt, or Mulesoft API). Then, reference the library of processes/APIs that have already been created.
In this example, the new Agentforce action will need to be called out via MuleSoft (as this source of data is not integrated directly). Choose MuleSoft API, and the data source API. What’s notable is that now this agent query can talk to these APIs just like human users are able to.
Upon adding the API, there’s the chance to edit the inputs and outputs.
Atlas Reasoning Engine (Testing Your Agent)
Back in the Agentforce Builder, you can utilize the center and right-hand panel to test-drive your agent. This takes the Atlas Reasoning Engine out of the shadows, and into the user interface.
Upon giving a prompt, follow along the agent’s reasoning, step-by-step:
- Identifies the relevant topic.
- See the actions taking place (querying the CRM database via flow).
- Returns the correct records.
- Reasons (i.e. confirms that the response is accurate, in other words ‘grounded’).
Upon deploying this agent, it will be able to function using the channels listed in the agent’s description – you don’t need to repeat this process for each channel.
Omni Supervisor
You may already be familiar with Omni Supervisor, originally a feature tied to Service Cloud for managers to oversee teams of customer service agents. Now, Omni Supervisor is being repurposed for agents.
See overall trends and agents working in real-time (the previous few interactions are shown in the image below). You can even listen in on ongoing or recently closed conversations, labelled with a summary column in the table.
How Agentforce and Data Cloud Work Together
Now we get into the true ‘nuts and bolts’ that power Agentforce: data. Data that can be used to train agents could be either structured (e.g. a Salesforce record) or unstructured (e.g. emails, voice memos). The Vector Database in Data Cloud makes processing unstructured data possible.
Data Cloud has become the underpinning for the Salesforce platform – in simple terms, it gets the data flowing between the various Salesforce apps (‘Cloud’ products). Agentforce is a layer on top of these apps, catering to the use cases that these apps champion.
So, how does Data Cloud really have an impact when it comes to Agentforce? See the customer perspective below. The agent can’t answer the customer’s query (“sorry, I had trouble coming up with a response…”), which behind the scenes, is due to a lack of data to reference that’s relevant to the query.
Retrieval Augmented Generation (RAG)
A large language model (LLM) can learn about your organization through prompts, which is a set of instructions sent to an LLM to teach it.
Salesforce uses a technique called retrieval augmented generation (RAG) that lives inside the Atlas Reasoning Engine, and produces a feedback loop with Data Cloud. A request made by a user or agent (a prompt) becomes an “augmented prompt” (i.e. more contextual, more relevant) once Data Cloud and RAG work together.
By searching through all of the data that’s been sorted by Data Cloud, the output from the prompt improves, and in turn, the AI (LLM) learns more about your business.
New Data Stream
As we saw with the Agentforce demos, the data that’s required for highly contextual responses may not reside (be stored) directly in Salesforce. There are a few options on how to bring this data into Agentforce to make it usable:
- Data Cloud ingestion: Set up a new data source to bring data into Data Cloud on a scheduled basis.
- Zero-copy: Set up a new data source to ‘virtualize’ record data (i.e. you’re not physically moving and storing the data from the source system onto the Salesforce platform).
- MuleSoft APIs (as shown previously in this guide).
Example: You would like to connect your order management system data that resides inside of Snowflake, which happens to be an out-of-the-box connector offered by Salesforce.
Data Graphs
Data Graphs enable you to visualize the relationships between data model objects (DMOs), even going several layers deep. This helps you to investigate whether the correct data is available at the time of writing a prompt/instructing an Agentforce agent, which will be required to generate an optimal and accurate output.
Real-time Data Graphs perform faster identity resolution, segmentation, and actions based on ingested data to ensure data is ready for Agentforce to work with.
The data graph shows how every touch point data is connected.
Inside Prompt Builder
Under the hood, an action (as we saw earlier) is sourced from a prompt. You can create a new, or edit an existing, prompt to make it more ‘intelligent’. Pick your model (LLM) of choice that will operate under the hood of prompts (see this in the right-hand panel). Prompt engineering in Salesforce is low-code thanks to the clean user interface that guides you through a preview and feedback toxicity ratings.
Search Index
Retrieval augmented generation (RAG) is the ‘reasoning’ part of the Altas Reasoning Engine – in other words, the ‘brain’ behind Agentforce.
To improve the results retrieved from the wealth of data in Data Cloud, you can set up a search retriever. This retrieves the correct data from your connected data streams and then grounds your prompt with this wealth of data. Assign search parameters within the prompt. There are three types of setup you can choose from: ‘Easy Setup’, ‘Advanced Setup’, or ‘From a Data Kit’ (a package of metadata and data relationships that can be installed into Data Cloud).
Summary
In short – Data Cloud makes every agent better.
Take a look at the handy diagram that was featured in the Sales Agents session. This is another visualization of how these components (some familiar, some unfamiliar) all stack together. While Salesforce are doing what they can to hype Agentforce up, there’s no question that the stats spell promise for Agentforce going forward.
Comments: