Skip to main content

MOSS signing integration for LangGraph nodes

Project description

moss-langgraph

MOSS signing integration for LangGraph nodes.

Installation

pip install moss-langgraph

Usage

from langgraph.graph import StateGraph
from moss_langgraph import signed_node

def my_node(state):
    state["result"] = "computed"
    return state

# Create graph and add signed node
graph = StateGraph(dict)
graph.add_node("step", signed_node(my_node, "moss:flow:step"))

# After node executes, state["moss_envelope"] is populated

Verification

from moss import Subject

# After graph execution
result = graph.invoke({"input": "data"})
envelope = result["moss_envelope"]

# Verify the node's output
verify_result = Subject.verify(envelope)
assert verify_result.valid

Factory for Multiple Nodes

from moss_langgraph import SignedNodeFactory

# All nodes share the same subject
factory = SignedNodeFactory("moss:flow:pipeline")

graph.add_node("step1", factory.wrap(step1_fn))
graph.add_node("step2", factory.wrap(step2_fn))
graph.add_node("step3", factory.wrap(step3_fn))

Different Subjects per Node

graph.add_node("research", signed_node(research_fn, "moss:flow:research"))
graph.add_node("analyze", signed_node(analyze_fn, "moss:flow:analyze"))
graph.add_node("summarize", signed_node(summarize_fn, "moss:flow:summarize"))

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

moss_langgraph-0.1.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

moss_langgraph-0.1.0-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file moss_langgraph-0.1.0.tar.gz.

File metadata

  • Download URL: moss_langgraph-0.1.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for moss_langgraph-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0f70f4bda2c2ca0b1f328c0582870d31a609c0f1a2c61bbb9741b6b3c1a91264
MD5 8464c4d9adab87b502a10474bcff6d2f
BLAKE2b-256 523be89fa98bf8bc6b266e0d56e71ecdc34562b5900bc6d38d6e73ce26a4498f

See more details on using hashes here.

Provenance

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

Publisher: release.yml on mosscomputing/moss-langgraph

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

File details

Details for the file moss_langgraph-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: moss_langgraph-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for moss_langgraph-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6a3e132cff943d83378a6695538c443ded3c5ffb230a90bbaffa492c9fb7e0b6
MD5 938f97ac1e7912f78195b8e9817b9c57
BLAKE2b-256 10a2b3d273602e4b00ad7269b795a19cca8a7d0e10f92e2c6df57805f99ad5b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for moss_langgraph-0.1.0-py3-none-any.whl:

Publisher: release.yml on mosscomputing/moss-langgraph

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