Same install everywhere we ship: GitHub Action, LangChain (Python & JS), Azure API Management, Slack, Shopify. The gate observes, records a signed Decision Dossier, and never changes caller behaviour β until you decide to enforce. One-line change to flip, reversible without uninstalling.
You don't have to wire every surface β start with the one whose audit you'd be asked about first. Tabs below swap the install snippet to that surface verbatim.
Same wrap-and-forget pattern as the Python version, for Node-land agents.
// npm i @decionis/langchain @decionis/sdk-node
import { createDecionisNodeSdk } from "@decionis/sdk-node";
import { DecionisGateTool } from "@decionis/langchain";
const client = createDecionisNodeSdk({
baseUrl: "https://api.decionis.com",
apiKey: process.env.DECIONIS_API_KEY!,
});
const gatedRefund = DecionisGateTool.wrap({
innerTool: sendRefund,
client,
orgId: process.env.DECIONIS_ORG_ID!,
decisionType: "refund_execution",
shadowMode: true, // β every verdict recorded; inner tool always runs
siteBaseUrl: "https://decionis.com",
});
await agent.bindTools([gatedRefund]);
Every gated call produces a signed Decision Dossier. Nothing changes for callers.
Same as the Python wrapper β verdicts flow into the Decionis audit log. On enforce, blocks throw DecionisGateRefusal carrying the dossier id and verify URL.
/verify/decision-dossiers/<id>.One-line change. Reversible without uninstalling.
const gatedRefund = DecionisGateTool.wrap({
innerTool: sendRefund,
client,
orgId: process.env.DECIONIS_ORG_ID!,
decisionType: "refund_execution",
- shadowMode: true,
+ shadowMode: false, // β enforce: inner tool only runs on an APPROVE verdict;
+ // REJECT / REVIEW / ESCALATE now hold the call
siteBaseUrl: "https://decionis.com",
});
Same dossier id, same verify URL, same audit log β the only difference is that blocked verdicts now actually hold the action. If a real workflow regresses, swap back to shadow: the rollback is the same one-line edit, in reverse.
Every dossier ID you record in shadow opens to a public verification page and unfurls with the OG verdict card in Slack / Teams / LinkedIn. Use them in the rollout review packet β the same signed artifact is the proof your CFO, your security reviewer, and your customer's auditor all want.