watchlight-langgraph
Governed LangGraph agents with Watchlight — authorize every agent action, fail-closed, with zero infrastructure.
pip install watchlight-langgraph
Independent third-party plugin. This is an independent integration built by Watchlight AI. It is not affiliated with, endorsed by, or sponsored by LangChain.
LangGraphand related names are trademarks of LangChain, used here nominatively only to describe compatibility.
What it does
watchlight-langgraph puts a Watchlight authorization decision in front of every action your LangGraph agent takes — tool calls, plan steps, and sub-agent spawns — so each one is allowed, modified, or denied before it runs. It's open-source glue: a thin, framework-specific layer that threads Watchlight's governance primitives into your graph topology. The actual policy decisions run on Watchlight's compiled engine, either in-process for local development or against the governed control plane in production.
Quickstart
Point the plugin at a backend and wrap your run. Your agent code doesn't change — only the backend does.
For local development, the zero-infrastructure Developer Edition runs the compiled engine in-process (requires the watchlight-engine package):
pip install watchlight-langgraph watchlight-engine
from watchlight_langgraph import WatchlightLangGraphPlugin
from watchlight_core import InProcessClient
# A Cedar policy: the research agent may read, nothing else.
POLICIES = [
{"name": "reader",
"code": 'permit(principal == User::"research-agent", action == Action::"read", resource);'},
]
plugin = WatchlightLangGraphPlugin()
plugin.apdp = InProcessClient(POLICIES) # decisions run in-process, no server, no network
async def run_agent(question: str):
async with await plugin.start_run(agent_slug="research-agent") as handle:
# Validate a multi-step plan ahead of execution (Allow / Modify / Deny).
result = await handle.submit_plan(["read dataset", "summarize"])
if result.is_deny():
raise PermissionError(f"Plan denied: {result.violations}")
# Gate each action authoritatively. Returns True on Allow, False on Deny.
if not await handle.authorize_action("read", "dataset"):
raise PermissionError("Denied by policy")
# ... your LangGraph agent runs, every action governed ...
authorize_action fails closed: a denial — or an unreachable backend — returns False, so the action never runs.
Two backends, same code
| Backend | Runs | |
|---|---|---|
| Developer Edition | InProcessClient |
The compiled engine, in-process — no server, no network |
| Enterprise | ApdpClient |
The governed control plane — signed lineage, drift detection, fleet-wide governance |
Moving from local to production is a one-line change:
from watchlight_core import ApdpClient
plugin = WatchlightLangGraphPlugin()
plugin.apdp = ApdpClient("https://apdp.your-company.example", api_key="...")
Links
- Documentation: https://docs.watchlight.ai/de
- Website: https://watchlight.ai
License
Apache-2.0
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file watchlight_langgraph-0.4.0.tar.gz.
File metadata
- Download URL: watchlight_langgraph-0.4.0.tar.gz
- Upload date:
- Size: 77.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f7ebe8ea526d528efafb282368296f0716f1392276681466d92b67f73b1bfcd
|
|
| MD5 |
be30ed39bade5f471da70f55b24ed057
|
|
| BLAKE2b-256 |
eb52a2c5ab024bdaff5ff5b9d192f338e10cf1e91a85acbbd137d30cd7d35c95
|
Provenance
The following attestation bundles were made for watchlight_langgraph-0.4.0.tar.gz:
Publisher:
publish-python-sdk-plugins.yml on watchlight-ai-beacon/watchlight-beacon
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
watchlight_langgraph-0.4.0.tar.gz -
Subject digest:
7f7ebe8ea526d528efafb282368296f0716f1392276681466d92b67f73b1bfcd - Sigstore transparency entry: 2590139578
- Sigstore integration time:
-
Permalink:
watchlight-ai-beacon/watchlight-beacon@0764819fb065a45f52f7d3879f8496536e86a805 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/watchlight-ai-beacon
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python-sdk-plugins.yml@0764819fb065a45f52f7d3879f8496536e86a805 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file watchlight_langgraph-0.4.0-py3-none-any.whl.
File metadata
- Download URL: watchlight_langgraph-0.4.0-py3-none-any.whl
- Upload date:
- Size: 48.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1146dab1a9b4c3b165079fbaf3bca690a061944014feb75adb164abc600109b4
|
|
| MD5 |
ca74157f11aafb87846480e6e299e3c1
|
|
| BLAKE2b-256 |
380ffcc4d6e4c0efe162d8bb848d215e72303ed631476048baa6fc98e8f3d64b
|
Provenance
The following attestation bundles were made for watchlight_langgraph-0.4.0-py3-none-any.whl:
Publisher:
publish-python-sdk-plugins.yml on watchlight-ai-beacon/watchlight-beacon
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
watchlight_langgraph-0.4.0-py3-none-any.whl -
Subject digest:
1146dab1a9b4c3b165079fbaf3bca690a061944014feb75adb164abc600109b4 - Sigstore transparency entry: 2590139681
- Sigstore integration time:
-
Permalink:
watchlight-ai-beacon/watchlight-beacon@0764819fb065a45f52f7d3879f8496536e86a805 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/watchlight-ai-beacon
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python-sdk-plugins.yml@0764819fb065a45f52f7d3879f8496536e86a805 -
Trigger Event:
workflow_dispatch
-
Statement type: