@authorityrail/plugin-langgraph
v1.0.0
Published
AuthorityRail governance plugin for LangGraph. One import = ARES-v1 Certified Action Records on every node.
Maintainers
Readme
@authorityrail/plugin-langgraph
AuthorityRail governance plugin for LangGraph. One import = ARES-v1 Certified Action Records on every node.
Install
npm install @authorityrail/plugin-langgraphQuickstart
import { authorityRailNode, authorityRailChannels } from "@authorityrail/plugin-langgraph";
import { StateGraph } from "@langchain/langgraph";
const safeAnalyze = authorityRailNode(analyzeFn, {
gate_url: process.env.AUTHORITYRAIL_GATE_URL!,
api_key: process.env.AUTHORITYRAIL_API_KEY!,
action_type: "ANALYZE_DOCUMENT",
agent_id: "doc-analyzer",
resource: "documents/*",
model_provider: "anthropic",
model_id: "claude-opus-4-6",
});
const graph = new StateGraph({ channels: authorityRailChannels() });
graph.addNode("analyze", safeAnalyze);Every invocation of safeAnalyze is gated through AXAP before execution:
- ALLOW → node runs,
_ar_car_idattached to state - DENY →
AuthorityRailDenyErrorthrown - ESCALATE →
AuthorityRailEscalateErrorthrown (configurable)
License
MIT
