Resume suspended workflow with AI SDK
I have a question about resuming a suspended workflow when using AI SDK. When using the workflowRoute there doesn't seem to be a way to pass a runId, but in the code I see that resumeData is basically supported.
My goal was to not be forced to implement a human in the loop step using a tool call, but to suspend the workflow and continue it by sending a custom message that includes the resumeData.
I might have a misunderstanding here about the purpose of resumeData in this case. But it would be nice if the existing route could handle this case as well and it seems the only thing missing would be the runId param and a conditional call to getWorkflowRunById instead of creating a new run from scratch.
My goal was to not be forced to implement a human in the loop step using a tool call, but to suspend the workflow and continue it by sending a custom message that includes the resumeData.
I might have a misunderstanding here about the purpose of resumeData in this case. But it would be nice if the existing route could handle this case as well and it seems the only thing missing would be the runId param and a conditional call to getWorkflowRunById instead of creating a new run from scratch.
GitHub
The TypeScript AI agent framework.
Assistants, RAG, observability. Supports any LLM: GPT-4, Claude, Gemini, Llama. - mastra-ai/mastra