Add an AI agent to WordPress

Updated November 1, 2026

Install the free WPCode plugin, paste your AgentGuide script into Header & Footer → Header, and save. No theme editing needed.

The simplest way to add AgentGuide to WordPress is the free WPCode plugin, so you don't edit theme files and the code survives theme updates.

WPCode Header and Footer screen with the AgentGuide script in the Header box
WPCode → Code Snippets → Header & Footer → Header.

Steps

  1. In AgentGuide, open your agent → Install agent, pick WordPress and click Copy code.
The install window with WordPress selected and the Copy code button
In Install agent: 1 pick WordPress · 2 Copy code.
  1. In WordPress, go to Plugins → Add New, search for WPCode and install and activate it.
  2. Open Code Snippets → Header & Footer.
  3. Paste the code into the Header box and click Save Changes.
  4. Open any page of your site. The install window in AgentGuide changes to Running on your address.

The code looks like this (yours has your own embed ID):

<script src="https://agentguide.site/api/embed/script.js?embedId=YOUR_EMBED_ID" async></script>

If you use a caching plugin

Plugins like WP Rocket, LiteSpeed Cache or W3 Total Cache may serve old pages. Clear the cache after saving, then reload your site.

If a plugin combines or delays JavaScript, exclude agentguide.site from those options so the agent loads normally.

WooCommerce stores

The same Header snippet covers every page, including product, cart and checkout pages. To let a Sales agent recommend your products, import them in Knowledge → Add knowledge → Import from website → Products, or upload a CSV or JSON product list.

Get started

Put your first agent on your website today.

Start free. Add your website or documents, pick Sales or Support, and watch it answer your customers.

  • Free plan, no credit card
  • Answers from your own content
  • Sales, Support, or both