Formats





Pattern
Agent Mermaid Artifact
Template-style Mermaid artifact with data-mermaidDelta streaming, diagram preview and source editor, SVG/PNG export, in-memory versions, and quick prompts — no database persistence.
IntermediateApr 2026View the full pattern on desktop


Problems solved
- Stream Mermaid diagram JSON with custom UI data parts
- Template-style Artifact class without a full chat backend
Use cases
- Onboarding and architecture explanations
- Demos without database wiring
AI SDK APIs
streamTextcreateUIMessageStreamgatewaytool
Tags
aimermaiddiagramarchitecturestreamingai-sdkartifacts
Requirements
- Node.js
- 24+
- Memory
- 256MB
- Other
- Vercel AI Gateway API key
Environment variables
AI_GATEWAY_API_KEYGet key
External services
openaiupstash
Ready to use?
View the full interactive pattern with live preview and copy the source code.
View the pattern on desktopRelated patterns


Canvas Draw Artifact
Excalidraw whiteboard artifact with data-whiteboardDelta streaming, uncontrolled canvas, SVG/PNG/.excalidraw export, scene templates (architecture, user flow, org chart), and in-memory versions — no database persistence.
aiexcalidraw+6
View pattern →


Agent Sheet Artifact
Template-style sheet artifact with data-sheetDelta streaming, CSV grid editor, in-memory versions, and quick prompts — no database persistence.
aispreadsheet+5
View pattern →
You’ve reached the end of this pattern.



