Deep research inner loop #70
-
| I am exploring the implementation of a deep research agent as a single workflow execution. Specifically, my goal is to create a workflow that facilitates an inner chat loop—enabling back-and-forth communication between the user and the model to align on a plan where the chat is part of the workflow state. How might I structure this functionality within the workflow framework? Are there any best practices or patterns to follow here? I thought about hooks but looks like hooks cannot return data and then wait. And for chat interactions I only found 1 "turn" as a single workflow | 
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
| We just shipped some docs on the workflow AI package that should help out - https://useworkflow.dev/docs/api-reference/workflow-ai Additionally, this example should answer your question - https://github.com/vercel/workflow-examples/tree/main/flight-booking-app and implements sreaming, tool calls, and resumption Another great one that walks you through a chat loop with storing the chat state in the workflow is this guide - https://vercel.com/guides/stateful-slack-bots-with-vercel-workflow | 
Beta Was this translation helpful? Give feedback.
We just shipped some docs on the workflow AI package that should help out - https://useworkflow.dev/docs/api-reference/workflow-ai
Additionally, this example should answer your question - https://github.com/vercel/workflow-examples/tree/main/flight-booking-app and implements sreaming, tool calls, and resumption
Another great one that walks you through a chat loop with storing the chat state in the workflow is this guide - https://vercel.com/guides/stateful-slack-bots-with-vercel-workflow