Skip to main content

sealedplan-langgraph

Use a sealedplan runtime's actions as tools in a LangGraph agent. A tool call builds a plan; if a person must approve it, the graph pauses with the plan as the interrupt value, and continues only for that plan's hash. Needs LangGraph 1.2 or later.

pip install sealedplan-langgraph
from langgraph.checkpoint.memory import InMemorySaver
from langgraph.prebuilt import create_react_agent
from sealedplan_langgraph import sealedplan_tools

tools = sealedplan_tools(rt, agent=AGENT)  # rt: a Runtime with actions registered
graph = create_react_agent(model, tools, checkpointer=InMemorySaver())

Each registered action becomes one tool. sql.update_row becomes sql_update_row, and its arguments are the action's plan() parameters. A call never changes the target system directly. Interrupts need a checkpointer.

What a tool call does

Policy decision Result
auto The change is drift-checked and applied; the tool returns the outcome.
approve, two_person The graph pauses. The interrupt value is the plan (below).
deny The tool returns state: DENIED with the plan hash. Nothing is written.

The tool returns a JSON object to the model: state, plan_hash, summary, message, and where they apply applied, failed_preconditions (drift), deviation and error.

Approving and resuming

result = graph.invoke({"messages": [("user", "Upgrade customer 1 to gold")]}, config)
paused = result["__interrupt__"][0].value
# {"kind": "io.github.sealedplan/plan-apply", "plan_hash": "sha256:…", "summary": …,
#  "state": "PENDING_APPROVAL", "expires_at": …, "plan": {…}, "resume": {"plan_hash": …}}

A person approves the plan out of band, for example:

sealedplan --db plans.db approve <hash prefix> --as dana --issuer https://idp.example.com

Then the application resumes the graph:

from langgraph.types import Command

graph.invoke(Command(resume=paused["resume"]), config)

The resume value only says which plan to continue. It is never an approval: the tool reads approvals from the runtime's store. Resuming before approval pauses again on the same plan. A resume that names a different plan is refused, and nothing is written. If the system changed after approval, the tool returns DRIFTED and nothing is written.

One tool call, one plan

LangGraph runs an interrupted node again from the start when it resumes. The adapter uses the tool call's id as the plan's idempotency key, so the second run finds the plan the first run stored, in whatever state it is now, instead of proposing a new one.

To gate your own node instead of a tool, call run_action(rt, action_name, params, agent=..., idempotency_key=...) inside it. Use a key that names that one call and stays the same when the node runs again.

Who is the agent

agent= is the principal recorded as the plan's agent, and sponsor= optionally the person on whose behalf it acts.

Metadata

Release files for sealedplan-langgraph 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sealedplan-langgraph 0.1.0
File Size Uploaded Provenance Actions
sealedplan_langgraph-0.1.0.tar.gz 9.0 kB With provenance Details for sealedplan_langgraph-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sealedplan-langgraph 0.1.0
File Interpreter ABI Platform Actions
sealedplan_langgraph-0.1.0-py3-none-any.whl Python 3 none any Details for sealedplan_langgraph-0.1.0-py3-none-any.whl

Total release size: 19.6 kB

Release files / sealedplan_langgraph-0.1.0.tar.gz

Download URL sealedplan_langgraph-0.1.0.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a725a7a5aca089196dc5383648f4a865c9c81a5a7226cddf6601e862f5f438c2
BLAKE2b-256 checksum
How to use checksums
de7c5e9bb7a79fe0ce01d9e94269c1391c2528196d96f36527049b591037faf6
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 29, 2026.

Transparency log

Release files / sealedplan_langgraph-0.1.0-py3-none-any.whl

Download URL sealedplan_langgraph-0.1.0-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
97f404d8468b87e09e081c7e959f5e9665844c0d4d3fd85d591a1863e9f32d0f
BLAKE2b-256 checksum
How to use checksums
26af17c33fe205896281db95b08373def04ae2b50dff7bc4b6aeecb22ce150a0
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 29, 2026.

Transparency log

Security for sealedplan-langgraph 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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for sealedplan_langgraph-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 29, 2026.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page