Losing chat window and history in subflow

Hi everyone,

I’m building a multi-agent copilot in MindStudio with a Main.flow that contains a Chat block as the conversational hub. When the user expresses a specific intent, a Dynamic Tool in the Chat block jumps them to a specialized sub-flow (e.g., prospector.flow, copywriter.flow).

Each sub-flow also starts with a Chat block.

The problem: When the user lands in the sub-flow’s Chat block, the conversation history from Main.flow is gone. The sub-flow Chat block has no awareness of what was said before the jump. The user experience feels like starting a completely new conversation.

I am passing {{user_intent}} (the last message variable from Main.flow’s Chat block) into the sub-flow’s System Prompt, which helps with context, but the full conversation history is not available.

Is there a recommended pattern for building multi-agent architectures where the user feels like they are in one continuous conversation, even when jumping between sub-flows?

Is the correct approach to keep all conversation inside a single Chat block in Main.flow and use sub-flows only as linear tool workflows (Generate Text + User Input), rather than having Chat blocks in sub-flows?

Or should each specialized agent be a separate published app rather than a sub-flow, with the main app acting as an orchestrator that links to them?

Thanks,
SP

Hi @spatton,

Thanks for the detailed post!

This really comes down to which setup fits your use case, and there are 3 main approaches.

Approach 1: Single Chat block in Main.flow (recommended for most cases)
Keep one Chat block in your main workflow and use sub-workflows as tools rather than giving each sub-flow its own Chat block. The conversation stays in one place, and you define your specialized agents as Dynamic Tools on that single Chat block, and each tool calls a sub-flow to do its work and return a result.

Here’s a remix link to a simple agent that follows this approach:
https://app.mindstudio.ai/agents/dynamic-tools-in-chat-8650c49b/remix

Approach 2: Chat blocks in sub-workflows
If you need each sub-workflow to have its own Chat block, you can set up a Menu block linked to Jump blocks that route the user to separate sub-workflows.

Approach 3: Passing history between Chat blocks
The key to preserving conversation history is:

  1. Define the history variable in the Chat block itself
  2. Pass it into the Start block of the sub-workflow
  3. Reference that history variable in the sub-workflow’s System Prompt or any other blocks that need to process the conversation

For most multi-agent setups, Approach 1 is the simpler and more seamless path. The user stays in one continuous conversation, and your sub-workflows handle the specialized tasks behind the scenes.

Let me know what you think!

Thank you so much! That helps a lot

I have one quick follow-up question: I have a lot of subflows that multiple agents will access, so I am going to create them as packaged workflows. Is that the best way to set them up? Also, I saw that packaged workflows have to have their own repositories, do those count as one of my agents?

Thanks,
SP

Hi @spatton, yes! Packaged Workflow Agents are specifically designed for reusability, so you can package an entire agent into a single block.

They do need to be in a Published state to use them in other agents in your workspace, but there’s no limit on the number of agents you can publish on the Individual Plan.

Got it - thank you again!