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.
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.