Hey everyone,
Quick question for you all.
My issue is that after deploying a new custom agent to Mastra Cloud, the Mastra Client continues to show only the original "Weather Agent" instead of the updated one.
When I initially created my project on Mastra, it started with the default "Weather Agent." I then created a new custom agent by modifying this original Weather Agent and named it "Fitness Agent."
However, when I connect using the Mastra Client, it still only lists the original "Weather Agent" as available—even though my Fitness Agent is the only agent on my deployed server. This suggests that my new agent isn't updating correctly or replacing the old one on Mastra Cloud.
Here's the code snippet I'm using to debug this issue:
// Create a client that connects to your deployed Mastra instance
const client = new MastraClient({
baseUrl:
"xxxxxxxxxxxxx",
});
// Access your agent through the client
// This is just for debugging purposes and won't work in production
// It's better to use async/await or handle the promise properly
try {
const agents = await client.getAgents();
console.log("[API:createMessage:BG] Available agents:", agents);
} catch (error) {
console.error("[API:createMessage:BG] Error fetching agents:", error);
}
This always returns the original Weather Agent instead of my new Fitness Agent.
Any thoughts or suggestions?
Thanks!