LangGraph Swarm
A lightweight library for building swarm-style multi-agent systems using LangGraph, enabling agents to hand off tasks to other agents.
At a Glance
Pricing
Free and open source under MIT license
Engagement
Available On
About LangGraph Swarm
LangGraph Swarm is a lightweight Python library that enables developers to build swarm-style multi-agent systems using LangGraph. It provides a simple yet powerful framework for creating networks of AI agents that can dynamically hand off tasks to one another based on context and capabilities. The library is designed to work seamlessly with the LangChain ecosystem and LangGraph's state management.
-
Swarm Architecture - Build multi-agent systems where agents can transfer control to other specialized agents, enabling complex task decomposition and collaborative problem-solving workflows.
-
Handoff Mechanism - Implement seamless agent-to-agent handoffs using the built-in
create_handoff_toolfunction, allowing agents to delegate tasks to the most appropriate agent for each subtask. -
LangGraph Integration - Leverages LangGraph's powerful graph-based workflow orchestration, providing state management and message passing between agents in a structured manner.
-
Flexible Agent Creation - Use
create_swarmto quickly assemble multiple agents into a coordinated swarm, with each agent having its own tools, prompts, and capabilities. -
Customizable Agent Behavior - Define custom agent behaviors and tool sets for each agent in the swarm, enabling specialized agents for different domains or tasks.
-
State Management - Built on LangGraph's state management system, ensuring consistent state handling across agent interactions and handoffs.
To get started, install the package via pip with pip install langgraph-swarm. Create individual agents using LangGraph's create_react_agent, define handoff tools for each agent, and then combine them using create_swarm. The swarm can be compiled and invoked with messages, and agents will automatically coordinate and hand off tasks as needed. The library supports both synchronous and asynchronous execution patterns.

Community Discussions
Be the first to start a conversation about LangGraph Swarm
Share your experience with LangGraph Swarm, ask questions, or help others learn from your insights.
Pricing
Free Plan Available
Free and open source under MIT license
- Full library access
- Swarm-style multi-agent systems
- Agent handoff mechanism
- LangGraph integration
- Community support
Capabilities
Key Features
- Swarm-style multi-agent orchestration
- Agent-to-agent handoff mechanism
- LangGraph state management integration
- Customizable agent tools and behaviors
- React agent pattern support
- Asynchronous execution support
- Message passing between agents
- Graph-based workflow orchestration