diff --git a/examples/nextjs-ai-slideshow/.env.example b/examples/nextjs-ai-slideshow/.env.example
new file mode 100644
index 00000000000..dde87e67753
--- /dev/null
+++ b/examples/nextjs-ai-slideshow/.env.example
@@ -0,0 +1,5 @@
+# https://liveblocks.io/dashboard/apikeys
+LIVEBLOCKS_SECRET_KEY=
+
+# https://vercel.com/docs/ai-gateway
+AI_GATEWAY_API_KEY=
diff --git a/examples/nextjs-ai-slideshow/.gitignore b/examples/nextjs-ai-slideshow/.gitignore
new file mode 100644
index 00000000000..3a68e0cfc9d
--- /dev/null
+++ b/examples/nextjs-ai-slideshow/.gitignore
@@ -0,0 +1,12 @@
+.DS_Store
+node_modules
+.env
+.env.*
+!.env.example
+*.tsbuildinfo
+.vercel
+.next
+out
+next-env.d.ts
+# Turborepo
+.turbo
diff --git a/examples/nextjs-ai-slideshow/README.md b/examples/nextjs-ai-slideshow/README.md
new file mode 100644
index 00000000000..b50d248f89f
--- /dev/null
+++ b/examples/nextjs-ai-slideshow/README.md
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+# AI Slideshow Generator
+
+
+
+
+
+
+
+
+
+
+
+
+This example shows how to build a multiplayer AI slideshow builder with
+[Liveblocks Feeds](https://liveblocks.io/docs/collaboration-features/ai-collaboration),
+[Yjs](https://yjs.dev/), [CodeMirror](https://codemirror.net/),
+[Liveblocks Comments](https://liveblocks.io/docs/products/comments), and
+[Next.js](https://nextjs.org/). Chat with AI to generate slides with HTML, and
+it’ll create previews of new slides that you can apply. Alternatively,edit the
+HTML directly in the collaborative editor. You can also leave comments on
+slides.
+
+## Getting started
+
+Run the following command to try this example locally:
+
+```bash
+npx create-liveblocks-app@latest --example nextjs-ai-slideshow --api-key
+```
+
+This will download the example and ask permission to open your browser, enabling
+you to automatically get your API key from your
+[liveblocks.io](https://liveblocks.io) account.
+
+### Manual setup
+
+Read more
+
+
+
+Alternatively, you can set up your project manually:
+
+- Install all dependencies with `npm install`
+- Create an account on [liveblocks.io](https://liveblocks.io/dashboard)
+- Copy your **secret** key from the
+ [dashboard](https://liveblocks.io/dashboard/apikeys)
+- Create an `.env.local` file and add your **secret** key as the
+ `LIVEBLOCKS_SECRET_KEY` environment variable
+- Add an `AI_GATEWAY_API_KEY` from the
+ [Vercel AI Gateway](https://vercel.com/docs/ai-gateway).
+- Run `npm run dev` and go to [http://localhost:3000](http://localhost:3000)
+
+To see realtime sync, open the page in two browser tabs. Edits to the HTML,
+comment pins, chat messages, and applied proposals sync across both tabs.
+
+
+
+### Deploy on Vercel
+
+Read more
+
+
+
+To both deploy on [Vercel](https://vercel.com), and run the example locally, use
+the following command:
+
+```bash
+npx create-liveblocks-app@latest --example nextjs-ai-slideshow --vercel
+```
+
+This will download the example and ask permission to open your browser, enabling
+you to deploy to Vercel.
+
+
+
+### Develop on CodeSandbox
+
+Read more
+
+
+
+After forking
+[this example](https://codesandbox.io/s/github/liveblocks/liveblocks/tree/main/examples/nextjs-ai-slideshow)
+on CodeSandbox, create the `LIVEBLOCKS_SECRET_KEY` environment variable as a
+[secret](https://codesandbox.io/docs/secrets). Add `AI_GATEWAY_API_KEY` if you
+want real model responses instead of the mock slide designer.
+
+
diff --git a/examples/nextjs-ai-slideshow/app/api/ai-reply/route.ts b/examples/nextjs-ai-slideshow/app/api/ai-reply/route.ts
new file mode 100644
index 00000000000..a289a8d1d2c
--- /dev/null
+++ b/examples/nextjs-ai-slideshow/app/api/ai-reply/route.ts
@@ -0,0 +1,394 @@
+import { Liveblocks } from "@liveblocks/node";
+import { NextRequest, NextResponse } from "next/server";
+import { AI_USER_AVATAR, AI_USER_ID, AI_USER_NAME } from "@/app/database";
+import { STARTER_SLIDE_HTML } from "@/app/slide-html";
+
+/**
+ * Generates an assistant reply and streams it into the room's feed using
+ * `@liveblocks/node`. Chat content excludes fenced HTML while streaming; the
+ * completed HTML document is attached as a proposal for clients to apply.
+ */
+
+type ChatMessage = { role: "user" | "assistant"; content: string };
+type Source = { title: string; url: string };
+type ChainStep = {
+ label: string;
+ description?: string;
+ status?: "complete" | "active" | "pending";
+ search?: string[];
+};
+type ToolCall = {
+ name: string;
+ input: Record;
+ output?: string;
+};
+
+type AssistantUpdate = {
+ content: string;
+ reasoning?: string;
+ sources?: Source[];
+ suggestions?: string[];
+ chainOfThought?: ChainStep[];
+ tool?: ToolCall;
+ proposedHtml?: string;
+ proposalStatus?: "pending" | "applied" | "rejected";
+ usedTokens?: number;
+ maxTokens?: number;
+ streaming: boolean;
+};
+
+const ROOM_ID_PREFIX = "liveblocks:examples:nextjs-ai-slideshow";
+const MAX_TOKENS = 128_000;
+
+const AUTHOR = {
+ userId: AI_USER_ID,
+ name: AI_USER_NAME,
+ avatar: AI_USER_AVATAR,
+} as const;
+
+const SYSTEM_PROMPT = [
+ "You are an expert slide designer inside a multiplayer slideshow builder.",
+ "Reply with a SHORT conversational message plus the COMPLETE slide HTML document in a single fenced ```html code block.",
+ "The HTML must be a full self-contained document with inline
+
+
+
+ Live collaboration
+
+ Turn one prompt into a shared presentation asset.
+ AI proposes the structure, Yjs keeps the HTML editable, and comments keep decisions visible.
+
+
+ 3xfaster iteration loops
+ 100%multiplayer review
+ 1source of truth
+
+
+
+