TrigGuard
TRIGGUARD HELLO WORLD

Hello world integration

TrigGuard is execution authorization infrastructure for AI agents. This page shows the smallest Express path that enforces deterministic decisions: PERMIT, DENY, or SILENCE.

1) Install packages

npm install \
@trigguard/execution-sdk \
@trigguard/intent-sdk \
@trigguard/surface-registry \
@trigguard/express-middleware

2) Run a minimal middleware gate

import express from "express";
import { trigguardMiddleware } from "@trigguard/express-middleware";
import { defineSurface } from "@trigguard/surface-registry";

const app = express();
app.use(express.json());

const spendCommit = defineSurface({
 id: "payments.spendCommit",
 description: "Commit outbound payment",
});

app.post(
 "/payments/commit",
 trigguardMiddleware({
 surface: spendCommit,
 onDecision: (decision) => {
 if (decision === "PERMIT") return;
 throw new Error(`Execution denied by TrigGuard: ${decision}`);
 },
 }),
 (_req, res) => {
 res.json({ ok: true, committed: true });
 }
);

app.listen(3000, () => console.log("listening on :3000"));

3) Decision contract

  • PERMIT -> execution proceeds
  • DENY -> execution stops
  • SILENCE -> no authorization, execution stops

Keep this mapping explicit in integration code. Do not model decisions with alternate terms.

Navigate by protocol surface

PROTOCOL · ARCHITECTURE · QUICKSTART · VERIFY_RECEIPT · GOVERNANCE · REQUEST_ACCESS