1
Install and run init
VENDO_API_KEY in .env.local.Init wrote lib/vendo.ts for you (src/lib/vendo.ts when your app lives under src/) — the createVendo call, and the caller resolver beside it, so your chat route, your wire route, and the pack all share one instance.lib/vendo.ts
authJs() for another preset any time (Auth lists all five).With no provider yet, init wrote a demo principal in place of a preset, and the resolver beside it hands your chat route that same subject:lib/vendo.ts
2
Spread the tools into your agent
One Mastra definition serves every user, so
vendoMastraTools takes no principal — it returns a Promise, which is why the agent takes the tools-as-function form. Every tool lands under a vendo_ prefix — one per registered host action, plus vendo_make (a live view) and vendo_delegate (a whole task for Vendo’s own agent); trim the pack with include or exclude by final tool name.src/mastra/agents/your-agent.ts
3
Hand the caller to the route
app/api/chat/route.ts
RequestContext is Mastra’s own per-invocation carrier, and Vendo’s tools read the principal off it on every call. Set VENDO_SESSION_KEY on the same context to carry your own session id into the audit trail.4
Render the embeds
Mastra streams tool calls as Nothing to wrap: the embed finds the wire itself and rides your host session cookie, and that one component covers plain data, app refs, and approval refs. Full contract: Embeds in your chat.
dynamic-tool or as tool-<name>, depending on how the tool was declared, so match both.components/vendo-part.tsx
5
See it live
Run your own chat and ask for something behind your API. The answer comes back as a working card, inside your own bubble.Init wrote 
VENDO_BASE_URL into .env.local; deployments set the same variable to the public URL, path prefix included (environment variables).
Apps in your product
Your agent can build apps now. Where they land in your product, and how to teach your model when to build one, is one more quickstart: Apps in your product.The full example
examples/mastra-agent is the stock create-mastra weather starter, fronted with Next.js per Mastra’s guide, with this diff applied. Every added line sits between --- vendo and --- /vendo markers, about sixty of them in total.