Anakin Insights

How do I lock which sites can drive my embedded agent?

Open Share → Embed on your agent. With no domains listed, embeds keep working as before. Add https://yoursite.com or https://*.yoursite.com to restrict who can drive the chat via postMessage. Same-origin and tryanakin.app always work. Unlisted parents are ignored with a console warning — visitors can still chat; only framing commands are blocked.

Why does an allowlist matter for embeds?

An embedded agent sits inside another site's iframe and listens for postMessage commands from the parent. Shape validation already rejects malformed payloads, but without an origin check any framing site can drive context and reset inside a visitor's session. The allowlist closes that gap without breaking existing embeds.

What changed on 2026-09-20?

Owners can list allowed domains on the agent Share → Website tab. The public agent loads that list in embed mode and ignores commands from unlisted origins (console warn). Same-origin and tryanakin.app remain trusted. Empty list = legacy: no behavior change for sites that already embed.

How do I lock my agent down?

  1. Open the agent → Share → Website.
  2. Copy the iframe or floating snippet if you need it.
  3. Under Allowed domains, add each parent origin (https://acme.com or https://*.acme.com).
  4. Reload the parent page once. Unlisted parents can still show the chat; they can no longer drive it via postMessage.

What stays the same?

Visitor chat, Pages, receipts, and channel bots are unchanged. The anakin:ready handshake still uses a public broadcast (identifiers only). Server write paths remain server-validated.

Method and limits

Shipped with migration 0149_embed_origins and public GET /api/v2/public/agents/:id/embed-origins. Wildcard matching is https-only (localhost allowed in development). Per-page or signed embed tokens are out of scope for this release.

Will my existing embeds break today?

No. An empty allowlist is legacy mode: any site may still embed and drive the chat (shape validation still applies). Behavior only tightens after you add at least one domain.

What formats are accepted?

Exact origins like https://acme.com, or a single subdomain wildcard like https://*.acme.com. Paths, query strings, and http (except localhost in development) are rejected.

Does this block visitors from chatting?

No. Visitors can still open the agent and chat. The allowlist only gates parent-page postMessage commands (context, reset, prefill) from origins you did not list.

Where do I manage the list?

Agent Share modal → Website tab → Allowed domains. Add and remove entries there; changes apply on the next embed page load.