
Sub-Agent Orchestration
Proof-of-concept showing the main agent invoking a sub-agent via tool call to offload complex work (e.g. dashboard creation), keeping the main context clean and enabling iterative…
Transcript
This transcript is auto-generated. Names and product terms may be wrong.
Other thing that I've been looking at this week is um quite a discussion about sub agents and how we can use them for some of our more complex workflows. So, I've got just kind of a proof of concept here of um the main agent can invoke a sub agent um through a tool call. So, the idea here is that I mean pretty trivial here um but you can see that it's actually like calling into a different process to run this tiny workload.
Um but the idea here is that like the main agent's context is getting pretty big and um particularly for some of our more complex tools like the dashboard agent, it's nice to be able to hide a lot of that context from the main agent so that it doesn't like pollute the long run set. Um so, this workflow could be for like if it just detects you asked for something complicated and only cares about the output, it can invoke the sub agent um bring that um result back into the main thread.
Um so, kind of like a sort of cost saving thing there and I've got a version of this working for dashboards. But, is that usable in a skill call as well then potentially? Yeah, so you can certainly reference tools and skills and say like for this skill first, you know, call this tool to to do the thing.
Yes. So, um and what and what the main agent will do is just like take prompt and dump that into the sub agent and have the sub agent run whatever comes from that. Um I have a working version of this that's um not going to be like what customers see right away. We'll do this under a flag.
But, I have like the tool for creating a dashboard also working as a sub agent. Um and that's going to have some advantages to um kind of just some of the long tail bugs that we've seen where previously it was this linear process of like you create the plan, then you run the queries, then you visualize them.
And if it encounters problems downstream at like query gen or filter gen, it can't go back to the plan and like rewrite instructions and go and then go back to generating kind of queries, filters, etc. Um cuz it's linear. Like once you go through the gate, you're done. So, it would just drop stuff and like in some cases if it hadn't searched the model enough at the front or um you know, just kind of made some bad decisions, it would just like drop a lot of it and you'd end up with a pretty sparse dashboard.
It was kind of rare, but it would happen. Um and so now with this procedure, it's an agent loop. So, it can say like I got down to this part, but this is, you know, giving me results that I don't want. Let me back up and rewrite the plan, then go back through. Um It tends to be in practice a little bit faster, too.
I think just this sub-agent process seems to loop a little faster, but um you kind of end up in the same place as far as working dashboards, but um the procedure to get there should be a little more robust um using this process. Cool. That's it. All right.