Skip to main content

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:

  1. State lock-in across frameworks — a framework-agnostic store so migrating frameworks doesn't lose state.
  2. Checkpointing cost and latency — a Rust-backed implementation of LangGraph's checkpointer interface.
  3. 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 swarmstate works.
  • 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swarmstate-0.1.0.tar.gz (19.9 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

swarmstate-0.1.0-cp39-abi3-win_amd64.whl (168.7 kB view details)

Uploaded CPython 3.9+Windows x86-64

swarmstate-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (290.5 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

swarmstate-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (288.6 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

swarmstate-0.1.0-cp39-abi3-macosx_11_0_arm64.whl (268.0 kB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

swarmstate-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl (278.3 kB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

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

Hashes for swarmstate-0.1.0.tar.gz
Algorithm Hash digest
SHA256 dffda0c3e980fd5a937a98749b457f44bee82aedbf8abd5e69e00025843a53f8
MD5 804fd9cd705ab7fc88d9ca18bea03252
BLAKE2b-256 aa250db4a10cf782a31f688d2a31d6c288e1875e89b3b5f69dd3c95ba9b054bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for swarmstate-0.1.0.tar.gz:

Publisher: release.yml on swarmstate/swarmstate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for swarmstate-0.1.0-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 6d4bc0da3c11af9a3631097235de5dc286d2473009de8ec88592abb2f0553d0f
MD5 7087c70298be454f8fdc96ff20ce1178
BLAKE2b-256 fd72e9b48435d5887a0ae12ec613c3a3421108015ea141610b864be9b200340a

See more details on using hashes here.

Provenance

The following attestation bundles were made for swarmstate-0.1.0-cp39-abi3-win_amd64.whl:

Publisher: release.yml on swarmstate/swarmstate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file swarmstate-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for swarmstate-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 17d26e34e5bf54f881690175ee6844fad2a3bdadc43764d922a08a5bc36a1d87
MD5 bc264189c953e6d44b23c4786980db1d
BLAKE2b-256 729e4af24a9caa543080f727cc58a3312c211c54bacb892168cb9ffe44368b0b

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file swarmstate-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for swarmstate-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 09b2fbed869d0720c984ccae0506e7fe464f11fdb75e76ca6ce04b74b801cb18
MD5 05bf997b8e2a917c8af637fe2bc15013
BLAKE2b-256 53f2f8c7c96102d9917f7c296f45f14340c8f87479d9751eefc32844cde29258

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file swarmstate-0.1.0-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for swarmstate-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 42c788b08273298c4b122a095f1ce6fcec2a041b93ed49139551729cfc231ce7
MD5 083de3f39336527f672e5e46e8e9ad48
BLAKE2b-256 31092caae8ed2aaa79bdc78cea743bacece27e8d7381d09b7bc1eec2f8c4e9f2

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file swarmstate-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for swarmstate-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 5475752acc16b4957355c61f736a0601132e1adb76694eb89ad8e14e546aeb28
MD5 838e6bbf7afc377e3069f96f0439ec53
BLAKE2b-256 d52e4403dad6b31683d35cd4e6d229612075a3fd48eb6237aff90f4aafd4bbe3

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page