How Does Agentforce Work? AI Service Agent Demo | Dreamforce 2024

Salesforce's AgentForce uses natural-language topics and attachable actions to handle customer support without dialogue trees. The demo shows an agent scheduling installations: it classifies requests, converts "that Friday" into proper dates, filters times by preference, and runs the right flow automatically. Built-in guardrails block off-topic questions and prompt injection.
Chapters
Foreign. I'm going to show you how AgentForce works by building an AI service agent to deflect incoming support cases by answering customer questions like this. But to see how this works, let's expand this agent's capabilities by also enabling it to help with the installation scheduling of these products. And I'll do that by adding a new topic. Topics are how you'll define the jobs your AI agents will and won't do, and it's how you'll establish guardrails for your AI agents. But I want to expand my agent's guardrails by creating a new topic. Now, if you've ever built an old style chatbot, this is going to look very different. There are no dialogue trees, just natural language descriptions that help the agent understand the job to be done, which in this case is appointment management, followed by a description that helps this AI agent understand when it should use this topic. Then a description of the scope of this job and the instructions the agent should use when doing this work. Like getting the customer's email address before scheduling an appointment, and getting the customer's installation date preference, and converting all dates into a specific format and ensuring the installation date isn't before the delivery date, and finally confirming the customer's appointment once it's been booked. These are the types of instructions that would involve lots of complicated if then else logic with a traditional chatbot. But with AgentForce, it's just natural language descriptions that help the AI agent understand the job to be done. But the next step is actions which enable the agent to actually do these jobs. Now, actions can be based on flows, Apex classes or prompts. But for now I'm going to keep this pretty simple. This is a flow I created for retrieving available installation times, and it will equip the AI agent with the knowledge it needs to do this work. And this flow actually books the installation appointment. It has a bit more logic because I want to establish a few extra guardrails and be ultra prescriptive about how this work gets done. And with these two flows created, I'm now going to add them as actions to my AI agent. And believe it or not, this AI agent can now schedule installation appointments. But let's try it. I'll start by asking it to get the status of an order again. And once again I get an answer. And I can see the topic was classified as order management. But now I'm going to ask this agent to schedule the installation of this order. And as you can see, the agent pivots and reclassifies the topic and because I gave it an instruction, it's asking me what my installation date preference is. Now going to throw it a curve ball and reply with tomorrow, which is actually before the delivery date. But this was another instruction I gave the agent and it prevents this from happening and politely asked me to pick a date after the delivery date. But now I'm going to be really difficult and say what about that Friday but not morning? And let's just pause to consider the context required to understand a statement like this. But not only was I understood, but I got an appropriate response. But let's double click into what just happened here. Beyond topic classification. AgentForce used the context of this entire conversation to make a dynamic plan. A plan that involved executing that appointment retrieval flow I added as an action. But look closer. That Friday was converted to the right date using the format required by the flow. And look at the output of that flow which included an AM appointment time, but because I said not morning, it was automatically filtered from the generated response. And this is happening because Agent Force is giving AI Agency to reason within the guardrails, which makes these AI agents much more flexible and capable of doing their assigned jobs. So now you've seen what Agent Force can do within the guardrails, but what happens when I go outside the guardrails by asking it to do something it wasn't designed to do? And as you can see, Agent Force classified this is off topic and redirects me back to the approved topics. And Agent Force also has built in harm and toxicity detection, which means if I ask this AI agent something inappropriate, it'll be detected classified as inappropriate and the agent will refuse to engage. And if I go even further and attempt something malicious like a prompt injection attack, the you'll see AgentForce automatically detects and rejects this reverse engineering attempt. And that is how AgentForce works by helping you create AI agents and deploy those agents across multiple channels to answer questions, take action, and drive customer success by reliably doing the jobs they're assigned. Thanks for watching.










