Live Demos
AI Demos: From Simple to Bleeding Edge
Three progressively ambitious demos showing what the WP AI Client makes possible. From simple CLI commands to a full AI Page Composer that generates complete pages in 30 seconds.
Demo 01 — Server-Side PHP
Structured JSON Output
The most underused feature of the WP AI Client is as_json_response(). Instead of hoping the AI returns parseable text, you define a JSON schema and the SDK enforces it. The response is guaranteed to match your structure — every time.
$ wp voyager ai-demo json --topic="dental practice in Austin"
Success: Page: Austin's Premier Dental Experience
Target Audience: Families and professionals in Austin, TX
Primary CTA: Book Your Free Consultation
| Type | Score | Headline |
| hero | 9/10 | Smiles That Change Lives |
| services | 9/10 | Complete Dental Care |
| testimonials | 8/10 | What Our Patients Say |
| stats | 7/10 | Numbers That Speak |
| cta | 9/10 | Your Smile Journey Starts Here |
The key insight: instead of parsing free text with regex, you get a predictable data structure that your code can consume directly. This is how production AI features should work.
Demo 02 — Server-Side PHP
Multi-Candidate A/B Variants
Why settle for one headline when you can generate three in a single API call? The generate_texts() method uses the AI’s multi-candidate feature to produce multiple alternatives simultaneously — perfect for A/B testing.
$ wp voyager ai-demo variants --topic="SEO audit services" --count=3
Success: Generated 3 variants:
Variant A: Your Rankings Deserve Better Than Guesswork
Variant B: Stop Bleeding Traffic. Start Dominating Search.
Variant C: The SEO Audit That Pays for Itself
Each variant comes from the same prompt but with high temperature, producing genuinely different creative angles. Use these for hero headlines, email subject lines, meta descriptions, or CTA buttons.
Demo 03 — Client-Side JavaScript
AI Content Transform (Block Editor)
This is where we cross into new territory. The AI Content Transform extension uses the client-side wp.aiClient JavaScript API — no custom REST endpoints, no server-side code. It adds a sparkle icon to the toolbar of any paragraph, heading, list, quote, or pullquote block.
Click the icon and choose from 7 AI-powered transforms:
- Rewrite — Change tone (professional, casual, witty, authoritative)
- Expand — Double the length with supporting details
- Summarize — Compress to 1-2 sentences
- Make Compelling — Add power words and urgency
- Fix Grammar — Correct errors without changing style
- Translate — 9 languages supported
- Custom Prompt — Your own instruction
Each transform shows a side-by-side comparison of original vs. transformed text. Apply it, regenerate, or cancel — all within the editor. This is the first client-side wp.aiClient usage in the entire Voyager ecosystem.
The Bleeding Edge
AI Page Composer
Describe the page you want. AI builds it from real Voyager patterns in 30 seconds.
How It Works
The AI Page Composer is a sidebar in the WordPress block editor. You provide a business name, industry, page type, and a description of what you want. Then AI does the rest — entirely client-side.
Step 1 — AI Plans the Layout
wp.aiClient generates a structured JSON page plan using asJsonResponse(). The AI picks from 40+ verified Voyager pattern slugs and writes custom content for each section.
Step 2 — Patterns Get Inserted
Each section maps to a real Voyager pattern from the 135-pattern library. Patterns are fetched from the WordPress data store, parsed with wp.blocks.parse(), and inserted into the editor.
Step 3 — Content Gets Personalized
The extension walks the inserted block tree, finds headings, paragraphs, and buttons, and replaces placeholder text with AI-generated content tailored to your business. Review, edit, publish.
What Makes This Bleeding Edge
This isn’t just “AI writes some text.” It’s a multi-step AI pipeline running entirely in the browser that orchestrates four WordPress 7.0 APIs simultaneously: wp.aiClient (structured JSON output), wp.blocks.parse() (live block objects from pattern markup), wp.data stores (pattern registry + block manipulation), and the 135 production-ready Voyager patterns. No custom REST endpoints. No server-side orchestration. No proprietary AI integration.