Embed AI agent using iFrame

This guide shows you how to embed your CustomGPT AI agent into a website using an iframe.

Step 1: Open your website editor

Go to your website builder platform (e.g., WordPress, Webflow, Wix, or a custom-built site) and:

  1. Click Add Elements or the + button in your editor.
  1. Select Embed code from the available options.
  1. Click Embed HTML.

Step 2: Copy the iframe code snippet

Copy the following iframe snippet:

<iframe src="https://app.customgpt.ai/projects/YOUR_AGENT_ID/ask-me-anything?embed=1&shareable_slug=YOUR_AGENT_KEY" width="100%" height="100%">
</iframe>

Step 3: Add your agent’s information

Replace the following placeholders in the snippet:

  • YOUR_AGENT_ID — your agent ID
  • YOUR_AGENT_KEY — your agent’s shareable slug or access key

You can find both values in the Share & Embed section of your agent dashboard.

⚠️

Important:

If you use this deployment method, conversation history will not be preserved. If users refresh the page or navigate away and return later, their previous conversation will be lost.


Step 4: Paste the iframe code

Paste your personalized iframe snippet into the HTML/embed field..


Step 5: Save and publish your changes

Click Update and then Publish to apply the changes.