WP Manifestindependent plugin directory
manifest / ai / agent-served-site

Agent-Served Site

A WordPress plugin that serves an entire website generated on the fly by an AI agent — example consumer of Automattic/agents-api + wp-ai-client (WP 7.0 core).

★ 1stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/lezama/agent-served-site/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

A WordPress plugin where the website has no templates. A short markdown spec (a bundled preset in presets/, or a custom one) is the entire source of truth. Every page is generated on the fly by an AI agent that reacts to what the visitor does — page load, clicks, form submits, typing — and renders the HTML for the next page state. Navigation, a menu, a cart, a checkout form: all invented per-request by the model, with continuity carried across the session.

It's a proof-of-concept of a "generative UI" / LLM-served site, built as a consumer of Automattic/agents-api — a worked example of how to plug a product onto that substrate.

⚠️ Proof of concept. The agent's HTML+JS output is injected into the page by design (this is the whole point), so it is XSS-by-construction. Don't run this on a production site without an output policy. See Security.

How it works

Browser shell (iframe)                     WordPress
─────────────────────                      ─────────
load / click / submit  ──POST /chat──▶  agents-api  ──▶  agent-served-site handler
                                        agents/chat        │  site spec  +  session history  +  event
                                        (canonical)        │            │
                                                           │            ▼
        rendered HTML  ◀──── reply ─────────┘     wp-ai-client → AI provider (Claude, …)
        (swapped into the iframe)
  1. The shell (/?served=1) is a tiny HTML document hosting a sandboxed `