Security, Privacy, and Trust for Agents
Trust and security
The Einstein Trust Layer provides zero data retention with the LLM, dynamic grounding, data masking, toxicity detection, audit trails, and prompt-injection defenses. But it does not replace Salesforce permissions. Agents run as an agent user; object and field-level security, sharing rules, Apex class access, and permission sets determine what data and actions are reachable. Public channels use guest user profiles, which must be locked down. High-risk actions need confirmation or human approval.
Concepts to know
- Least privilege for the agent user and guest profile.
- Mask PII before it reaches the model where possible.
- Audit and monitor prompts, responses, and actions.
- Consent, data residency, and retention policies still apply.
Traps
Believing the Trust Layer alone secures data. Granting broad admin-like access to make actions work. Exposing sensitive Apex or objects to guest users. Forgetting that prompt injection can attempt to invoke actions. Logging sensitive data in custom debug logs.
Worked example
A public web agent checks order status. Use a guest profile with read-only access to a narrow Apex endpoint that returns masked status, no direct object access, and no refund action. Add a confirmation step for any account change. Rule of thumb: least privilege + Trust Layer + human approval for irreversible actions.