useChat tool streaming

I'm using the AI SDK v5 useChat to setup an interface to Mastra agents. I'm trying to also use the client side tools to show React components based on tool actions. What I'm finding when I console log the messages is taht all I get is type == text and I see no tool calls making it from the mastra agent. I've got console logs in the tools and all are working fine and I see the results in the output from the agent but I have no tool calls coming across I tried to follow Tool Streaming and expose them via the writer but I just get type errors in the client. Has anyone gotten client side tools working with mastra? Thanks!
3 Replies
rogueturnip
rogueturnipOP4w ago
Might have solved it.. did some restarts of the server and it eventually started working
Mastra Triager
GitHub
[DISCORD:1420155094376386730] useChat tool streaming · Issue #8147...
This issue was created from Discord post: https://discord.com/channels/1309558646228779139/1420155094376386730 I'm using the AI SDK v5 useChat to setup an interface to Mastra agents. I'm tr...
rogueturnip
rogueturnipOP4w ago
so i have the top level agent and tools working but if you have an agent that calls an agent with tools things are blind after the first layer This means you can do UI actions from client tools or propertly show the data that generated by the tools.

Did you find this page helpful?