Drop-in state backend for LangGraph, CrewAI & custom agent loops — Rust core, framework-agnostic, built for production.
Project description
swarmstate
Drop-in state backend for LangGraph, CrewAI & custom agent loops — Rust core, framework-agnostic, built for production.
swarmstate is a state and checkpointing backend with a Rust core and a Python API for multi-agent
systems. It is not an orchestration framework: it is the fast engine that sits underneath LangGraph,
CrewAI, and custom agent loops — the same way a fast columnar engine sits underneath data workloads.
It solves three production pains:
- State lock-in across frameworks — a framework-agnostic store so migrating frameworks doesn't lose state.
- Checkpointing cost and latency — a Rust-backed implementation of LangGraph's checkpointer interface.
- Deterministic routing paid for in tokens — a native handoff graph that resolves rule-based transitions in microseconds.
Installation
pip install swarmstate # prebuilt abi3 wheels, no compiler required
Optional extras: swarmstate[langgraph], swarmstate[crewai], swarmstate[redis], swarmstate[all].
Usage
import swarmstate as ss
store = ss.Store() # in-memory, msgpack codec
store.set("workflow", "onboarding", {"step": 3, "data": {...}})
snap = store.snapshot() # cheap, immutable snapshot
store.set("workflow", "onboarding", {"step": 4})
store.restore(snap) # rollback
store.get("workflow", "onboarding") # -> {"step": 3, "data": {...}}
snap2 = store.snapshot()
snap2.diff(snap) # {"added": [...], "removed": [...], "changed": [...]}
Status
Early development.
- M0 (scaffolding) ✅ — Rust core builds;
import swarmstateworks. - M1 (Rust store) ✅ — concurrent KV store, msgpack codec, O(1) immutable snapshots, incremental diffs, GIL released on hot paths.
- M2 (HandoffGraph), M3 (LangGraph adapter) — next.
Development
python -m venv .venv && source .venv/bin/activate
pip install maturin pytest
maturin develop --release # compile the Rust core and install it locally
cargo test # Rust core tests
pytest -q # Python API tests
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
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 swarmstate-0.1.0.tar.gz.
File metadata
- Download URL: swarmstate-0.1.0.tar.gz
- Upload date:
- Size: 19.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dffda0c3e980fd5a937a98749b457f44bee82aedbf8abd5e69e00025843a53f8
|
|
| MD5 |
804fd9cd705ab7fc88d9ca18bea03252
|
|
| BLAKE2b-256 |
aa250db4a10cf782a31f688d2a31d6c288e1875e89b3b5f69dd3c95ba9b054bb
|
Provenance
The following attestation bundles were made for swarmstate-0.1.0.tar.gz:
Publisher:
release.yml on swarmstate/swarmstate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
swarmstate-0.1.0.tar.gz -
Subject digest:
dffda0c3e980fd5a937a98749b457f44bee82aedbf8abd5e69e00025843a53f8 - Sigstore transparency entry: 2038778749
- Sigstore integration time:
-
Permalink:
swarmstate/swarmstate@01a9bb0b0f8178e4a413a9099d24c3ef4ffabf06 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/swarmstate
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@01a9bb0b0f8178e4a413a9099d24c3ef4ffabf06 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file swarmstate-0.1.0-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: swarmstate-0.1.0-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 168.7 kB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d4bc0da3c11af9a3631097235de5dc286d2473009de8ec88592abb2f0553d0f
|
|
| MD5 |
7087c70298be454f8fdc96ff20ce1178
|
|
| BLAKE2b-256 |
fd72e9b48435d5887a0ae12ec613c3a3421108015ea141610b864be9b200340a
|
Provenance
The following attestation bundles were made for swarmstate-0.1.0-cp39-abi3-win_amd64.whl:
Publisher:
release.yml on swarmstate/swarmstate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
swarmstate-0.1.0-cp39-abi3-win_amd64.whl -
Subject digest:
6d4bc0da3c11af9a3631097235de5dc286d2473009de8ec88592abb2f0553d0f - Sigstore transparency entry: 2038780199
- Sigstore integration time:
-
Permalink:
swarmstate/swarmstate@01a9bb0b0f8178e4a413a9099d24c3ef4ffabf06 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/swarmstate
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@01a9bb0b0f8178e4a413a9099d24c3ef4ffabf06 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file swarmstate-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: swarmstate-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 290.5 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17d26e34e5bf54f881690175ee6844fad2a3bdadc43764d922a08a5bc36a1d87
|
|
| MD5 |
bc264189c953e6d44b23c4786980db1d
|
|
| BLAKE2b-256 |
729e4af24a9caa543080f727cc58a3312c211c54bacb892168cb9ffe44368b0b
|
Provenance
The following attestation bundles were made for swarmstate-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on swarmstate/swarmstate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
swarmstate-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
17d26e34e5bf54f881690175ee6844fad2a3bdadc43764d922a08a5bc36a1d87 - Sigstore transparency entry: 2038781101
- Sigstore integration time:
-
Permalink:
swarmstate/swarmstate@01a9bb0b0f8178e4a413a9099d24c3ef4ffabf06 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/swarmstate
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@01a9bb0b0f8178e4a413a9099d24c3ef4ffabf06 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file swarmstate-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: swarmstate-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 288.6 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09b2fbed869d0720c984ccae0506e7fe464f11fdb75e76ca6ce04b74b801cb18
|
|
| MD5 |
05bf997b8e2a917c8af637fe2bc15013
|
|
| BLAKE2b-256 |
53f2f8c7c96102d9917f7c296f45f14340c8f87479d9751eefc32844cde29258
|
Provenance
The following attestation bundles were made for swarmstate-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on swarmstate/swarmstate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
swarmstate-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
09b2fbed869d0720c984ccae0506e7fe464f11fdb75e76ca6ce04b74b801cb18 - Sigstore transparency entry: 2038779124
- Sigstore integration time:
-
Permalink:
swarmstate/swarmstate@01a9bb0b0f8178e4a413a9099d24c3ef4ffabf06 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/swarmstate
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@01a9bb0b0f8178e4a413a9099d24c3ef4ffabf06 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file swarmstate-0.1.0-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: swarmstate-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 268.0 kB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42c788b08273298c4b122a095f1ce6fcec2a041b93ed49139551729cfc231ce7
|
|
| MD5 |
083de3f39336527f672e5e46e8e9ad48
|
|
| BLAKE2b-256 |
31092caae8ed2aaa79bdc78cea743bacece27e8d7381d09b7bc1eec2f8c4e9f2
|
Provenance
The following attestation bundles were made for swarmstate-0.1.0-cp39-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on swarmstate/swarmstate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
swarmstate-0.1.0-cp39-abi3-macosx_11_0_arm64.whl -
Subject digest:
42c788b08273298c4b122a095f1ce6fcec2a041b93ed49139551729cfc231ce7 - Sigstore transparency entry: 2038780628
- Sigstore integration time:
-
Permalink:
swarmstate/swarmstate@01a9bb0b0f8178e4a413a9099d24c3ef4ffabf06 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/swarmstate
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@01a9bb0b0f8178e4a413a9099d24c3ef4ffabf06 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file swarmstate-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: swarmstate-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 278.3 kB
- Tags: CPython 3.9+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5475752acc16b4957355c61f736a0601132e1adb76694eb89ad8e14e546aeb28
|
|
| MD5 |
838e6bbf7afc377e3069f96f0439ec53
|
|
| BLAKE2b-256 |
d52e4403dad6b31683d35cd4e6d229612075a3fd48eb6237aff90f4aafd4bbe3
|
Provenance
The following attestation bundles were made for swarmstate-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl:
Publisher:
release.yml on swarmstate/swarmstate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
swarmstate-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl -
Subject digest:
5475752acc16b4957355c61f736a0601132e1adb76694eb89ad8e14e546aeb28 - Sigstore transparency entry: 2038779655
- Sigstore integration time:
-
Permalink:
swarmstate/swarmstate@01a9bb0b0f8178e4a413a9099d24c3ef4ffabf06 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/swarmstate
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@01a9bb0b0f8178e4a413a9099d24c3ef4ffabf06 -
Trigger Event:
workflow_dispatch
-
Statement type: