5D integration
5D for LangGraph interrupt and approval flows
Score the pending tool call, route by band, and only interrupt the graph when the action actually deserves review.
Pain it solves
LangGraph gives you interrupts and durable state, but you still need a policy decision before execution. Otherwise every team reimplements approval logic differently.
Best when you already have interrupt-driven HITL and want a reusable gate node instead of ad-hoc approval checks scattered through the graph.
When to use 5D
Use 5D when your agent can write files, run shell, call external APIs, or touch sensitive tools.
In this setup, 5D returns a normalized runtime decision: allow, review, or deny, plus a tripwire_triggered flag for runtimes that want a simpler guardrail signal.
Install
git clone https://github.com/theDoc001/fivedrisk.git
cd fivedrisk
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]" Minimal example
from fivedrisk.langgraph_node import fivedrisk_gate_node, route_by_band
graph.add_node("fivedrisk_gate", fivedrisk_gate_node)
graph.add_edge("builder", "fivedrisk_gate")
graph.add_conditional_edges(
"fivedrisk_gate",
route_by_band,
{"go": "tool_executor", "ask": "hitl_review", "stop": "deny_response"},
) Next step
Try the integration, then keep the policy layer yours.
5D gives you a portable policy layer you can run locally, keep provider-neutral, and hand off to a user or external review agent when needed.
Open source under Apache-2.0 and provided as-is. You are responsible for review, testing, configuration, sandboxing, and deployment in your own environment.