Hey team,
TL;DR: It's hard for me to understand when to use a sub-agent architecture; I'm having trouble with follow-up actions for sub-agents. They start fresh sub-agent threads that have little context of previous sub-agent threads.
I want to build an agent that is general purpose for action in my subscription management app. I think a single agent will not be enough, so I thought I'd break it into an orchestrator agent, and then several sub agents. I'm starting simple: a general learning sub-agent (answers general queries), and a subscription management sub-agent (it creates or edits subscriptions). Both managed by an orchestrator main agent.
The issue I'm having is that the subscription management sub-agent is great at performing an initial action, but as soon as I want to do a follow-up, it really struggles. This is because Mastra starts a fresh sub-agent thread every time.
For example: the agent will create a subscription perfectly, but if I ask it to edit it, it struggles because the orchestrator always starts a fresh sub-agent thread that does not have context of the previous sub-agent thread where the subscription was created.
Should I be using a single agent? If so, how do very large and complex apps manage this?