langchain-ai/langgraph-swarm-py

For your multi-agent needs

What it solves

It simplifies the creation of "swarm-style" multi-agent systems where specialized agents dynamically hand off control to one another based on their specific expertise. It ensures that the system remembers which agent was last active, allowing conversations to resume seamlessly with that agent.

How it works

Built on top of LangGraph, the library provides tools to define agents and a swarm coordinator. Agents are equipped with handoff tools that allow them to transfer the conversation context to another agent. The system uses a state graph to track the active agent and can be integrated with checkpointers for short-term and long-term memory to maintain state across multiple interactions.

Who it’s for

Developers building complex AI agent applications that require multiple specialized agents collaborating and transferring tasks between each other.

Highlights

  • Dynamic Handoffs: Specialized agents can hand off context to each other using built-in or custom handoff tools.
  • State Persistence: Out-of-the-box support for streaming, short-term memory, and long-term memory via LangGraph.
  • Customizable Architecture: Supports custom handoff tool implementations and custom agent state schemas to isolate internal agent history.
  • Human-in-the-Loop: Leverages LangGraph's capabilities for human intervention in agent workflows.

Related

  • Project
  • Project
  • Project
  • Project