Add an AI Agent to Custom HTML
Add an AI agent to a custom-coded site by pasting one script before the closing body tag.
How to install Simple Agent on Custom HTML
You will paste a single <script> tag in your Custom HTML site's Shared layout/template before </body>. No plugin, no app installation. Custom HTML official docs on custom code →
- 1
Get your agent token
Log into Simple Agent → your agent → Widget tab → copy the token shown under 'Embed code'.
- 2
Find the shared template
Open the source file that renders every page: a layout, base template, footer include, or index.html for a single-page static site.
- 3
Back up the file
Duplicate the file or commit the current state before editing, especially when changing files directly on a host.
- 4
Paste before </body>
Paste the complete snippet immediately before the closing </body> tag: <script src="https://simple-agent.me/widget/loader.js" data-agent-token="YOUR_TOKEN_HERE" async ></script>
- 5
Publish the change
Save the file. If the site deploys from Git, commit and deploy. If you used SFTP or a host file manager, upload/save the edited template.
- 6
Test the live site
Open the public URL, hard-refresh, and send a test message. Check at least one secondary page and one mobile viewport.
Add Simple Agent to your Custom HTML site
Starter plan available. No per-message charges. Flat pricing.
Criar meu agenteMensagens ilimitadas · Preço fixo · Cancele quando quiser
Frequently asked questions
- Can I put the snippet in the head instead?
- The async loader can work from head, but before </body> is the safer default for chat widgets because it avoids delaying the main page render.
- What if my site uses a framework?
- Edit the framework's shared layout or document template in source control, then deploy. Do not edit generated HTML that the next deploy will replace.
- What if the script is blocked by CSP?
- Update the site's Content-Security-Policy to allow the Simple Agent loader and network endpoints, then retest in the browser Console.
Simple Agent on other platforms
Ative seu agente em 40 segundos
Mensagens ilimitadas. Preço fixo. Embed em qualquer site com uma linha.
Criar meu agenteMensagens ilimitadas · Preço fixo · Cancele quando quiser