Skip to main content
Your loop, your model, your chat UI. Vendo adds a pack of guarded tools to them.

1. Init

Answer the questions. On the first one, pick Through my own agent loop (AI SDK / Mastra). On the model one take Vendo Cloud: a free key lands in .env.local as VENDO_API_KEY, and Vendo’s own screen turns run on it with nothing else to set. Your own provider key works too. Init writes the models: line that selects it, because a key sitting loose in the environment selects nothing.

2. Share one instance

Init writes createVendo inside the wire route. Move it to lib/vendo.ts so your chat route uses the same instance, and export the identity init already wrote — step 3 needs it to resolve the caller. Keep whichever line init wrote. auth and principal fill the same seam, so createVendo refuses a config that sets both.

3. Spread the pack

The pack takes the resolved caller — a { kind, subject } object — so build it inside the handler, once you know who is asking. Vendo mints no principals, so a visitor your resolver can’t place gets a 401.
Your loop keeps its own model credential. vendoModel() rides the same ladder Vendo’s internal turns do, so the Cloud key from step 1 pays for both seats; Mastra’s openai/… pin needs an OPENAI_API_KEY of its own. Either way: Two models, two credentials. Framework notes: AI SDK · Mastra.

4. Render the results

vendo_* calls arrive in your chat as dynamic-tool parts. Hand the finished ones to <VendoToolResult>, anywhere under one <VendoProvider>.

5. Ask for a screen

Say “Make me a dashboard of this month’s spending by category” in your own chat. A live view builds inline. Then check the wiring:
Next: embeds and envelopes.