StateGraph vs createSupervisor for Multi-agent application

We are working on a project where we will be using multi-agent architecture (supervisor model). While going through the official documentation, I came across two approaches.

  1. createSupervisor
  2. StateGraph

I would like to know what’s the recommended approach to proceed with. We will be using framework capabilities like: human-in-loop, state, context, eval, tools.

Hi! Both options work.

Generally, the createSupervisor is useful for simple supervisor architectures to get started. As your graph starts getting more custom needs and more complicated workflows, we generally suggest using StateGraph to create your own custom supervisor.

If you’re early on in the process, I’d suggest createSupervisor to get something working quickly and to stress test where you need more custom architecture

1 Like

thank you @xuro-langchain