I recently spent a few late nights debugging an issue with our support bot, which was supposed to handle multiple conversations simultaneously. The problem was that it would often drop context or respond to the wrong user, even though we were using LangGraph's StateGraph to manage the conversation state. It turned out that the issue was due to the way we were running our agents - we were using a single agent to handle all conversations, which was leading to a lot of conflicts and inconsistencies.

To fix this, we decided to switch to an orchestrator-worker model, where a single orchestrator agent would manage the overall workflow and assign tasks to multiple worker agents. This way, each conversation would have its own dedicated worker agent, which would prevent the context switching issues we were seeing. But to make this work, we needed a way for the orchestrator to send tasks to the worker agents, and for the workers to send results back to the orchestrator.

That's where LangGraph's Send API comes in. The Send API allows you to send messages between agents, which is exactly what we needed to implement our orchestrator-worker model. Here's an example of how we used the Send API to send a task from the orchestrator to a worker: