New:Socket for Asana Is Now Available.Learn more
Sign In

@trigguard/agent-sdk

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@trigguard/agent-sdk

Canonical TrigGuard agent SDK — authorize PERMIT/DENY/SILENCE/ESCALATE via POST /v1/authorize. Wraps @trigguard/execution-sdk.

latest
Source
npmnpm
Version
0.1.3
Version published
Weekly downloads
263
1361.11%
Maintainers
1
Weekly downloads
 
Created
Source

@trigguard/agent-sdk

Canonical TrigGuard agent integration layer.

Wraps @trigguard/execution-sdk — all authority decisions come from production POST /execute. No duplicate policy logic. No parallel authority systems.

Quick start

import { createTrigGuardAgent } from "@trigguard/agent-sdk";

const trigguard = createTrigGuardAgent({
  gatewayUrl: process.env.TRIGGUARD_GATEWAY_URL ?? "https://api.trigguardai.com",
  apiKey: process.env.TRIGGUARD_API_KEY,
  organizationId: process.env.TRIGGUARD_ORG_ID,
  defaultActorId: "my-agent",
});

const decision = await trigguard.authorize({
  surface: "deploy.release",
  context: { repository: "TrigGuard-AI/example", environment: "staging" },
});

if (decision.permit()) {
  await runProtectedAction();
} else if (decision.deny()) {
  stop("Authority denied");
} else if (decision.silence()) {
  await requestHumanReview();
}

const verified = await decision.verifyOffline();
console.log(decision.executionId, decision.label(), verified.ok);

Authority flow

Agent intent
    ↓
trigguard.authorize({ surface, context })
    ↓
POST /execute  (via @trigguard/execution-sdk)
    ↓
PERMIT | DENY | SILENCE + signed receipt
    ↓
AgentDecision.permit() | deny() | silence()
    ↓
Optional: verifyOffline() or verifyRemote()

When to use this vs execution-sdk

PackageUse when
@trigguard/agent-sdkBuilding agents (Cursor, Claude Code, MCP hosts, custom bots)
@trigguard/execution-sdkCI pipelines, low-level HTTP control, withExecute fail-closed

Agent SDK adds typed AgentDecision, receipt-first decision extraction, and verify helpers.

Examples

Design partner guide

See docs/integrations/FIRST_DESIGN_PARTNER_GUIDE.md.

MCP integration

Production MCP server: @trigguard/mcp-server — stdio transport, tools authorize_action, verify_receipt, get_surface, get_policy.

MCP calls this SDK internally — do not duplicate authority logic in MCP handlers.

Non-goals

  • No client-side policy evaluation
  • No /decide rail (receipt-less)
  • No console UI changes

Keywords

trigguard

FAQs

Package last updated on 20 Aug 2026

Related posts