canvakit.sh

v1, alpha

Template + data source,
one declarative file.

Canvakit is the open standard for agent-rendered UIs that update from live data without re-emitting HTML. Declare tools, files, queries, or static values in YAML frontmatter. Render with Mustache, MDX, or any engine that speaks (body, context) => string.

npm i -g canvakit

A canvakit template

---
template: true
name: hello
version: 0.1.0
dataSources:
  flights:
    kind: tool
    ref: searchFlights
    params: { origin: LHR, destination: JFK }
  header:
    kind: static
    value: "Welcome back"
---
<h1>{{header}}</h1>
<ul>
  {{#flights.flights}}
    <li>{{airline}} — {{price}}</li>
  {{/flights.flights}}
</ul>

The template declares its tool dependencies. Any runtime that can resolve tool names — Mastra, MCP clients, Vercel AI SDK, or a CI job with fixtures — can render it. Re-run a tool → re-render the template → the UI updates. No new HTML emission. No new agent turn.

UI + data, one artifact

One file with YAML frontmatter declares its own bindings. Portable to any runtime. No component library, no JSON tree to maintain.

Tool-first, MCP-aligned

kind: tool is the primitive. ref resolves flat, namespaced (stripe.*), or MCP (mcp://server/tool). One spec, every runtime.

Designkit inside

Optional bridge to @agstudio/design-kit — active DESIGN.md auto-injects $design tokens + :root CSS vars. Canvakit core has no designkit coupling.

Client-side rehydration

Every render embeds its context as safe JSON under <script id='canvas-data'>. Sparklines, animations, hydration — no framework prescribed.