Embed reference

Production script URL and attributes for the hosted Agentoll embed.

Script tag attributes

AttributeRequiredDescription
src Yes https://agentoll-middleware-p5aon.ondigitalocean.app/v1/agent-toll.js
data-publisher-id Yes pub_... from registration
data-api-base No API origin (default: script URL origin). Use for local dev: http://localhost:8787
async Recommended Non-blocking load

Production snippet

<script
  src="https://agentoll-middleware-p5aon.ondigitalocean.app/v1/agent-toll.js"
  data-publisher-id="pub_xxxxxxxx"
  async
></script>

Plain HTML

Paste the snippet inside <head> on every page you want protected (or in a shared layout template).

Next.js (App Router)

In app/layout.tsx:

import Script from 'next/script';

export default function RootLayout({ children }) {
  return (
    <html lang="en">
      <head>
        <Script
          src="https://agentoll-middleware-p5aon.ondigitalocean.app/v1/agent-toll.js"
          data-publisher-id="pub_xxxxxxxx"
          strategy="afterInteractive"
        />
      </head>
      <body>{children}</body>
    </html>
  );
}

Next.js (Pages Router)

In pages/_document.tsx, add the script inside <Head> with async.

WordPress / Webflow / Squarespace

Each platform’s docs call this “custom code”, “header injection”, or “site-wide header” — paste the same snippet there.

Get your publisher ID

Register to receive your personalized embed snippet.

Join waitlist