Framework-agnostic agent reliability primitives for enforcing contracts, checkpointing, tracing, and execution.
Project description
Stroma
Reliability primitives for agent pipelines.
from pydantic import BaseModel
from stroma import StromaRunner
class Input(BaseModel):
value: int
class Output(BaseModel):
result: int
runner = StromaRunner.quick()
@runner.node("double", input=Input, output=Output)
async def double(state: Input) -> dict:
return {"result": state.value * 2}
result = await runner.run([double], Input(value=5))
print(result.final_state) # result=10
Install
pip install stroma
Optional extras:
pip install stroma[redis] # Redis-backed checkpointing
pip install stroma[langgraph] # LangGraph adapter
What You Get
- Contracts — Pydantic-based input/output validation at every node boundary
- Failure classification — automatic categorization of errors as recoverable, terminal, or ambiguous
- Retry policies — configurable retries with jittered backoff per failure class
- Checkpointing — save and resume pipelines across crashes (in-memory or Redis)
- Cost tracking — enforce token, dollar, and latency budgets across your pipeline
- Execution tracing — full record of every node attempt, with diffing and JSON export
- LangGraph adapter — apply contracts to existing LangGraph graphs
- Framework-agnostic — works with any async Python code, no framework lock-in
Documentation
Full documentation including a tutorial and API reference is available at the docs site.
Development
pip install -e ".[dev]"
uv run pytest tests/ -v --cov=stroma --cov-fail-under=90
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
stroma-0.1.1.tar.gz
(21.9 kB
view details)
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
stroma-0.1.1-py3-none-any.whl
(18.7 kB
view details)
File details
Details for the file stroma-0.1.1.tar.gz.
File metadata
- Download URL: stroma-0.1.1.tar.gz
- Upload date:
- Size: 21.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","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 |
e56202e0ad51a4424712460ad45cec8488f37f2367304af90a276a169efef765
|
|
| MD5 |
7554d82766eb74ae382c0757c308cd7b
|
|
| BLAKE2b-256 |
d1fa56bcfbc422d8cbc17c38a61b85dae241bca2ea20c6efb0d1d52fff77aaef
|
File details
Details for the file stroma-0.1.1-py3-none-any.whl.
File metadata
- Download URL: stroma-0.1.1-py3-none-any.whl
- Upload date:
- Size: 18.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","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 |
dd4f20a4161d047fe00ddc19651b406b7d045895ec8889812a23b1e2d045cbab
|
|
| MD5 |
ab1bc98deded5a4f912bceefaa6db65e
|
|
| BLAKE2b-256 |
727356b266e5eceb1e73f20704c09a0f40efc858b43adea34935a9792f5cd332
|