Developers > Docs > Hello world integration

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.

1Install packages

npm install trigguard
pip install trigguard

2Authorize and verify

import { createTrigGuard } from "trigguard";

const tg = createTrigGuard({
  gatewayUrl: process.env.TRIGGUARD_GATEWAY_URL ?? "https://api.trigguardai.com",
  apiKey: process.env.TRIGGUARD_API_KEY,
});

const result = await tg.authorize({
  surface: "deploy.release",
  actorId: "hello-world",
  context: { environment: "staging" },
});

console.log("decision:", result.decision);
const trusted = await tg.verify(result.receipt);
console.log("verified:", trusted);
import os
from trigguard import TrigGuard

tg = TrigGuard(
    api_key=os.environ.get("TRIGGUARD_API_KEY"),
    gateway_url=os.environ.get("TRIGGUARD_GATEWAY_URL", "https://api.trigguardai.com"),
)

result = tg.authorize(
    surface="deploy.release",
    actor="hello-world",
    context={"environment": "staging"},
)

print("decision:", result["decision"])
trusted = tg.verify(result["receipt"])
print("verified:", trusted)

Full walkthrough: First 10 minutes on the developer onboarding path.

3Decision contract

DecisionOutcome
PERMITExecution proceeds.
DENYExecution stops.
SILENCENo authorization; execution stops.

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

Navigate by protocol surface