This issue was created from Discord post 1491822366936797327:

Hi everyone! 👋
I’m currently exploring Mastra to evaluate whether it fits my use case. First of all, great job — the editor experience is really nice 👍
That said, while building some demos, I ran into a few behaviors that felt a bit unexpected, especially around agents and prompts.
From my perspective, the idea of stored agents is very powerful. However, right now it feels like there’s a bit of a mix between programmatic agents and stored/editor-managed agents:
You can create an agent programmatically and then edit its prompt in the editor.
Once edited, the prompt becomes a stored entity (Prompt block), and the agent itself is also stored in the database.
After this point, if you try to modify the prompt again in code, it no longer has any effect — the “programmatic” definition seems to be overridden or locked.
This makes it hard to reason about the source of truth for an agent. Maybe it would help to more clearly separate stored agents vs purely programmatic agents, or at least make the lifecycle and precedence rules more explicit.
I also experimented with creating prompts and agents via mastra.getEditor, but it doesn’t feel like there’s a complete end‑to‑end flow yet. For example, listAgents doesn’t return stored agents (which might be a bug?).
Overall, I’m really enjoying Mastra and I love the direction it’s going ❤️
Thanks a lot for the amazing work, and happy to discuss or clarify anything further!
This issue was created from Discord post 1491822366936797327:
Hi everyone! 👋
I’m currently exploring Mastra to evaluate whether it fits my use case. First of all, great job — the editor experience is really nice 👍
That said, while building some demos, I ran into a few behaviors that felt a bit unexpected, especially around agents and prompts.
From my perspective, the idea of stored agents is very powerful. However, right now it feels like there’s a bit of a mix between programmatic agents and stored/editor-managed agents:
You can create an agent programmatically and then edit its prompt in the editor.
Once edited, the prompt becomes a stored entity (Prompt block), and the agent itself is also stored in the database.
After this point, if you try to modify the prompt again in code, it no longer has any effect — the “programmatic” definition seems to be overridden or locked.
This makes it hard to reason about the source of truth for an agent. Maybe it would help to more clearly separate stored agents vs purely programmatic agents, or at least make the lifecycle and precedence rules more explicit.
I also experimented with creating prompts and agents via mastra.getEditor, but it doesn’t feel like there’s a complete end‑to‑end flow yet. For example, listAgents doesn’t return stored agents (which might be a bug?).
Overall, I’m really enjoying Mastra and I love the direction it’s going ❤️
Thanks a lot for the amazing work, and happy to discuss or clarify anything further!