A prompt is a structured set of instructions provided to an agent to guide its behavior. All Agentforce solutions listed on AgentExchange that includes prompts must adhere to these requirements.
Sensitive and Secret Data
Make sure the prompts in your managed package don’t include sensitive or secret data. You can use merge fields to add user input or Salesforce org data to a prompt before it’s sent to the large language model (LLM), but don’t hard code this data.
Authentication Tokens
Prompts in your managed package must not ask users for authentication tokens. Authentication tokens include API keys, passwords, and so on. Requesting one-time passwords for user-verification purposes is permitted.
Prompt Storage
Securely store prompts within your managed package. Use one of these approved methods.
A prompt template that your managed package installs is visible and can be cloned, but it can’t be modified by the Salesforce org it’s installed in. See Considerations for Packaging Prompt Templates.
We recommend using these mechanisms wherever possible. However, if they aren’t sufficient for your use case, you can hard-code prompts directly in your Apex code.
Prompt Injection Mitigation
Prompt injection is a vulnerability where attacker-controlled input in a prompt causes unexpected behavior or LLM outputs. It can cause unintended data generation, data leaks, harmful content generation, and other adverse effects. Make sure prompts in your managed package guard against prompt-injection attacks. When constructing a prompt that contains user-controlled or untrusted input, employ a prompt-injection mitigation strategy. You may need to use a combination of mitigation techniques.
Prompt injection mitigation is an evolving area of security guidance. Monitor the area for new strategies that can help your company mitigate prompt injection risk.