Web apps
Shmastra can generate a full standalone web app for your agent or workflow — a dashboard, a custom chat surface, a review UI — served right out of your Mastra project at /shmastra/apps/<name>.
Apps run in the browser as-is: no build step, no bundler. The stack is Preact + DaisyUI (on Tailwind) + htm for JSX-less templates, all loaded via import maps from esm.sh.
Example prompts
Make a dashboard for the sales-pipeline workflow with a bar chart of stages.
Build a chat UI for the support-agent that I can embed in our website.
Create a review app that lets me approve or reject invoices coming out of invoiceWorkflow.
Show the results of the last 50 runs of weeklyReport as a sortable table.
What happens
- The widget scaffolds a new folder under
src/mastra/public/apps/<name>/with anindex.html, anapp.jsroot component, and component files undercomponents/. - It calls your Mastra agents/workflows/tools directly via the Mastra client — you get a real, working UI on the first build.
- If the app needs a custom backend route, the widget creates it in
src/mastra/routes/under/shmastra/api/apps/<name>/and registers it. - Mastra Studio shows the app link; opening it navigates to
/shmastra/apps/<name>in a new tab.
Components ready out of the box
AgentChat— a streaming chat surface for any agent, with file uploads and an optional side-panel mode.- Charts — line, bar, pie; Chart.js wired via the import map.
- DaisyUI components — buttons, cards, tables, modals, themes (light/dark), everything you'd expect.
- Lucide icons — imported via ESM.
Iterate
- "Add a date-range picker to the dashboard."
- "Make the chart update live when the workflow finishes."
- "Add a button that exports the table as CSV."
The widget edits individual component files, so changes stay scoped.
Agent-linked output
An agent can return a markdown link to the app it just generated — the widget renders it as a normal link:
Here is your application: [Open dashboard](/shmastra/apps/sales)Clicking it opens the app (served at /shmastra/apps/<name> by the Shmastra dev server) in a new tab.
Tips
- Say which workflow or agent drives the app. "A dashboard for
salesWorkflow" is unambiguous; "a dashboard" isn't. - Skip the full app for one-off visuals. If you just want a chart inside a chat reply, see Rich chat replies — the agent can generate an HTML file and return a link to it.
- No build step = fast iteration. Every save hot-reloads the dev server.