Docsity

Agentforce Testing Center: AI Agent Testing and Deployment Strategies, Appunti di Sistemi Informativi

Toggle sidebar
bg1
Development Lifecycle (20%)
This section of the exam tests these topics:
1. Given a scenario, test an agent using Agentforce Testing Center.
2. Identify the considerations for deploying an agent from sandbox to
production.
3. Explain the process for managing and monitoring agent adoption.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Anteprima parziale del testo

Scarica Agentforce Testing Center: AI Agent Testing and Deployment Strategies e più Appunti in PDF di Sistemi Informativi solo su Docsity!

Development Lifecycle (20%)

This section of the exam tests these topics:

  1. Given a scenario, test an agent using Agentforce Testing Center.
  2. Identify the considerations for deploying an agent from sandbox to production.
  3. Explain the process for managing and monitoring agent adoption.

Given a scenario, test an agent using Agentforce

Testing Center.

Trust Is Our Number One Value

At Salesforce, trust is deeply rooted in everything we do. That’s why we rely heavily on testing. Apex tests are automatically run with every new deployment. Unit tests make sure each unit works as expected. Flows are tested to verify that everything functions as expected. To put it simply, testing is one of the best ways to ensure trust in our products and processes.

As a Salesforce admin, testing should also be a cornerstone to make sure everything runs smoothly in your org. You can test new processes in a dedicated sandbox. You can perform user acceptance tests (UAT) with large groups of users. And once you’ve verified everything through tests, you can deploy the new process to a production environment and monitor it to make sure everything is running smoothly.

Test Agents for Trust But what about the agents you’re creating with Agentforce? How do you make sure they’re as trustworthy and reliable as the rest of your Salesforce org? The answer, again, is testing.

The Agentforce Testing Center is designed to help overcome the challenges you might encounter when building out your Agentforce and helps you roll out trusted AI agents in a secure, repeatable way. Testing your agents in the Agentforce Testing Center is a critical step in creating trust in your AI agents. The Agentforce Testing Center is designed with no-code testing tools to help you easily deploy trusted agents. The testing takes place in properly configured sandboxes to isolate testing from the production environment. You can also add more tests over time as your agents get updated or are given more actions. This means your agents continue to work as your business changes and grows. Runs do not modify CRM data and do not consume Einstein Requests, but they do generate logs for analysis.

Deploy with Confidence Once testing is done, you can confidently deploy the agent to production without concerns of disrupting your business or corrupting your customers’ data. And you can deploy the changes by migrating them to your production environment with whatever tool you’re currently using, such as Change Sets, DevOps Center, and the Salesforce CLI that now supports Data Cloud and Agentforce.

Concerns and Limits There are a few things to keep in mind when building and testing agents.  Cost Running tests, manually or automatically, consumes requests and credits the same as your customers using the agent. This is true even when done in a sandbox environment. Although testing itself has a cost, the cost of not testing can be much higher. Testing consumes Einstein Requests and possibly Data Cloud credits. To learn more, see Einstein Usage and Rate Limits.  Security Testing agents can modify CRM data. To avoid modifying data unnecessarily, be sure to use the Agentforce Testing Center and Agentforce Builder tests only in your sandbox environment.  Limits Currently you can run up to 10 test jobs at once in a 10-hour time frame and have up to 1000 test cases per test. Even though the Testing Center does not modify CRM data, testing consumes Einstein Requests and Data Cloud credits (evaluate the impact on billing).

What to Test

Testing is all about making sure you achieve an acceptable level of risk for your agent. After testing and troubleshooting your agent manually in Agentforce Builder, you’ve updated the instructions, topics, actions, filters, and guardrails based on those test results. Now, you can use the Agentforce Testing Center to store those tests and run them over and over again. Your customers put your agents to the test because they want answers to their every question. Hackers, and sometimes even employees, might try to get around restrictions and attempt to perform tasks or manipulate the model’s

output in ways that the model wasn’t designed for. These scenarios get added to the tests in the Agentforce Testing Center.

