Prerequisites
- A project created with Create project.
- The agent route from Create API.
- The dev server running (
veryfront dev).
Add the chat page
Replaceapp/page.tsx with a client page:
useChat() uses /api/ag-ui by default. Chat renders the composer,
messages, loading state, and streamed assistant response.
Keep the MarkdownRendererProvider wrapper. Assistants answer in Markdown, and
veryfront/markdown presents plain escaped source until a renderer is
installed, so a <Chat> without one shows - **Static type checking** instead
of a bulleted list.
Supply the Markdown renderer
Create project preselects theai-agent template, and
that starter, like the other chat starters, scaffolds
app/markdown-renderer.tsx, so those projects already have this file. Create it
yourself if yours does not: the minimal and agentic-workflow templates ship
without a renderer, as does a project you added Veryfront to.
--save-exact matters: these packages reach the browser through the module
pipeline, where a floating ^ range resolves to whatever is latest at request
time. Your renderer owns parsing, sanitization, and link policy. See
Render Markdown in chat to swap
in a different renderer.
Choose SSR-safe styles
Use build-time CSS when the initial server-rendered page must be styled. Good options include Tailwind CSS, CSS Modules, and other tools that emit CSS during the build. Veryfront does not currently collect styles from runtime CSS-in-JS libraries such as Emotion or styled-components during server rendering. A generated class name may appear in the server HTML without its CSS rule because styles inserted throughdocument.head are not added to the response. This may leave the page
unstyled or cause a flash of unstyled content before client hydration.
Do not rely on runtime CSS-in-JS for SSR styling until Veryfront provides a
server style-collection and insertion API.
Verify it worked
Open http://localhost:3000, send a message, and confirm:- The assistant response streams into the chat.
- Ask for a bulleted list. The reply renders as formatted Markdown, not raw
Markdown source: bullets and bold text, with no literal
-or**markers and no```fences. - The browser console reports no missing-Markdown-renderer warning.