source
Agent app
Drafts, tool calls, workflow actions
Demo / compliance boundary for production agents
Catch leaked data, bad replies, and risky tool calls in production. Use the SDK or proxy to return allow, rewrite, block, or escalate with a trace.
source
Drafts, tool calls, workflow actions
path A
Inline guard() in your agent loop
path B
Policy boundary in front of agent traffic
TrustLoopGuard
POST /v1/events
Return a verdict, safe rewrite, reason, and trace ID before delivery.
trace
policy=support/private-data
decision
Remove private customer fields
app action
Your product still owns delivery
$ npm install @trustloopguard/sdk01. The problem
They send emails, call tools, query private data, trigger workflows, and speak directly to customers. A prompt filter is not enough once the agent is deciding what to do next.
02. Runtime loop
01
Your app or proxy layer captures the prompt, proposed output, and policy context before delivery.
02
The Rust API evaluates policy and runtime checks against the proposal.
03
Continue, use the rewrite, block with a reason, or escalate with context attached. You still own delivery.
04
The dashboard can show what happened, which policy fired, and how the app responded.
03. Verdicts
Return the response unchanged.
Mask secrets, remove private data, or return a safer answer.
Refuse with a reason your app can show or log.
Attach the prompt, proposal, policy, and trace ID.
04. SDK quickstart
One guard call submits a GuardEvent and returns a decision before the action reaches a user.
import { guard } from '@trustloopguard/sdk';
const guardrail = guard({ agentId: 'support-agent' });
const reply = await guardrail({
input: prompt,
draft: proposal,
});
return reply;05. Monitoring
See which actions were blocked, rewritten, or escalated, with a trace for why.
06. Use cases
Prevent leaked account data, unsafe advice, and policy-breaking replies.
Stop prompt injection, secret exposure, and unauthorized tool use.
Escalate high-risk actions before they trigger irreversible changes.
Give users guardrails without forcing every team to build its own runtime layer.
Ship the check
Start with the SDK, run the Rust service, and inspect decisions in the dashboard when your agent hits policy boundaries.