Skip to content

Building pages with AI

You talk to your assistant as usual; it decides which tools to use. A typical request:

Create a landing page for our spring sale, with a hero, three feature columns and a call to action. Use the theme’s colors.

  1. It reads the site context. site-context returns the theme, page templates and design presets: colors, font sizes, font families, spacing and layout widths. The AI uses those presets instead of inventing values.
  2. It looks at what exists. list-pages and get-page show the pages and their content; list-blocks and list-patterns show which blocks and ready-made patterns it can use; list-media finds images in your library.
  3. It saves the page. save-page creates a new page or updates an existing one.
  4. You review it. The result includes an edit_url: open it to check the page in the editor before publishing.

New pages are saved as drafts unless the AI sets another status. It can publish only if the connected user is allowed to, and it’s told to publish only when you ask.

To update a page, the AI must send the content_hash it got from get-page (or from its previous save-page). The hash changes whenever the page is saved, so if someone edited the page in the meantime, the update is rejected with content_conflict and the AI reads the page again before retrying.

Content must be serialized Gutenberg blocks using blocks registered on your site. Loose HTML and unknown blocks are rejected. The plugin can’t run the editor’s own validation, so open the page in the editor to confirm every block looks right.

  • Ask for changes to one section at a time on long pages: save-page replaces the whole page body.
  • Mention a pattern by name if you want the AI to start from it.
  • If the AI shouldn’t change anything, turn off save-page in Managing tools.