LangGraph abstractions for hierarchical multi-agent systems
Project description
langgraph-hierarchies
Status: early development (0.0.x). API and scope are not stable. v0.1 will ship the keystone slice below.
Stateful, deeply-nested compiled-subgraph agent hierarchies on LangGraph — with declarative per-subchain state isolation and supervisor-controlled iteration safety.
Flat delegation (Deep Agents, supervisor handoffs) is a good starting point. This library targets the production wall past that: recursive hierarchies where subagents are real compiled subgraphs, with explicit clear/merge/discard policy across satte fields — not ephemeral task-tool isolation alone.
How this relates to other libraries
| langgraph-supervisor | Deep Agents | langgraph-hierarchies | |
|---|---|---|---|
| Model | Supervisor → workers (handoff tools) | Harness + subagents (task / programmatic task()) |
Class-as-factory graphs, phased compile, SubchainPolicy |
| Nesting | Multi-level supervisors | Fan-out / data recursion (partial); not stateful deep trees | Recursive compiled subgraphs + declarative state policy |
| Best for | Quick hierarchical routing | General long-horizon agents | Production-grade deep hierarchies with accountability |
Deep Agents already covers fan-out, parallel orchestration, and RLM-style recursion over data (programmatic subagents, June 2026). This project does not try to replace that.
Compatibility
| langgraph-hierarchies | langgraph |
|---|---|
| 0.0.x | 1.2.6 (pinned; see releases) |
Regression tests will gate version bumps. A pair is listed here only once the test suite is green for it.
Roadmap (v0.1)
-
BaseGraph/CompiledGraph+ phased compilation -
SubchainPolicy(entry snapshot, clear/merge/discard, exit restore) -
ReactGraph+ iteration safety (per-agent limits, supervisortask_iterations, forced-exit report) - Minimal runnable hierarchy example
Planner/Executor, progress tracking, HITL: follow-on after v0.1.
Install
pip install langgraph-hierarchies
Requires Python ≥3.10 (matches LangGraph).
Development
Uses uv (same toolchain as upstream LangGraph):
uv sync
uv run pytest
uv build # sdist + wheel for PyPI
Disclaimer
This project is not affiliated with, endorsed by, or maintained by LangChain or the LangGraph team. “LangGraph” is a trademark of LangChain; this package name indicates compatibility with the LangGraph runtime, not official status.
Contact
- Bug reports & feature requests: GitHub Issues
License
MIT — see LICENSE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langgraph_hierarchies-0.0.1.tar.gz.
File metadata
- Download URL: langgraph_hierarchies-0.0.1.tar.gz
- Upload date:
- Size: 105.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7609380ec6dcfae9888a85a6e8d592479bebb2d3d73880662911548c4214174
|
|
| MD5 |
7306a00e34e23a84d3e7d182caecec0f
|
|
| BLAKE2b-256 |
28c8741788695af1f39f7189c7ef35bfddf1b0b03b48f7336b8ea30b4ab6cce5
|
File details
Details for the file langgraph_hierarchies-0.0.1-py3-none-any.whl.
File metadata
- Download URL: langgraph_hierarchies-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99aa26c5a2c38d61575c634d1bc2975a171548182457565aa5c88651aaabb88c
|
|
| MD5 |
011f85d77427f1fae23e0bf632ac1f86
|
|
| BLAKE2b-256 |
e019b8d3dc7dbddc052ed069e1efa9ff6d4e63392e9066726559fcf415799168
|