# Publishing

Two preview tiers and one publish action — work your way up.

## Test slide

The fastest feedback loop. With any slide active, click **Test slide** in the top toolbar.

The editor opens a popup that:

- Renders the slide exactly as it will appear in the published view
- Connects to a live agent session with the deck-wide voice
- Plays the slide's [script](/docs/build/slides/script-and-instructions) through the agent
- Records the visitor's responses (your voice) so you can iterate on the script

Test slide is **per-slide** — it doesn't navigate forward or back. Use it to nail the agent's delivery on a single slide before moving on.

Behind the scenes: `POST /api/slide-docs/[slideDocId]/test-slide` spins up a short-lived LiveKit session scoped to that one slide.

## Preview deck

The full experience, but for you only. Top toolbar → **Preview deck**.

This opens `/a/<your-agent-slug>` in a new tab — the same URL visitors will use after publish, but with your draft SlideDoc instead of the published version.

The agent runs end-to-end:

- Connects to your deck-wide voice and avatar
- Plays each slide's script
- Responds to quizzes, button presses, and visitor speech
- Honors the per-slide script + AI instructions

If the agent isn't published yet, the toolbar shows **"Publish first"** instead of Preview deck. Publish the agent at the agent level (not slide level) — see [Creating an agent](/docs/build/creating-an-agent#step-7-publish).

## Publish for visitors

Slide changes auto-save as you edit, but they're staged in the **draft** SlideDoc until you publish the *agent*. Publishing happens at the agent level (top of the agent editor, not the slides page) and snapshots the entire agent — including the current SlideDoc — into the live `/a/<slug>` URL.

After publish:

- The draft and published SlideDocs are independent. Edits to the draft do NOT update the published deck until you publish again.
- Visitors hitting `/a/<slug>` see the published version. Conversations continue against whatever was live at the time they arrived.
- You can compare draft vs. published in the agent editor's "Preview" panel.

## Publish flow at a glance

1. **Iterate on individual slides**

   Use **Test slide** to dial in the script and AI instructions on each slide.

2. **Test the whole deck end-to-end**

   Use **Preview deck** to walk through transitions and the overall narrative.

3. **Publish the agent**

   At the agent level (not slide level), click **Publish**. The current SlideDoc snapshots into the live experience.

4. **Share**

   Send the `/a/<slug>` URL, embed via the [script tag](/docs/develop/script-tag/overview) or [NPM widget](/docs/develop/npm/overview).

## What about hot updates?

Live conversations don't get hot-updated mid-session. A visitor who started a session before your latest publish will continue against the version they joined. New visitors get the latest published version.

This is deliberate — we'd rather a 5-minute conversation finish in a coherent state than mid-session swap a slide out from under the visitor.

## Read next

- [Creating an agent → Publish](/docs/build/creating-an-agent#step-7-publish) — agent-level publish workflow
- [Develop overview](/docs/develop/overview) — pick where the published deck lives (hosted, script tag, NPM)
- [Embed widget](/docs/develop/script-tag/overview) — drop the published agent on any site