The trick is to try and predict the types of questions they’re going to ask. You should try to cover every angle, every possibility. That’s what you’re designing your tests to cover. You can expect to find errors or at least issues as you start testing. Test for positive, expected results. Then test for negative, unexpected, or even invalid results. You want to be sure the agent responds correctly to even the most wrong requests. This is called positive and negative testing. It makes for a more robust test suite. Here's an example: While testing an agent email input, test for the correct email response. This is testing the positive, valid, and expected behavior. But don’t stop there. Test for an incorrect email input to the agent and be sure the correct response for that scenario is returned. This is testing the negative, invalid, and unexpected behavior.

Let AI Generate Your Tests Manually creating a diverse and scalable set of test scenarios is time- consuming and complex. The Agentforce Testing Center has the solution. You can now use AI to effortlessly generate hundreds of synthetic interactions based on the agent’s topics and actions to be used as test cases. This helps ensure that your agents handle various customer interactions accurately. Then you run those tests automatically in parallel to see what topics and actions the agent chooses. From there, you can iterate by adjusting agent instructions and guardrails as needed—saving time that would have been lost on manually testing many different variations of a conversation. The result is a faster time to testing and a faster time to a more trusted agent that you feel confident deploying. A good-quality test case dataset has three quality attributes.  Volume: A sufficient number of test cases to ensure comprehensive coverage of different scenarios and edge cases.  Diversity: A wide range of inputs, contexts, and variations to test the AI agent’s adaptability across real-world use cases.  Quality: Well-defined, accurate, and relevant test cases aligned with the AI agent’s objectives.

Working with Test Results

Identify the considerations for deploying an agent

from sandbox to production.

The Deployment Stage Agentforce makes it easy to build, test, and quickly iterate on AI agents in Salesforce. After you verify that your new agent is accurate, safe, and reliable, it's time to get the agent into the hands of your employees and customers. If we consider the agent development lifecycle, that means it’s time to start the deployment stage of the process.

The Deployment Process

In the deployment stage, you prepare to impress your customers and employees with a helpful new AI agent. Here’s the process in a nutshell.  Launch your deployment strategy.  Configure the agent’s connections in your sandbox environment.  Complete end-to-end testing.  Deploy to your staging or production environment.

Launch Your Deployment Strategy A deployment strategy is your roadmap for maximizing the chances of your AI agent’s success and minimizing disruption. It helps you anticipate challenges, manage stakeholder expectations, and gather critical feedback for continuous improvement. It’s a good idea to create your deployment strategy as you’re planning and prototyping your agent. Proper planning helps ensure that your AI agent rollout is a seamless and successful effort that delivers real value to your organization. Let’s go over the components of an effective deployment strategy.

Rollout Plan The first step in your rollout plan is to think about the logistics of the deployment. What’s your rollout plan for the AI agent? With an AI project, it’s always wise to start with a pilot program, which is a small, controlled group of users. The group might be a specific team or department in your organization. This allows you to test the agent in a real-world scenario without risking a companywide disruption. After refining the agent’s performance, you can gradually roll it out to other users.

Change Management and Governance AI projects require robust change management strategies to reduce risk and ensure successful adoption. Here are a few things that can affect how quickly and successfully your organization and customers adapt to the new AI agent.  AI maturity and organizational readiness  Process redesign and workflow integration for AI tools  Ethical AI governance  Comprehensive training plan, resources, and documentation  Effective communication strategy  Executive sponsorship and user evangelism  Culture of AI experimentation, continuous learning, and transparency  Feedback and collaboration channels  Incentive and recognition programs for AI adoption

Validate Your Agent When you finish configuring your deployment in your sandbox environment, test to make sure that the agent performs as expected in each channel. If you’re using adaptive response formats, validate how they look in a test messaging channel. Check out Agentforce Testing Tools and Strategies for an overview of the testing process. And see the Resources section for even more information about testing.

