Incorrect Agentforce settings
Why is this an issue?
Incorrect or lax Agentforce settings can weaken guardrails and introduce security risks. Agents may share sensitive information inappropriately, miss toxic input, or fail to detect prompt injection attacks.
They can also reduce auditability and obscure model behavior. Without health monitoring, prompt performance metrics, and feedback collection enabled, issues are harder to detect and the agent's responses cannot be measured or improved over time.
Examples
Example of incorrect settings:
<EinsteinAISettings xmlns="http://soap.sforce.com/2006/04/metadata">
<enableAIFeedbackWithDC>false</enableAIFeedbackWithDC>
<enableAITrustInputToxicityDetection>false</enableAITrustInputToxicityDetection>
<enableAITrustPromptInjectionDetection>false</enableAITrustPromptInjectionDetection>
<enableAgentHealthMonitoringGA>false</enableAgentHealthMonitoringGA>
<enablePBPromptPerformanceMetrics>false</enablePBPromptPerformanceMetrics>
<enableTrustPIIMasking>false</enableTrustPIIMasking>
</EinsteinAISettings>
Example of correct settings:
<EinsteinAISettings xmlns="http://soap.sforce.com/2006/04/metadata">
<enableAIFeedbackWithDC>true</enableAIFeedbackWithDC>
<enableAITrustInputToxicityDetection>true</enableAITrustInputToxicityDetection>
<enableAITrustPromptInjectionDetection>true</enableAITrustPromptInjectionDetection>
<enableAgentHealthMonitoringGA>true</enableAgentHealthMonitoringGA>
<enablePBPromptPerformanceMetrics>true</enablePBPromptPerformanceMetrics>
<enableTrustPIIMasking>true</enableTrustPIIMasking>
</EinsteinAISettings>
How can I fix violations?
This rule supports autofix. Each violation is replaced with the recommended value, with a comment explaining why. You can also fix violations manually by comparing your configuration against the Salesforce recommendations and updating each setting to its recommended value.
When should I disable this rule?
Disable this rule, or dismiss specific findings, if your org has a deliberate reason to deviate from Salesforce's recommended Agentforce configuration. For example:
Data residency or compliance constraints:
enableAIFeedbackWithDCsends interaction data to Salesforce's Data Cloud, which may not be permitted under your data-handling policy.External monitoring tooling: if
enableAgentHealthMonitoringGAorenablePBPromptPerformanceMetricsduplicate metrics already collected by another observability platform, you may prefer to keep them disabled to reduce noise.Non-production or sandbox orgs: feedback collection and PII masking are often unnecessary in scratch orgs or developer sandboxes that do not handle real customer data.
In all other cases, keep this rule enabled — the recommended values protect against data exposure, prompt injection, and toxic input, and they ensure agent behavior remains observable and improvable over time.
Resources
