Enable and Use Pre-Prompt
This guide will help you enable the Pre-Prompt feature for your CustomGPT.ai agent, allowing your AI Agent to automatically trigger the first response as soon as the conversation is opened.
What It Does
The Pre-Prompt feature automatically sends the initial prompt as soon as the conversation is opened.
How to Enable Pre-Prompt
Step 1: Deploy Agent
a) Click the Deploy Agent icon.

b) Locate the "Make Public" button and click it.

Step 2: Go to Deployment Options
a) Navigate to any of the supported deployment options (Embed, Live Chat, Website Copilot, Instant Viewer). Due to it's nature, Pre-Prompt is not available for Search Generative Experience deployment option.

Step 3: Scroll to Expert Mode
a) Locate the "Setting" icon.

Step 4: Enable Pre-Prompt Integration
a) Turn on the Pre-Prompt Integration. This feature triggers the first message to the AI Agent as soon as the conversation is opened. For example, you could push form submissions as the initial message.

Important: This is not a welcome message. The AI Agent will start responding immediately upon page load and will consume 1 query credit. Additionally, the feature will not work without updating the code snippet on your website.
Step 5: Update the Code Snippet
Next you need to add this parameter to the code snippet:
prompt="value"
Value will be the message that will be sent as the initial prompt. It can contain any variable passed from your system.
Example usage:
<div id="customgpt_chat"></div>
<script src="https://cdn.customgpt.ai/js/embed.js"
defer
div_id="customgpt_chat"
p_id="123456"
p_key="abcdefgh"
prompt="Hello!"></script>
Note: Replace the values of p_id, p_key, and prompt with your specific Agent ID, key, and desired initial message. You will need to handle the variable assignments on your own..
How to Disable Pre-Prompt
To disable the Pre-Prompt feature, you can:
a) Turn the Toggle Off
- Disabling the toggle will stop the Pre-Prompt from triggering, even if
prompt=""
is still present in your code snippet.

b) Remove the Code Snippet
Remove the prompt=""
parameter from the code snippet deployed on your website.
Congratulations! You've successfully enabled the Pre-Prompt feature for your CustomGPT.ai agent. Your AI Agent is now set to automatically respond as soon as the conversation starts, providing an immediate and engaging user experience. โ
Updated 9 days ago