Integration capabilities
TrustGuard is configured as a policy inside
TrustGate. TrustGate controls routing, model and tool access, rate limits, and
budgets. TrustGuard evaluates content. You can run TrustGate without a TrustGuard
policy, but its routing and budget controls do not inspect payload content.
The native collector supports input and output evaluation for LLM and MCP
traffic. It can block or redact before non-streaming content is forwarded.
On a streamed completion it holds each stretch of text, checks it, and can
stop the stream when a rule blocks. Tokens already sent stay sent. See
Streamed responses.
Before you start
Create the policy in Observe mode. Observe records decisions in Activity without enforcing
them. Review the results, then switch the policy to Enforce. See
Policies.
Create the TrustGate collector
In TrustGuard, open Agent Security → Collectors → Catalog → Gateway → TrustGate and
bind the new collector to your gateway (Agent Gateway in the console). Use one
collector per gateway.You can also create the gateway-bound collector from the TrustGate policy form
in step 3, when it prompts you.
Assign a runtime policy
On the collector’s Policies tab, set a default policy, and per-application
overrides if one application needs different rules.
Turn on the TrustGuard guardrail
In TrustGate, open Policies → Catalog, where guardrails are listed first, and
pick TrustGuard. Select the collector from step 1, then set the scope: global
for the gateway, or attached to one application.
The TrustGuard base URL and credentials come from the gateway deployment, not
from this policy form.
Choose Enforce or Observe
Enforce applies the verdict inline. Observe records it and lets the
traffic through. See Verdict behavior for the full mapping.
direction defaults to request_response, which evaluates both directions.
Use request or response to limit evaluation to one leg. See
Coverage for what each leg can enforce.You can run TrustGuard alongside another guardrail policy in the same chain. For
example, use TrustGuard on the request and a Bedrock guardrail for PII
anonymization on the response. See
Guardrails.Verify
- Send a test request through the guarded route, or generate one from Playground under an application.
- Confirm the event in TrustGuard Activity.
- Confirm the matching span on the TrustGate trace, and the Security flag in gateway telemetry. See the Event schema.
Reference
Coverage
Use this integration for LLM and MCP traffic routed through TrustGate. If you do
not use a gateway, see the application SDK.
Ask. In Enforce mode, an
ask verdict blocks because the gateway has no
interactive approval flow. In Observe mode, it is recorded and traffic
continues. Ask gates match input only.
Streaming. TrustGate does not wait until the client has drained the stream.
It holds each stretch of the answer, evaluates it, and only then releases it.
A block before anything is sent is a 403. A block later closes the stream;
the prefix already sent stays. Observe records the finding and does not
close the stream. The hold and what the caller receives are on
Guardrails and
TrustGuard.
Limits. Redaction applies only to
data-loss outcomes in Enforce mode.
See Verdict behavior. Redaction does not
apply to a tool listing: a poisoned tool description is blocked, not rewritten.
What is evaluated
Tool declarations are the names, descriptions, and parameter schemas in LLM
tools[] or MCP tools/list. TrustGate can inspect them before an agent chooses
a tool. Developer lifecycle hooks generally see tool calls and results rather
than the declaration list.
Each stage sends a POST /v1/evaluate request. The
gateway sets direction, sends the payload, and applies the returned status.
Application collectors set direction themselves and enforce the verdict in
their own code.
direction selects which detector phase of the policy runs, Input or
Output.
For MCP tools/call, tool.name is read from payload.params.name, not from
attributes. Gate on that.
Verdict behavior
Statuses reduce most-restrictive-first:
block > ask > transform >
report > allow. A skip status continues in both modes.
Configuration
Where connection settings live. Policy settings includecollector_id,
and direction. The TrustGuard base URL and credentials come from
the gateway deployment’s TRUSTGUARD_* environment. On SaaS they are
platform-managed and require no user configuration.
Failure behavior. The cause decides.
- Availability failures follow the policy’s “If the guardrail cannot
evaluate” field. A transport failure, a service error, a refused credential
(
401/403), unavailable entitlements (503), a missing TrustGuard base URL or gateway credential, a timeout, an invalid policy configuration or a detector that fails to run is a request the guardrail cannot evaluate. With Allow, the default, the traffic continues and the policy is recorded as Failed Open with the reason. With Block, Enforce rejects the request and Observe only records it. - Failures caused by the content block in Enforce with
403: a body that cannot be read, content larger than TrustGuard accepts, or a mask that cannot be applied over sensitive data TrustGuard found. They record Failed Closed (orblocked, for the mask). Observe only records them.
429) are TrustGuard’s answer, not a
failure, and still block.
Policy routing. The collector’s default policy covers all of its traffic; a
per-application override keyed on consumer_id wins where one matches. Resolution
is override first, default second.
Scope. The guardrail policy itself is attached globally to the gateway or to a
single application, so a gateway can inspect some applications and not others.
Attributes
Findings appear in TrustGuard Activity and on the TrustGate trace for the same request, as a span and a Security flag in gateway telemetry. Correlate them with Alerts, under Telemetry in the console. Per-application policy overrides key onconsumer_id. Attribute conditions
available to gates and detector rules include consumer.{name,tag,type},
model.{name,provider}, collector.type, source.application, and
tool.{name,command,arguments}, with MCP tool.name taken from
payload.params.name as above.
Troubleshooting
Related
- TrustGate guardrails: configure the policy and guardrail chain
- Collectors: collector types and configuration
- Policies: Gates: configure Ask, Block, and Redact actions
- Evaluate API: request and response reference
- MCP Gateway: registries, toolkits, and MCP tools
- Per-Tool Rate Limiter: limit MCP tool executions
- Quickstart: create a gateway
- How it works: compare available collectors
- TrustGate on GitHub: open-source gateway, Apache-2.0