moss-langgraph
MOSS signing integration for LangGraph. Unsigned output is broken output.
Installation
pip install moss-langgraph
Quick Start: Explicit Signing (Recommended)
Sign node outputs, checkpoints, and state transitions:
from moss_langgraph import sign_node_output, sign_checkpoint, sign_state_transition
# Sign a node output
state = {"messages": ["Hello"], "step": 1}
result = sign_node_output(state, agent_id="my-graph", node="processor")
print(f"Signed: {result.signature[:20]}...")
# Sign a checkpoint
checkpoint = {"thread_id": "t1", "values": state}
result = sign_checkpoint(checkpoint, agent_id="my-graph", checkpoint_id="cp_1")
# Sign a state transition
result = sign_state_transition(
from_state={"step": 1},
to_state={"step": 2},
agent_id="my-graph",
from_node="step1",
to_node="step2"
)
Enterprise Mode
Set MOSS_API_KEY for automatic policy evaluation:
import os
os.environ["MOSS_API_KEY"] = "your-api-key"
from moss_langgraph import sign_node_output, enterprise_enabled
print(f"Enterprise: {enterprise_enabled()}") # True
result = sign_node_output(
{"action": "high_value_trade"},
agent_id="trading-graph",
node="executor",
context={"user_id": "u123"}
)
if result.blocked:
print(f"Blocked by policy: {result.policy.reason}")
Verification
from moss_langgraph import verify_envelope
verify_result = verify_envelope(result.envelope)
if verify_result.valid:
print(f"Signed by: {verify_result.subject}")
All Functions
| Function | Description |
|---|---|
sign_node_output() |
Sign a node's output state |
sign_node_output_async() |
Async version |
sign_checkpoint() |
Sign a LangGraph checkpoint |
sign_checkpoint_async() |
Async version |
sign_state_transition() |
Sign a state transition |
sign_state_transition_async() |
Async version |
verify_envelope() |
Verify a signed envelope |
Legacy API: Auto-Signing Decorator
The old decorator API is still available:
from langgraph.graph import StateGraph
from moss_langgraph import signed_node, SignedNodeFactory
# Wrap individual nodes
graph.add_node("step", signed_node(my_node, "moss:flow:step"))
# Or use factory for multiple nodes
factory = SignedNodeFactory("moss:flow:pipeline")
graph.add_node("step1", factory.wrap(step1_fn))
graph.add_node("step2", factory.wrap(step2_fn))
Enterprise Features
| Feature | Free | Enterprise |
|---|---|---|
| Local signing | ✓ | ✓ |
| Offline verification | ✓ | ✓ |
| Policy evaluation | - | ✓ |
| Evidence retention | - | ✓ |
| Audit exports | - | ✓ |
Links
- moss-sdk - Core MOSS SDK
- mosscomputing.com - Project site
License
This package is licensed under the Business Source License 1.1.
- Free for evaluation, testing, and development
- Free for non-production use
- Production use requires a MOSS subscription
- Converts to Apache 2.0 on January 25, 2030
Metadata
Release files for moss-langgraph 1.0.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 |
|---|---|---|---|---|
| moss_langgraph-1.0.0.tar.gz | 7.8 kB | With provenance | Details for moss_langgraph-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| moss_langgraph-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for moss_langgraph-1.0.0-py3-none-any.whl |
Total release size: 14.4 kB
Release files / moss_langgraph-1.0.0.tar.gz
| Download URL | moss_langgraph-1.0.0.tar.gz |
|---|---|
| Size | 7.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3432fe160163ba5b65fdb582fe18a0b2a1451b86c780f9f81668c94cd267cd1b
|
|
BLAKE2b-256 checksum How to use checksums |
783a1cacd9c19e56ba71076ed221dcc231dd9d8caa0965ddee257c4f0f1f6ceb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Jan 25, 2026.
Transparency logRelease files / moss_langgraph-1.0.0-py3-none-any.whl
| Download URL | moss_langgraph-1.0.0-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5e77295431197c06cecb2fc92833cc30b73f8919004c3aff345381ff9f45a5df
|
|
BLAKE2b-256 checksum How to use checksums |
ba67936cb1f0273b7f665f6b05c8ac01868c145ffdb5ed1ff39671d38f3f7959
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Jan 25, 2026.
Transparency logSecurity for moss-langgraph 1.0.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
Both files in this release have been uploaded with provenance metadata.
Attestation for moss_langgraph-1.0.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 Jan 25, 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.