Skip to main content

ratchet-authz-langgraph

LangGraph adapter for Ratchet — plugs the Ratchet authorization broker into LangChain's wrap_tool_call middleware hook. No monkey-patching of LangGraph itself; a hijacked model still can't exceed what was explicitly delegated to it.

Install

pip install ratchet-authz-langgraph

Minimal usage

from ratchet_core import Broker, Ed25519WorkloadIdentity, tool_name_caveat
from ratchet_langgraph import RatchetMiddleware

broker = Broker()
primary = Ed25519WorkloadIdentity("primary-agent")
token = broker.issue(
    human_identity="alice@example.com",
    primary_identity=primary,
    caveats=[tool_name_caveat("read_calendar")],
)

middleware = RatchetMiddleware(
    broker,
    token_resolver=lambda request: token,
    identity_resolver=lambda request: primary,
)
agent = create_agent(model=..., tools=[...], middleware=[middleware])

Full runnable example and architecture diagram: https://github.com/1manideep/ratchet/blob/main/examples/langgraph_example.py

Metadata

Release files for ratchet-authz-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 ratchet-authz-langgraph 0.1.0
File Size Uploaded Provenance Actions
ratchet_authz_langgraph-0.1.0.tar.gz 2.9 kB Without provenance Details for ratchet_authz_langgraph-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 6.6 kB

Release files / ratchet_authz_langgraph-0.1.0.tar.gz

Download URL ratchet_authz_langgraph-0.1.0.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6c71c3118219751fe64428cfb033f5d9e13648e1e0fdab414862ee7e7563ced0
BLAKE2b-256 checksum
How to use checksums
74a889a2e5df9a9b46d48eee44e70afa91eaf8bbb86a85979d74d45671716673
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

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

Download URL ratchet_authz_langgraph-0.1.0-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b405bf3d254b8287349f3e7304e80646fbd2c13db83085019593d4651aebf9b6
BLAKE2b-256 checksum
How to use checksums
cff7d67517e9d26ce000ecb198ed1cf9fc8f624923b57e63c766dd4a648e24d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for ratchet-authz-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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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 No 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