HTML, Photo, Vector and Design
Ask the agent to write and fix .html pages
In the HTML kit the agent rewrites the page source, runs the kit's check for missing files and script errors, and can click or advance the preview to test a page.
Updated
By Kition Docs
Verified against Kition Desktop 0.1.1 (0532c350) on 2026-12-02
How the agent edits a page
The agent in Kition Desktop edits an HTML page through the kit's own commands, the same ones the editor runs. The HTML kit has only five: file.setSource replaces the whole page (up to 8 MiB) as one undo step; preview.click clicks the preview at a point; preview.advance moves the page's clock forward; edit.undo and edit.redo take back or reapply the caller's own last change. The kit has no object model, so the agent does not edit single elements: it sends the full page each time and keeps the parts it did not change.
The kit's guide for agents (agent/guide.md) sets the order: inspect the page, send the new source, run the check, fix what it reports by its code, then look at the preview. It also warns that the kit loads no linked files, so the agent should write pictures in as data: addresses or inline SVG.
Example requests
| You ask | The agent runs |
|---|---|
| "Change the headline to Rye season is back" | `file.setSource` with the edited page |
| "Add a Tickets link under the date" | `file.setSource` |
| "Why is my logo missing?" | The check, which reports `html.resource-unavailable`; then `file.setSource` with the picture written into the page |
| "Fix the script error" | The check (`html.javascript-error`), then `file.setSource` |
| "Click the Yearly toggle and tell me what changes" | `preview.click` at the toggle, then a look at the preview |
| "Show the page after the animation ends" | `preview.advance` by the animation's length |
| "Undo your last change" | `edit.undo` for the agent's own steps |
| "Make a new landing page" | A new `.html` file, then `file.setSource` |
Live or Draft, and review
- Open the page and open **AI Chat**. Under **Kit edits** in the composer, choose **Live** (the default: "The agent edits open kit documents directly; you can undo its edits") or **Draft**.
- Describe the change and what must stay as it is, for example the wording of the footer.
- In Live mode, watch the source and preview change. In Draft mode, wait for "The agent's draft is ready for review" and choose **Review**, then **Merge** or **Discard**.
- Read the diagnostics strip after the agent finishes; it should say "No rendering diagnostics".
- To take a change back, ask the agent to undo it, or open **Version history** from the tab menu and restore the version before the edit.
Limits
A draft merges only if you did not edit the page while the agent worked on it; the HTML kit has no draft panel of its own, so Kition's draft banner is the place to review. Your Undo and the agent's are separate: Cmd/Ctrl+Z takes back your own last change, not the agent's. The agent cannot export the page to another format.
Version and sources
This guide describes Kition Desktop as of source 0532c350, checked on 2026-12-02. Connected actions also depend on the configured model provider or service. If your installed version is older, some controls may differ.
Related pages
Edit .html pages with a live preview in the HTML kit
The HTML kit (Preview) puts the source of an .html or .htm page beside a live preview drawn by its own engine, with a check for files that will not load and for script errors.
Save and share .html pages from the HTML kit
The HTML kit saves the page as .html and has no export formats yet; this page covers Save, Save As, sharing the file, and how to get a picture of the page.
Live edits and drafts
Choose whether the agent edits open kit documents live or in a draft, and review, merge or discard the draft it leaves for you.
Chat with the agent
Open AI Chat, start and find chats, point the agent at documents, folders and files, pick a model, and stop a run.