probity-effects
Keep one effect per agent tool call when its reply is lost: the guard asks the service that owns
the effect before anything is sent again, records each operation as an uncertain-effect/v1
record, and tests your tools against eight lost-reply scenarios in CI.
It's for teams whose LangGraph agents create orders, move money or open tickets, and who cannot afford a retry policy, a resumed thread or a model calling again to repeat the write.
Install the released package: pip install probity-effects==0.1.0.
Quick start
Python 3.11 or later. This example needs no network: the stand-in owner commits each write and loses the reply.
from probity_effects import EffectGuard, EffectOwner, Lookup
ledger = {}
def send(call):
ledger[call.key] = call.args # the write commits ...
raise TimeoutError("reply lost") # ... and its reply never arrives
owner = EffectOwner("orders", lookup=lambda key: Lookup(present=key in ledger))
guard = EffectGuard(owner)
for _ in range(3): # a retry, a resumed run, a model calling again
result = guard.perform("create_order", {"sku": "A-1", "quantity": 1}, send=send)
print(result.outcome, result.sent)
print(len(ledger), "effect")
It prints:
committed 1
committed 0
committed 0
1 effect
The first call loses its reply, asks the owner, and finds the order. The next two read the journal and send nothing.
In a LangGraph agent
from probity_effects import EffectCall, EffectOwner, Journal
from probity_effects.langgraph import effect_tool
orders = EffectOwner("orders", lookup=find_order_by_key) # your lookup, by idempotency key
@effect_tool(orders, journal=Journal.open("effects.jsonl"))
def create_order(sku: str, quantity: int, effect: EffectCall) -> dict:
"""Create an order."""
reply = httpx.post(ORDERS, json={"sku": sku, "quantity": quantity},
headers={"Idempotency-Key": effect.key}, timeout=5.0)
reply.raise_for_status()
return reply.json()
Pass create_order to ToolNode or create_react_agent as usual. A lost reply never reaches
LangGraph's retry machinery as an exception; an outcome the owner cannot confirm comes back to
the model as outcome unknown, and calling again sends nothing until the owner answers.
In CI
from probity_effects.testing import LANGGRAPH_VARIANTS, run_langgraph_scenario
@pytest.mark.parametrize("variant", LANGGRAPH_VARIANTS)
def test_survives_lost_replies(lost_reply_scenario, variant):
verdict = run_langgraph_scenario(make_tools, lost_reply_scenario, variant=variant)
assert verdict.passed, verdict.problems
pip install probity-effects[testing] adds the scenarios from agent-evidence-vectors. make_tools(owner, journal)
builds your tools; each scenario runs on four LangGraph paths and is judged by the owner's counts,
the reference reader's verdict on the record, and the journal's agreement with the owner.
Status
Version 0.1.0, alpha; its first PyPI release is pending. The LangGraph adapter ships first; the OpenAI Agents SDK and AG2 follow.
Documentation
| page | read it for |
|---|---|
| Design | the shape, the policy, the record and every decision |
| Measurements | a plain LangGraph tool against the guarded one on every scenario and path |
| Releasing | cut a release of this member |
License
Apache-2.0.
Metadata
Release files for probity-effects 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| probity_effects-0.1.0.tar.gz | 26.5 kB | With provenance | Details for probity_effects-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| probity_effects-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for probity_effects-0.1.0-py3-none-any.whl |
Total release size: 51.3 kB
Release files / probity_effects-0.1.0.tar.gz
| Download URL | probity_effects-0.1.0.tar.gz |
|---|---|
| Size | 26.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b1061c4fc1acf90b118bd5e47ee3a145e9ca025c7d3fb342ae87742a9f642be2
|
|
BLAKE2b-256 checksum How to use checksums |
2fd9efb0521c9d81fd4e93c21b47403541345b8a1da202168614d97ee7d1d3e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.
Transparency logRelease files / probity_effects-0.1.0-py3-none-any.whl
| Download URL | probity_effects-0.1.0-py3-none-any.whl |
|---|---|
| Size | 24.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ee7e0055ef0e0bf82d29feef2d93fc1ae94e52b5ecee3d533ede5b0377deae83
|
|
BLAKE2b-256 checksum How to use checksums |
2d9b57bb12f5099169b6d4038861aead527215bff3a2563ca53cd8928d6ac431
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.
Transparency logSecurity for probity-effects 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for probity_effects-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.