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.
Streamed responses are evaluated after delivery and therefore provide monitoring
only.
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.
1. Create the TrustGate collector
In TrustGuard, open Runtime → 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.2. Assign a runtime policy
On the collector’s Policies tab, set a default policy, and per-consumer overrides if one consumer needs different rules.3. 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 consumer.
The TrustGuard base URL and credentials come from the gateway deployment, not
from this policy form.
4. 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.
5. Verify
- Send a test request through the guarded route, or generate one from Playground under a consumer.
- Confirm the event in TrustGuard Activity.
- Confirm the matching span on the TrustGate trace, and the Security flag in gateway telemetry. See Metrics.
Reference
Coverage
Use this integration for LLM and MCP traffic routed through TrustGate. If you do
not use a gateway, see the application or
edge collectors.
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 evaluates a streamed response in the post_response
stage after the client has drained the stream. The resulting finding is recorded
but cannot affect bytes already delivered. Put rules that require preventive
enforcement on the request direction or use non-streaming completions.
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.
Configuration
Where connection settings live. Policy settings includecollector_id,
direction, and on_error. 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. on_error applies to transport failures, timeouts, and
ordinary service errors. Its default, fail_open, lets traffic continue;
fail_closed returns a gateway error. TrustGuard responses for authentication
(401/403), rate limits (429), and unavailable entitlements (503) always
block. A missing TrustGuard base URL or gateway credential fails open.
Policy routing. The collector’s default policy covers all of its traffic; a
per-consumer 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 consumer, so a gateway can inspect some consumers 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-consumer 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
- Coverage: compare available collectors
- TrustGate on GitHub: open-source gateway, Apache-2.0