Advice needed for Mastra AI "backend" and Convex on frontend

Hi! We’re currently testing different frameworks to see what fits our setup best. Our MVP was built entirely with Convex — covering the backend, agent components, and frontend. The nice thing about Convex is how easy it is to manage everything while keeping the frontend reactive. For example, we store threads, messages, logs, and tool call results directly in Convex, which lets us display them in a chat-like UI. Now that we’re experimenting with Mastra, we’re running into a few architectural decisions — one of them being where and how to store and display messages, tool call statuses, and results. One idea I’m considering is connecting a Convex HTTP endpoint (if possible) to Mastra’s workflow run stream endpoint. This way, we could listen to the stream, save the run results and steps into a Convex table, and automatically persist and display everything in the UI. Would that be a fine idea or am I missing something? One thing I try to prevent is to have data coming in from multiple places
4 Replies
Mastra Triager
GitHub
[DISCORD:1429198948374941786] Advice needed for Mastra AI "backend"...
This issue was created from Discord post: https://discord.com/channels/1309558646228779139/1429198948374941786 Hi! We’re currently testing different frameworks to see what fits our setup best. Our ...
_roamin_
_roamin_17h ago
Hi @DennisK ! How are you planning to host your Mastra agents? Are you embedding your Mastra project/source into your own backend, or are you hosting a full Mastra server? (either on Mastra Cloud or self hosted)
DennisK
DennisKOP16h ago
Hi! Will be hosting a server ourself or go for Mastra Cloud !
_roamin_
_roamin_15h ago
I see! So, if you use memory in Mastra, then threads, messages, workflows run, traces, etc... get saved in a database already (we support sqlite, postgres, mongodb, etc...) so you could use the Mastra API to retrieve the data. Your approach would work too (Convex calling Mastra), but I guess you'd have to handle saving all the data on your end. It really depends on what features your wanted to use from Mastra. (memory, tracing, etc...)

Did you find this page helpful?