Open source

Mastra: Build Your Own AI Shop Assistant

Mastra is an open source TypeScript framework for building AI agents into your own app. We built a chat assistant for a demo shop with two tools: one looks up orders, and one gives refunds, where anything over $50 waits for staff approval, which Mastra calls human in the loop. The shop, its orders and its name are made up; the chat ran live against the agent.

Open repository

The story

What the video said

You run an online shop and want a chat assistant that answers, where is my order? Chatting is easy. Taking actions such as refunding the customer, and letting a human staff member decide, is the hard part.

Mastra is an open source toolkit for adding AI assistants to your own app.

With Mastra, you build the chat assistant and give it two small tools, pieces of your own code it can call. One looks up orders. The other gives refunds, but anything over fifty dollars needs staff approval.

A customer asks about an order. The assistant calls your tool and answers from your data. For a big refund, the assistant waits. Mastra calls this human in the loop, meaning staff make the final call. It is built in.

Mastra records every step of the chat interaction. Would you use Mastra to build a chat assistant for your shop?

This page was generated from the Ming Dao AI publication record.

Ming Dao AI is independent and unaffiliated with GitHub or the featured project. Read our editorial policy.