Skip to main content
Add a conversational AI avatar to your WordPress site using the Anam Widget and the WPCode plugin — no coding required.

Cookbook: Adding the Anam Widget to WordPress

Step-by-step guide for embedding the widget using WPCode

Quick Start

1

Create a persona in Anam Lab

Go to Anam Lab, create a persona, and configure its avatar, voice, and behavior. Navigate to the Widget tab to get your persona ID.
2

Allowlist your domain

In the Widget tab, add your WordPress domain to the Allowed domains list.
3

Install WPCode

In your WordPress admin, go to Plugins > Add New and search for WPCode. Install and activate it.
4

Add the widget code

Go to Code Snippets > Add Snippet and create a new HTML Snippet. Paste:
<anam-agent agent-id="your-persona-id"></anam-agent>
<script src="https://unpkg.com/@anam-ai/agent-widget" async></script>
Set the insertion method to Site Wide Header and activate the snippet.
5

Publish

Click Publish in Anam Lab to make the persona live.

Next Steps

Widget Configuration

Customize the widget’s appearance and behavior

Widget Events

Listen for widget events
Last modified on April 14, 2026