Agent calling a workflow (with Vercel AI SDK chat)
Hey guys, had an issue with agents calling workflows. It seems that if I write into a workflow's writer, and I invoked it from an agent, the writer doesn't pass messages to the agent's stream. I'm not sure if this is by design.
The issue I'm facing is that I want to send a custom data message from a workflow I call through an agent and wait for user input (I have a useChat hook from the Vercel AI SDK for chat input). I seem to neither be able to send a custom message through the writer to the chat, nor can I seem to suspend the Mastra app for input (when I suspend the workflow, control goes over to the agent and it just sends back text instead of waiting for a response). Am I missing something here?
P.S: there seems to be a lot of documentation about workflows calling agents, but none of agents calling workflows.
The issue I'm facing is that I want to send a custom data message from a workflow I call through an agent and wait for user input (I have a useChat hook from the Vercel AI SDK for chat input). I seem to neither be able to send a custom message through the writer to the chat, nor can I seem to suspend the Mastra app for input (when I suspend the workflow, control goes over to the agent and it just sends back text instead of waiting for a response). Am I missing something here?
P.S: there seems to be a lot of documentation about workflows calling agents, but none of agents calling workflows.