Hierarchical Flow Support

I am working on a solution where I want to have a Supervisor agent which will understand user queries and route it to the correct sub-agents. There will be around 3-4 sub agents and supervisor has to call either one/multiple agents based on the user query.

Is this possible with Langgraph and if yes, can someone send us some samples/reference on how we can develop such a solution.

1 Like

I’m also looking for the best solution for this. I’ve already built a working implementation, but I’m not sure if it’s the most correct or efficient approach.

The main challenge I faced was handling routing, which turned out to be quite tricky. To solve this, I created eight tools, each calling its own graph, and carefully crafted the tool docstrings to ensure there was no overlap.

This setup works fine for now, but I’m uncertain whether it’s the best and most scalable approach, especially since I plan to add six more subgroups in the future.