Deploy to Staging or Production When you’re sure that your AI agent is ready for prime time, you can package the agent and deploy it to your target org, whether that’s a staging or production environment. Here are the basic steps.

  1. Review the metadata components for Agentforce.
  2. Retrieve the latest metadata from your sandbox org using Salesforce CLI and generate a package file for your agent. Include any custom Apex, flows, and prompt templates for your agent actions. Also include any permission sets assigned to the agent user.
  1. In your target org, verify you have the necessary licenses for your agent.
  2. Verify that Einstein, Agentforce, and Data Cloud are enabled in the target org.
  3. Create the agent user in the target org.
  4. If you’re using Messaging for In-App and Web, Embedded Service Deployments, or Omni-Channel Flows, deploy that functionality to the target org.
  5. Deploy the Agentforce metadata to the target org using Salesforce CLI.
  6. Verify that the agent is active.
  7. Add the deployed permission sets to the agent user.
  8. Make sure all deployed flows have the correct version active.
  9. If your agent uses Embedded Service Deployments, publish the web deployment in the target org.

After deploying to your target org, check that all your topics, instructions, variables, and filters look right. Verify that all permissions have been deployed or updated appropriately, and that the agent is responding to user requests.

AgentForce Deployment Process Best Practices

Pre-Deployment Manual Steps  Verify that the Target Org has valid licenses for Agentforce. If needed, you can match licenses to production.  Verify that the Target org has Einstein enabled  Setup → Einstein Setup  Click the Turn on Einstein toggle, and make sure Einstein is On  Verify that the Target Org has Bots enabled  Setup → Einstein Bots  Click the Einstein Bots toggle, and make sure Einstein Bots is On.  Verify that the Target Org has Agents enabled  Setup → Agents  Click the Einstein Copilot for Salesforce toggle, and make sure it is set to On.

  • Note: If you do not see the “Agents” option, refresh Setup. If you still

 Check the "v1.botVersion-meta.xml" file to identify the required "genAiPlanner" and ensure it is deployed first.  Using the Salesforce CLI, deploy your metadata.

Post-Deployment Manual Steps  Ensure that the agent is activated.  Navigate to Embedded Service Deployments in setup and publish your ESA Web Deployment.  Ensure all deployed flows have the correct version active.  Add the deployed Permission sets from the Source org to the Agent user in the Target org (either manually or scripted).  Update other permissions as needed.  Common misses - give access to new Apex, Objects, Fields

Explain the process for managing and monitoring

agent adoption.

Agentforce Session Tracing Agentforce session tracing captures detailed agent interaction data in a unified data model on Data Cloud (Data Cloud consumes credits for ingestion, storage, and processing). Build dashboards, reports, and queries on this data to derive insights into agent behavior and trends. Take data-driven action while testing, debugging, and monitoring agents in sandbox or production environments. Agentforce session tracing ingests data from different sources (starting with reasoning engine logs) and combines everything under a session ID. The log

provides detailed information into what happened during agent sessions: turn- by-turn interactions, reasoning engine executions, actions, prompt and gateway inputs/outputs, error messages, and final responses. For example, you can:

 Debug agent setup and configuration issue during build time.  Learn why certain test cases failed during batch test  Address why an agent isn’t able to handle a set of user questions and is going off topic.

Agentforce session tracing supports all types of agents. Use session trace data to observe, monitor, investigate, and troubleshoot agent events, incidents, and behavior patterns. Get insights by running queries and reports on the data captured in the session trace data model. Data is accessible via Data Model Objects (DMOs).

Correct. Verifying that the Target Org has valid licenses for Agentforce and ensuring that Einstein and Bots are enabled are critical pre-deployment steps to ensure the agent functions correctly in the production environment.

Universal Containers has recently deployed an Agentforce agent and wants to manage and monitor its adoption effectively. They plan to use Agentforce session tracing to capture detailed interaction data and derive insights. Which step is essential for managing and monitoring Agentforce agent adoption using session tracing? a) Enable session tracing and review interaction logs directly in the console to monitor agent usage. b) Enable session tracing and use Data Cloud to build reports and dashboards. Correct. Enabling session tracing and using Data Cloud to build reports and dashboards allows for detailed monitoring and analysis of agent interactions, providing insights into agent behavior and trends. c) Enable session tracing and use built-in real-time metrics to monitor agent performance.